blob: 8aa849dd805c8748f16cc3bef4dbdb76c6be9b1c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Petersona8332062009-09-11 22:36:27 +00002# From configure.in Revision: 74714 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersona8332062009-09-11 22:36:27 +00004# Generated by GNU Autoconf 2.63 for python 3.1.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +0000517 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518fi
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +0000557 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000558 else
559 case $1 in
Benjamin Petersona8332062009-09-11 22:36:27 +0000560 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000561 esac;
562 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
563 ???[sx]*):;;*)false;;esac;fi
564 '\'' sh
565 '
566fi
567as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000570as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000571
572# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000573as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000574
575
Martin v. Löwis11437992002-04-12 09:54:03 +0000576
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000577exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000578
579# Name of the host.
580# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
581# so uname gets run too.
582ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
583
Martin v. Löwis11437992002-04-12 09:54:03 +0000584#
585# Initializations.
586#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000589ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000590LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000591cross_compiling=no
592subdirs=
593MFLAGS=
594MAKEFLAGS=
595SHELL=${CONFIG_SHELL-/bin/sh}
596
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000598PACKAGE_NAME='python'
599PACKAGE_TARNAME='python'
Christian Heimes70e5cab2008-12-03 18:18:23 +0000600PACKAGE_VERSION='3.1'
601PACKAGE_STRING='python 3.1'
Georg Brandle2e15612009-05-20 18:25:10 +0000602PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000603
604ac_unique_file="Include/object.h"
605# Factoring default headers for most tests.
606ac_includes_default="\
607#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000608#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <sys/types.h>
610#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000611#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000612# include <sys/stat.h>
613#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000614#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000615# include <stdlib.h>
616# include <stddef.h>
617#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000619# include <stdlib.h>
620# endif
621#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000622#ifdef HAVE_STRING_H
623# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000624# include <memory.h>
625# endif
626# include <string.h>
627#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000628#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000629# include <strings.h>
630#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000631#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000632# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000633#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000634#ifdef HAVE_STDINT_H
635# include <stdint.h>
636#endif
637#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000638# include <unistd.h>
639#endif"
640
Benjamin Petersona8332062009-09-11 22:36:27 +0000641ac_subst_vars='LTLIBOBJS
Martin v. Löwis113a0852009-05-29 17:25:39 +0000642SRCDIRS
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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
Christian Heimes70e5cab2008-12-03 18:18:23 +00001353\`configure' configures python 3.1 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 Petersona8332062009-09-11 22:36:27 +00001375 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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
Christian Heimes70e5cab2008-12-03 18:18:23 +00001414 short | recursive ) echo "Configuration of python 3.1:";;
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 Petersona8332062009-09-11 22:36:27 +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 Oussoren856624d2009-09-08 07:13:53 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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
Christian Heimes70e5cab2008-12-03 18:18:23 +00001548python configure 3.1
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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
Christian Heimes70e5cab2008-12-03 18:18:23 +00001562It was created by python $as_me 3.1, which was
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00001721 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001722 esac
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00001738 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 esac
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00001803 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001804elif test "x$prefix" != xNONE; then
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00001811for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001812do
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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
Christian Heimes70e5cab2008-12-03 18:18:23 +00001951VERSION=3.1
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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00002433 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2434$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002435else
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00002583 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2584$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002585else
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00002702 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002703
2704# Provide some information about the compiler.
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00002829 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002830sed 's/^/| /' conftest.$ac_ext >&5
2831
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00002874 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 fi
2876 fi
2877fi
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00002974 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002975sed 's/^/| /' conftest.$ac_ext >&5
2976
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00003400 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3401$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003402else
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00003441 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3442$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003443else
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00003488 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3489$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003490else
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00003762 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003763else
Benjamin Petersona8332062009-09-11 22:36:27 +00003764 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765 ac_path_GREP_found=false
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +00003832 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833 ac_path_EGREP_found=false
Benjamin Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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 Petersona8332062009-09-11 22:36:27 +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>
Martin v. Löwis113a0852009-05-29 17:25:39 +00003908
Benjamin Petersona8332062009-09-11 22:36:27 +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; }
Martin v. Löwis113a0852009-05-29 17:25:39 +00004157cat >conftest.$ac_ext <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00004158/* confdefs.h. */
4159_ACEOF
4160cat confdefs.h >>conftest.$ac_ext
4161cat >>conftest.$ac_ext <<_ACEOF
4162/* end confdefs.h. */
Benjamin Petersona8332062009-09-11 22:36:27 +00004163$ac_includes_default
4164#include <minix/config.h>
Antoine Pitroub52ec782009-01-25 16:34:23 +00004165_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +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 Pitroub52ec782009-01-25 16:34:23 +00004286cat >>confdefs.h <<\_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +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
Antoine Pitrou20327222009-05-24 20:39:11 +00004362#define _ALL_SOURCE 1
4363_ACEOF
4364
Benjamin Petersona8332062009-09-11 22:36:27 +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
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004388{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5
4389$as_echo_n "checking for --with-suffix... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004401{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5
4402$as_echo "$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004407{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
4408$as_echo_n "checking for case-insensitive build directory... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004409if test ! -d CaseSensitiveTestDir; then
4410mkdir CaseSensitiveTestDir
4411fi
4412
4413if test -d casesensitivetestdir
4414then
Benjamin Petersona8332062009-09-11 22:36:27 +00004415 { $as_echo "$as_me:$LINENO: result: yes" >&5
4416$as_echo "yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004417 BUILDEXEEXT=.exe
4418else
Benjamin Petersona8332062009-09-11 22:36:27 +00004419 { $as_echo "$as_me:$LINENO: result: no" >&5
4420$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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;;
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004449{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5
4450$as_echo_n "checking LIBRARY... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004451if test -z "$LIBRARY"
4452then
4453 LIBRARY='libpython$(VERSION).a'
4454fi
Benjamin Petersona8332062009-09-11 22:36:27 +00004455{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5
4456$as_echo "$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004491{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5
4492$as_echo_n "checking LINKCC... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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";;
Antoine Pitrou20327222009-05-24 20:39:11 +00004504 QNX*)
4505 # qcc must be used because the other compilers do not
4506 # support -N.
4507 LINKCC=qcc;;
4508 esac
4509fi
Benjamin Petersona8332062009-09-11 22:36:27 +00004510{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5
4511$as_echo "$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004519{ $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
4520$as_echo_n "checking for GNU ld... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004531{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5
4532$as_echo "$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004533
Benjamin Petersona8332062009-09-11 22:36:27 +00004534{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5
4535$as_echo_n "checking for --enable-shared... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004551{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
4552$as_echo "$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004553
Benjamin Petersona8332062009-09-11 22:36:27 +00004554{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4555$as_echo_n "checking for --enable-profiling... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004577eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4578$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004579 (eval "$ac_link") 2>&5
4580 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00004581 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004587eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4588$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004589 (eval "$ac_try") 2>&5
4590 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00004591 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004592 (exit $ac_status); }; }; then
4593 ac_enable_profiling="yes"
4594else
Benjamin Petersona8332062009-09-11 22:36:27 +00004595 $as_echo "$as_me: program exited with status $ac_status" >&5
4596$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004597sed 's/^/| /' conftest.$ac_ext >&5
4598
4599( exit $ac_status )
4600ac_enable_profiling="no"
4601fi
Benjamin Petersona8332062009-09-11 22:36:27 +00004602rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004610{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4611$as_echo "$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004612
4613case "$ac_enable_profiling" in
4614 "yes")
4615 BASECFLAGS="-pg $BASECFLAGS"
4616 LDFLAGS="-pg $LDFLAGS"
4617 ;;
4618esac
4619
Benjamin Petersona8332062009-09-11 22:36:27 +00004620{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4621$as_echo_n "checking LDLIBRARY... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004705{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4706$as_echo "$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004711{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4712$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004713if test "${ac_cv_prog_RANLIB+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00004714 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004727 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004738 { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
4739$as_echo "$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004740else
Benjamin Petersona8332062009-09-11 22:36:27 +00004741 { $as_echo "$as_me:$LINENO: result: no" >&5
4742$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004751{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4752$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004753if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00004754 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004767 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004778 { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4779$as_echo "$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004780else
Benjamin Petersona8332062009-09-11 22:36:27 +00004781 { $as_echo "$as_me:$LINENO: result: no" >&5
4782$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +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;}
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004805{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4806$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004807if test "${ac_cv_prog_AR+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00004808 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004821 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004832 { $as_echo "$as_me:$LINENO: result: $AR" >&5
4833$as_echo "$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004834else
Benjamin Petersona8332062009-09-11 22:36:27 +00004835 { $as_echo "$as_me:$LINENO: result: no" >&5
4836$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004855{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4856$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004857if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00004858 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004871 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00004883 { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4884$as_echo "$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004885else
Benjamin Petersona8332062009-09-11 22:36:27 +00004886 { $as_echo "$as_me:$LINENO: result: no" >&5
4887$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +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;}
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +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; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004953if test -z "$INSTALL"; then
4954if test "${ac_cv_path_install+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00004955 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +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
Antoine Pitrou20327222009-05-24 20:39:11 +00004996 fi
4997 fi
4998 done
4999 done
5000 ;;
5001esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005002
Antoine Pitrou20327222009-05-24 20:39:11 +00005003done
5004IFS=$as_save_IFS
5005
Benjamin Petersona8332062009-09-11 22:36:27 +00005006rm -rf conftest.one conftest.two conftest.dir
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00005019{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
5020$as_echo "$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00005042{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5
5043$as_echo_n "checking for --with-pydebug... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +00005055 { $as_echo "$as_me:$LINENO: result: yes" >&5
5056$as_echo "yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00005057 Py_DEBUG='true'
Benjamin Petersona8332062009-09-11 22:36:27 +00005058else { $as_echo "$as_me:$LINENO: result: no" >&5
5059$as_echo "no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00005060fi
5061else
Benjamin Petersona8332062009-09-11 22:36:27 +00005062 { $as_echo "$as_me:$LINENO: result: no" >&5
5063$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +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
Antoine Pitrou20327222009-05-24 20:39:11 +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 Petersona8332062009-09-11 22:36:27 +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; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005134 ac_save_cc="$CC"
5135 CC="$CC -fno-strict-aliasing"
5136 if test "$cross_compiling" = yes; then
5137 ac_cv_no_strict_aliasing_ok=no
5138else
5139 cat >conftest.$ac_ext <<_ACEOF
5140/* confdefs.h. */
5141_ACEOF
5142cat confdefs.h >>conftest.$ac_ext
5143cat >>conftest.$ac_ext <<_ACEOF
5144/* end confdefs.h. */
5145int main() { return 0; }
5146_ACEOF
5147rm -f conftest$ac_exeext
5148if { (ac_try="$ac_link"
5149case "(($ac_try" in
5150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5151 *) ac_try_echo=$ac_try;;
5152esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005153eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5154$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005155 (eval "$ac_link") 2>&5
5156 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005157 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005158 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5159 { (case "(($ac_try" in
5160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5161 *) ac_try_echo=$ac_try;;
5162esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005163eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5164$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005165 (eval "$ac_try") 2>&5
5166 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005167 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005168 (exit $ac_status); }; }; then
5169 ac_cv_no_strict_aliasing_ok=yes
5170else
Benjamin Petersona8332062009-09-11 22:36:27 +00005171 $as_echo "$as_me: program exited with status $ac_status" >&5
5172$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005173sed 's/^/| /' conftest.$ac_ext >&5
5174
5175( exit $ac_status )
5176ac_cv_no_strict_aliasing_ok=no
5177fi
Benjamin Petersona8332062009-09-11 22:36:27 +00005178rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5180fi
5181
5182
5183 CC="$ac_save_cc"
Benjamin Petersona8332062009-09-11 22:36:27 +00005184 { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
5185$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005186 if test $ac_cv_no_strict_aliasing_ok = yes
5187 then
5188 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5189 fi
5190
5191 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5192 # support. Without this, treatment of subnormals doesn't follow
5193 # the standard.
5194 case $ac_sys_machine in
5195 alpha*)
5196 BASECFLAGS="$BASECFLAGS -mieee"
5197 ;;
5198 esac
5199
5200 case $ac_sys_system in
5201 SCO_SV*)
5202 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5203 ;;
5204 # is there any other compiler on Darwin besides gcc?
5205 Darwin*)
5206 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5207 # used to be here, but non-Apple gcc doesn't accept them.
5208
5209
5210 if test "${enable_universalsdk}"; then
5211 UNIVERSAL_ARCH_FLAGS=""
5212 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5213 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5214 ARCH_RUN_32BIT=""
5215
5216 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5217 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005218 ARCH_RUN_32BIT="true"
Antoine Pitrou20327222009-05-24 20:39:11 +00005219
5220 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5221 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5222 ARCH_RUN_32BIT="arch -i386 -ppc"
5223
Ronald Oussoren856624d2009-09-08 07:13:53 +00005224 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5225 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5226 ARCH_RUN_32BIT="arch -i386"
5227
5228 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5229 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5230 ARCH_RUN_32BIT="arch -i386 -ppc"
5231
Antoine Pitrou20327222009-05-24 20:39:11 +00005232 else
Benjamin Petersona8332062009-09-11 22:36:27 +00005233 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
5234$as_echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00005235 { (exit 1); exit 1; }; }
5236
5237 fi
5238
5239
5240 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
5241 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5242 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
5243 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5244 fi
5245 fi
5246
5247 # Calculate the right deployment target for this build.
5248 #
5249 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5250 if test ${cur_target} '>' 10.2; then
5251 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005252 if test ${enable_universalsdk}; then
5253 if test "${UNIVERSAL_ARCHS}" = "all"; then
5254 # Ensure that the default platform for a
5255 # 4-way universal build is OSX 10.5,
5256 # that's the first OS release where
5257 # 4-way builds make sense.
5258 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00005259
5260 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5261 cur_target='10.5'
5262
5263 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5264 cur_target='10.5'
5265
5266 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5267 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005268 fi
5269 else
5270 if test `arch` = "i386"; then
5271 # On Intel macs default to a deployment
5272 # target of 10.4, that's the first OSX
5273 # release with Intel support.
5274 cur_target="10.4"
5275 fi
5276 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005277 fi
5278 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5279
5280 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5281 # environment with a value that is the same as what we'll use
5282 # in the Makefile to ensure that we'll get the same compiler
5283 # environment during configure and build time.
5284 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5285 export MACOSX_DEPLOYMENT_TARGET
5286 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5287
5288 ;;
5289 OSF*)
5290 BASECFLAGS="$BASECFLAGS -mieee"
5291 ;;
5292 esac
5293 ;;
5294
5295*)
5296 case $ac_sys_system in
5297 OpenUNIX*|UnixWare*)
5298 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5299 ;;
5300 OSF*)
5301 BASECFLAGS="$BASECFLAGS -ieee -std"
5302 ;;
5303 SCO_SV*)
5304 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5305 ;;
5306 esac
5307 ;;
5308esac
5309
5310if test "$Py_DEBUG" = 'true'; then
5311 :
5312else
5313 OPT="-DNDEBUG $OPT"
5314fi
5315
5316if test "$ac_arch_flags"
5317then
5318 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5319fi
5320
5321# disable check for icc since it seems to pass, but generates a warning
5322if test "$CC" = icc
5323then
5324 ac_cv_opt_olimit_ok=no
5325fi
5326
Benjamin Petersona8332062009-09-11 22:36:27 +00005327{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
5328$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005329if test "${ac_cv_opt_olimit_ok+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00005330 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005331else
5332 ac_save_cc="$CC"
5333CC="$CC -OPT:Olimit=0"
5334if test "$cross_compiling" = yes; then
5335 ac_cv_opt_olimit_ok=no
5336else
5337 cat >conftest.$ac_ext <<_ACEOF
5338/* confdefs.h. */
5339_ACEOF
5340cat confdefs.h >>conftest.$ac_ext
5341cat >>conftest.$ac_ext <<_ACEOF
5342/* end confdefs.h. */
5343int main() { return 0; }
5344_ACEOF
5345rm -f conftest$ac_exeext
5346if { (ac_try="$ac_link"
5347case "(($ac_try" in
5348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5349 *) ac_try_echo=$ac_try;;
5350esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005351eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5352$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005353 (eval "$ac_link") 2>&5
5354 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005355 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5357 { (case "(($ac_try" in
5358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5359 *) ac_try_echo=$ac_try;;
5360esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005361eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5362$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005363 (eval "$ac_try") 2>&5
5364 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005365 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005366 (exit $ac_status); }; }; then
5367 ac_cv_opt_olimit_ok=yes
5368else
Benjamin Petersona8332062009-09-11 22:36:27 +00005369 $as_echo "$as_me: program exited with status $ac_status" >&5
5370$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005371sed 's/^/| /' conftest.$ac_ext >&5
5372
5373( exit $ac_status )
5374ac_cv_opt_olimit_ok=no
5375fi
Benjamin Petersona8332062009-09-11 22:36:27 +00005376rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5378fi
5379
5380
5381CC="$ac_save_cc"
5382fi
5383
Benjamin Petersona8332062009-09-11 22:36:27 +00005384{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
5385$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005386if test $ac_cv_opt_olimit_ok = yes; then
5387 case $ac_sys_system in
5388 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5389 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5390 # environment?
5391 Darwin*)
5392 ;;
5393 *)
5394 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5395 ;;
5396 esac
5397else
Benjamin Petersona8332062009-09-11 22:36:27 +00005398 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
5399$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005400 if test "${ac_cv_olimit_ok+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00005401 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005402else
5403 ac_save_cc="$CC"
5404 CC="$CC -Olimit 1500"
5405 if test "$cross_compiling" = yes; then
5406 ac_cv_olimit_ok=no
5407else
5408 cat >conftest.$ac_ext <<_ACEOF
5409/* confdefs.h. */
5410_ACEOF
5411cat confdefs.h >>conftest.$ac_ext
5412cat >>conftest.$ac_ext <<_ACEOF
5413/* end confdefs.h. */
5414int main() { return 0; }
5415_ACEOF
5416rm -f conftest$ac_exeext
5417if { (ac_try="$ac_link"
5418case "(($ac_try" in
5419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5420 *) ac_try_echo=$ac_try;;
5421esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005422eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5423$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005424 (eval "$ac_link") 2>&5
5425 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005426 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5428 { (case "(($ac_try" in
5429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5430 *) ac_try_echo=$ac_try;;
5431esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005432eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5433$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005434 (eval "$ac_try") 2>&5
5435 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005436 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005437 (exit $ac_status); }; }; then
5438 ac_cv_olimit_ok=yes
5439else
Benjamin Petersona8332062009-09-11 22:36:27 +00005440 $as_echo "$as_me: program exited with status $ac_status" >&5
5441$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005442sed 's/^/| /' conftest.$ac_ext >&5
5443
5444( exit $ac_status )
5445ac_cv_olimit_ok=no
5446fi
Benjamin Petersona8332062009-09-11 22:36:27 +00005447rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5449fi
5450
5451
5452 CC="$ac_save_cc"
5453fi
5454
Benjamin Petersona8332062009-09-11 22:36:27 +00005455 { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5456$as_echo "$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005457 if test $ac_cv_olimit_ok = yes; then
5458 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5459 fi
5460fi
5461
5462# Check whether GCC supports PyArg_ParseTuple format
5463if test "$GCC" = "yes"
5464then
Benjamin Petersona8332062009-09-11 22:36:27 +00005465 { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5466$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005467 save_CFLAGS=$CFLAGS
5468 CFLAGS="$CFLAGS -Werror"
5469 cat >conftest.$ac_ext <<_ACEOF
5470/* confdefs.h. */
5471_ACEOF
5472cat confdefs.h >>conftest.$ac_ext
5473cat >>conftest.$ac_ext <<_ACEOF
5474/* end confdefs.h. */
5475
5476 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5477
5478int
5479main ()
5480{
5481
5482 ;
5483 return 0;
5484}
5485_ACEOF
5486rm -f conftest.$ac_objext
5487if { (ac_try="$ac_compile"
5488case "(($ac_try" in
5489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5490 *) ac_try_echo=$ac_try;;
5491esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005492eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5493$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005494 (eval "$ac_compile") 2>conftest.er1
5495 ac_status=$?
5496 grep -v '^ *+' conftest.er1 >conftest.err
5497 rm -f conftest.er1
5498 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00005499 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005500 (exit $ac_status); } && {
5501 test -z "$ac_c_werror_flag" ||
5502 test ! -s conftest.err
5503 } && test -s conftest.$ac_objext; then
5504
5505cat >>confdefs.h <<\_ACEOF
5506#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5507_ACEOF
5508
Benjamin Petersona8332062009-09-11 22:36:27 +00005509 { $as_echo "$as_me:$LINENO: result: yes" >&5
5510$as_echo "yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005511else
Benjamin Petersona8332062009-09-11 22:36:27 +00005512 $as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005513sed 's/^/| /' conftest.$ac_ext >&5
5514
Benjamin Petersona8332062009-09-11 22:36:27 +00005515 { $as_echo "$as_me:$LINENO: result: no" >&5
5516$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005517
5518fi
5519
5520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5521 CFLAGS=$save_CFLAGS
5522fi
5523
5524# On some compilers, pthreads are available without further options
5525# (e.g. MacOS X). On some of these systems, the compiler will not
5526# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5527# So we have to see first whether pthreads are available without
5528# options before we can check whether -Kpthread improves anything.
Benjamin Petersona8332062009-09-11 22:36:27 +00005529{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5530$as_echo_n "checking whether pthreads are available without options... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005531if test "${ac_cv_pthread_is_default+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00005532 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005533else
5534 if test "$cross_compiling" = yes; then
5535 ac_cv_pthread_is_default=no
5536else
5537 cat >conftest.$ac_ext <<_ACEOF
5538/* confdefs.h. */
5539_ACEOF
5540cat confdefs.h >>conftest.$ac_ext
5541cat >>conftest.$ac_ext <<_ACEOF
5542/* end confdefs.h. */
5543
5544#include <pthread.h>
5545
5546void* routine(void* p){return NULL;}
5547
5548int main(){
5549 pthread_t p;
5550 if(pthread_create(&p,NULL,routine,NULL)!=0)
5551 return 1;
5552 (void)pthread_detach(p);
5553 return 0;
5554}
5555
5556_ACEOF
5557rm -f conftest$ac_exeext
5558if { (ac_try="$ac_link"
5559case "(($ac_try" in
5560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5561 *) ac_try_echo=$ac_try;;
5562esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005563eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5564$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005565 (eval "$ac_link") 2>&5
5566 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005567 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005568 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5569 { (case "(($ac_try" in
5570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5571 *) ac_try_echo=$ac_try;;
5572esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005573eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5574$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005575 (eval "$ac_try") 2>&5
5576 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005578 (exit $ac_status); }; }; then
5579
5580 ac_cv_pthread_is_default=yes
5581 ac_cv_kthread=no
5582 ac_cv_pthread=no
5583
5584else
Benjamin Petersona8332062009-09-11 22:36:27 +00005585 $as_echo "$as_me: program exited with status $ac_status" >&5
5586$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005587sed 's/^/| /' conftest.$ac_ext >&5
5588
5589( exit $ac_status )
5590ac_cv_pthread_is_default=no
5591fi
Benjamin Petersona8332062009-09-11 22:36:27 +00005592rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5594fi
5595
5596
5597
5598fi
5599
Benjamin Petersona8332062009-09-11 22:36:27 +00005600{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5601$as_echo "$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005602
5603
5604if test $ac_cv_pthread_is_default = yes
5605then
5606 ac_cv_kpthread=no
5607else
5608# -Kpthread, if available, provides the right #defines
5609# and linker options to make pthread_create available
5610# Some compilers won't report that they do not support -Kpthread,
5611# so we need to run a program to see whether it really made the
5612# function available.
Benjamin Petersona8332062009-09-11 22:36:27 +00005613{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5614$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005615if test "${ac_cv_kpthread+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00005616 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005617else
5618 ac_save_cc="$CC"
5619CC="$CC -Kpthread"
5620if test "$cross_compiling" = yes; then
5621 ac_cv_kpthread=no
5622else
5623 cat >conftest.$ac_ext <<_ACEOF
5624/* confdefs.h. */
5625_ACEOF
5626cat confdefs.h >>conftest.$ac_ext
5627cat >>conftest.$ac_ext <<_ACEOF
5628/* end confdefs.h. */
5629
5630#include <pthread.h>
5631
5632void* routine(void* p){return NULL;}
5633
5634int main(){
5635 pthread_t p;
5636 if(pthread_create(&p,NULL,routine,NULL)!=0)
5637 return 1;
5638 (void)pthread_detach(p);
5639 return 0;
5640}
5641
5642_ACEOF
5643rm -f conftest$ac_exeext
5644if { (ac_try="$ac_link"
5645case "(($ac_try" in
5646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5647 *) ac_try_echo=$ac_try;;
5648esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005649eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5650$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005651 (eval "$ac_link") 2>&5
5652 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005653 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5655 { (case "(($ac_try" in
5656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5657 *) ac_try_echo=$ac_try;;
5658esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005659eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5660$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005661 (eval "$ac_try") 2>&5
5662 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005663 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005664 (exit $ac_status); }; }; then
5665 ac_cv_kpthread=yes
5666else
Benjamin Petersona8332062009-09-11 22:36:27 +00005667 $as_echo "$as_me: program exited with status $ac_status" >&5
5668$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005669sed 's/^/| /' conftest.$ac_ext >&5
5670
5671( exit $ac_status )
5672ac_cv_kpthread=no
5673fi
Benjamin Petersona8332062009-09-11 22:36:27 +00005674rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5676fi
5677
5678
5679CC="$ac_save_cc"
5680fi
5681
Benjamin Petersona8332062009-09-11 22:36:27 +00005682{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5683$as_echo "$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005684fi
5685
5686if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5687then
5688# -Kthread, if available, provides the right #defines
5689# and linker options to make pthread_create available
5690# Some compilers won't report that they do not support -Kthread,
5691# so we need to run a program to see whether it really made the
5692# function available.
Benjamin Petersona8332062009-09-11 22:36:27 +00005693{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5694$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005695if test "${ac_cv_kthread+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00005696 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005697else
5698 ac_save_cc="$CC"
5699CC="$CC -Kthread"
5700if test "$cross_compiling" = yes; then
5701 ac_cv_kthread=no
5702else
5703 cat >conftest.$ac_ext <<_ACEOF
5704/* confdefs.h. */
5705_ACEOF
5706cat confdefs.h >>conftest.$ac_ext
5707cat >>conftest.$ac_ext <<_ACEOF
5708/* end confdefs.h. */
5709
5710#include <pthread.h>
5711
5712void* routine(void* p){return NULL;}
5713
5714int main(){
5715 pthread_t p;
5716 if(pthread_create(&p,NULL,routine,NULL)!=0)
5717 return 1;
5718 (void)pthread_detach(p);
5719 return 0;
5720}
5721
5722_ACEOF
5723rm -f conftest$ac_exeext
5724if { (ac_try="$ac_link"
5725case "(($ac_try" in
5726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5727 *) ac_try_echo=$ac_try;;
5728esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005729eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5730$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005731 (eval "$ac_link") 2>&5
5732 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005733 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005734 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5735 { (case "(($ac_try" in
5736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5737 *) ac_try_echo=$ac_try;;
5738esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005739eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5740$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005741 (eval "$ac_try") 2>&5
5742 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005743 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005744 (exit $ac_status); }; }; then
5745 ac_cv_kthread=yes
5746else
Benjamin Petersona8332062009-09-11 22:36:27 +00005747 $as_echo "$as_me: program exited with status $ac_status" >&5
5748$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005749sed 's/^/| /' conftest.$ac_ext >&5
5750
5751( exit $ac_status )
5752ac_cv_kthread=no
5753fi
Benjamin Petersona8332062009-09-11 22:36:27 +00005754rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5756fi
5757
5758
5759CC="$ac_save_cc"
5760fi
5761
Benjamin Petersona8332062009-09-11 22:36:27 +00005762{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5763$as_echo "$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005764fi
5765
5766if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5767then
5768# -pthread, if available, provides the right #defines
5769# and linker options to make pthread_create available
5770# Some compilers won't report that they do not support -pthread,
5771# so we need to run a program to see whether it really made the
5772# function available.
Benjamin Petersona8332062009-09-11 22:36:27 +00005773{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5774$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005775if test "${ac_cv_thread+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00005776 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005777else
5778 ac_save_cc="$CC"
5779CC="$CC -pthread"
5780if test "$cross_compiling" = yes; then
5781 ac_cv_pthread=no
5782else
5783 cat >conftest.$ac_ext <<_ACEOF
5784/* confdefs.h. */
5785_ACEOF
5786cat confdefs.h >>conftest.$ac_ext
5787cat >>conftest.$ac_ext <<_ACEOF
5788/* end confdefs.h. */
5789
5790#include <pthread.h>
5791
5792void* routine(void* p){return NULL;}
5793
5794int main(){
5795 pthread_t p;
5796 if(pthread_create(&p,NULL,routine,NULL)!=0)
5797 return 1;
5798 (void)pthread_detach(p);
5799 return 0;
5800}
5801
5802_ACEOF
5803rm -f conftest$ac_exeext
5804if { (ac_try="$ac_link"
5805case "(($ac_try" in
5806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5807 *) ac_try_echo=$ac_try;;
5808esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005809eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5810$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005811 (eval "$ac_link") 2>&5
5812 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005813 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005814 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5815 { (case "(($ac_try" in
5816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5817 *) ac_try_echo=$ac_try;;
5818esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005819eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5820$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005821 (eval "$ac_try") 2>&5
5822 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00005823 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005824 (exit $ac_status); }; }; then
5825 ac_cv_pthread=yes
5826else
Benjamin Petersona8332062009-09-11 22:36:27 +00005827 $as_echo "$as_me: program exited with status $ac_status" >&5
5828$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005829sed 's/^/| /' conftest.$ac_ext >&5
5830
5831( exit $ac_status )
5832ac_cv_pthread=no
5833fi
Benjamin Petersona8332062009-09-11 22:36:27 +00005834rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5836fi
5837
5838
5839CC="$ac_save_cc"
5840fi
5841
Benjamin Petersona8332062009-09-11 22:36:27 +00005842{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5843$as_echo "$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005844fi
5845
5846# If we have set a CC compiler flag for thread support then
5847# check if it works for CXX, too.
5848ac_cv_cxx_thread=no
5849if test ! -z "$CXX"
5850then
Benjamin Petersona8332062009-09-11 22:36:27 +00005851{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5852$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005853ac_save_cxx="$CXX"
5854
5855if test "$ac_cv_kpthread" = "yes"
5856then
5857 CXX="$CXX -Kpthread"
5858 ac_cv_cxx_thread=yes
5859elif test "$ac_cv_kthread" = "yes"
5860then
5861 CXX="$CXX -Kthread"
5862 ac_cv_cxx_thread=yes
5863elif test "$ac_cv_pthread" = "yes"
5864then
5865 CXX="$CXX -pthread"
5866 ac_cv_cxx_thread=yes
5867fi
5868
5869if test $ac_cv_cxx_thread = yes
5870then
5871 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5872 $CXX -c conftest.$ac_ext 2>&5
5873 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5874 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5875 then
5876 ac_cv_cxx_thread=yes
5877 else
5878 ac_cv_cxx_thread=no
5879 fi
5880 rm -fr conftest*
5881fi
Benjamin Petersona8332062009-09-11 22:36:27 +00005882{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5883$as_echo "$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005884fi
5885CXX="$ac_save_cxx"
5886
5887
5888# checks for header files
Benjamin Petersona8332062009-09-11 22:36:27 +00005889{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5890$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005891if test "${ac_cv_header_stdc+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00005892 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005893else
5894 cat >conftest.$ac_ext <<_ACEOF
5895/* confdefs.h. */
5896_ACEOF
5897cat confdefs.h >>conftest.$ac_ext
5898cat >>conftest.$ac_ext <<_ACEOF
5899/* end confdefs.h. */
5900#include <stdlib.h>
5901#include <stdarg.h>
5902#include <string.h>
5903#include <float.h>
5904
5905int
5906main ()
5907{
5908
5909 ;
5910 return 0;
5911}
5912_ACEOF
5913rm -f conftest.$ac_objext
5914if { (ac_try="$ac_compile"
5915case "(($ac_try" in
5916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5917 *) ac_try_echo=$ac_try;;
5918esac
Benjamin Petersona8332062009-09-11 22:36:27 +00005919eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5920$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005921 (eval "$ac_compile") 2>conftest.er1
5922 ac_status=$?
5923 grep -v '^ *+' conftest.er1 >conftest.err
5924 rm -f conftest.er1
5925 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00005926 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005927 (exit $ac_status); } && {
5928 test -z "$ac_c_werror_flag" ||
5929 test ! -s conftest.err
5930 } && test -s conftest.$ac_objext; then
5931 ac_cv_header_stdc=yes
5932else
Benjamin Petersona8332062009-09-11 22:36:27 +00005933 $as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005934sed 's/^/| /' conftest.$ac_ext >&5
5935
5936 ac_cv_header_stdc=no
5937fi
5938
5939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5940
5941if test $ac_cv_header_stdc = yes; then
5942 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5943 cat >conftest.$ac_ext <<_ACEOF
5944/* confdefs.h. */
5945_ACEOF
5946cat confdefs.h >>conftest.$ac_ext
5947cat >>conftest.$ac_ext <<_ACEOF
5948/* end confdefs.h. */
5949#include <string.h>
5950
5951_ACEOF
5952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5953 $EGREP "memchr" >/dev/null 2>&1; then
5954 :
5955else
5956 ac_cv_header_stdc=no
5957fi
Benjamin Petersona8332062009-09-11 22:36:27 +00005958rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005959
5960fi
5961
5962if test $ac_cv_header_stdc = yes; then
5963 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5964 cat >conftest.$ac_ext <<_ACEOF
5965/* confdefs.h. */
5966_ACEOF
5967cat confdefs.h >>conftest.$ac_ext
5968cat >>conftest.$ac_ext <<_ACEOF
5969/* end confdefs.h. */
5970#include <stdlib.h>
5971
5972_ACEOF
5973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5974 $EGREP "free" >/dev/null 2>&1; then
5975 :
5976else
5977 ac_cv_header_stdc=no
5978fi
Benjamin Petersona8332062009-09-11 22:36:27 +00005979rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005980
5981fi
5982
5983if test $ac_cv_header_stdc = yes; then
5984 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5985 if test "$cross_compiling" = yes; then
5986 :
5987else
5988 cat >conftest.$ac_ext <<_ACEOF
5989/* confdefs.h. */
5990_ACEOF
5991cat confdefs.h >>conftest.$ac_ext
5992cat >>conftest.$ac_ext <<_ACEOF
5993/* end confdefs.h. */
5994#include <ctype.h>
5995#include <stdlib.h>
5996#if ((' ' & 0x0FF) == 0x020)
5997# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5998# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5999#else
6000# define ISLOWER(c) \
6001 (('a' <= (c) && (c) <= 'i') \
6002 || ('j' <= (c) && (c) <= 'r') \
6003 || ('s' <= (c) && (c) <= 'z'))
6004# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6005#endif
6006
6007#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6008int
6009main ()
6010{
6011 int i;
6012 for (i = 0; i < 256; i++)
6013 if (XOR (islower (i), ISLOWER (i))
6014 || toupper (i) != TOUPPER (i))
6015 return 2;
6016 return 0;
6017}
6018_ACEOF
6019rm -f conftest$ac_exeext
6020if { (ac_try="$ac_link"
6021case "(($ac_try" in
6022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6023 *) ac_try_echo=$ac_try;;
6024esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006025eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6026$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006027 (eval "$ac_link") 2>&5
6028 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00006029 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6031 { (case "(($ac_try" in
6032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6033 *) ac_try_echo=$ac_try;;
6034esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006035eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6036$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006037 (eval "$ac_try") 2>&5
6038 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00006039 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006040 (exit $ac_status); }; }; then
6041 :
6042else
Benjamin Petersona8332062009-09-11 22:36:27 +00006043 $as_echo "$as_me: program exited with status $ac_status" >&5
6044$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006045sed 's/^/| /' conftest.$ac_ext >&5
6046
6047( exit $ac_status )
6048ac_cv_header_stdc=no
6049fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006050rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00006051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6052fi
6053
6054
6055fi
6056fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006057{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6058$as_echo "$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00006059if test $ac_cv_header_stdc = yes; then
6060
6061cat >>confdefs.h <<\_ACEOF
6062#define STDC_HEADERS 1
6063_ACEOF
6064
6065fi
6066
6067
Martin v. Löwis11437992002-04-12 09:54:03 +00006068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
Anthony Baxter8a560de2004-10-13 15:30:56 +00006103
Martin v. Löwisc3001752005-01-23 09:27:24 +00006104
Martin v. Löwis11017b12006-01-14 18:12:57 +00006105
Thomas Wouters477c8d52006-05-27 19:21:47 +00006106
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006107
6108
6109
6110
6111
6112
6113
6114
Thomas Wouters89f507f2006-12-13 04:49:30 +00006115
Christian Heimes043d6f62008-01-07 17:19:16 +00006116
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006117
6118
Christian Heimesbbe741d2008-03-28 10:53:29 +00006119
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006120
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006121for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6122fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006123ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006124shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006125unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006126sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6127sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006128sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006129sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006130sys/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 +00006131sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00006132bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006133do
Benjamin Petersona8332062009-09-11 22:36:27 +00006134as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006136 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6137$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006138if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006139 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006140fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006141ac_res=`eval 'as_val=${'$as_ac_Header'}
6142 $as_echo "$as_val"'`
6143 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6144$as_echo "$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006145else
Martin v. Löwis11437992002-04-12 09:54:03 +00006146 # Is the header compilable?
Benjamin Petersona8332062009-09-11 22:36:27 +00006147{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6148$as_echo_n "checking $ac_header usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006150/* confdefs.h. */
6151_ACEOF
6152cat confdefs.h >>conftest.$ac_ext
6153cat >>conftest.$ac_ext <<_ACEOF
6154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006155$ac_includes_default
6156#include <$ac_header>
6157_ACEOF
6158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159if { (ac_try="$ac_compile"
6160case "(($ac_try" in
6161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6162 *) ac_try_echo=$ac_try;;
6163esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006164eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6165$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006168 grep -v '^ *+' conftest.er1 >conftest.err
6169 rm -f conftest.er1
6170 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006171 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172 (exit $ac_status); } && {
6173 test -z "$ac_c_werror_flag" ||
6174 test ! -s conftest.err
6175 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006176 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00006177else
Benjamin Petersona8332062009-09-11 22:36:27 +00006178 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006179sed 's/^/| /' conftest.$ac_ext >&5
6180
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183
6184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +00006185{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6186$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006187
6188# Is the header present?
Benjamin Petersona8332062009-09-11 22:36:27 +00006189{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6190$as_echo_n "checking $ac_header presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006191cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006192/* confdefs.h. */
6193_ACEOF
6194cat confdefs.h >>conftest.$ac_ext
6195cat >>conftest.$ac_ext <<_ACEOF
6196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006197#include <$ac_header>
6198_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006199if { (ac_try="$ac_cpp conftest.$ac_ext"
6200case "(($ac_try" in
6201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6202 *) ac_try_echo=$ac_try;;
6203esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006204eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6205$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006207 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006208 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00006209 rm -f conftest.er1
6210 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006211 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212 (exit $ac_status); } >/dev/null && {
6213 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6214 test ! -s conftest.err
6215 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006216 ac_header_preproc=yes
6217else
Benjamin Petersona8332062009-09-11 22:36:27 +00006218 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006219sed 's/^/| /' conftest.$ac_ext >&5
6220
Martin v. Löwis11437992002-04-12 09:54:03 +00006221 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006223
Martin v. Löwis11437992002-04-12 09:54:03 +00006224rm -f conftest.err conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +00006225{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6226$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006227
6228# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006229case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6230 yes:no: )
Benjamin Petersona8332062009-09-11 22:36:27 +00006231 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6232$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6233 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6234$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006235 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006236 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006237 no:yes:* )
Benjamin Petersona8332062009-09-11 22:36:27 +00006238 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6239$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6240 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6241$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6242 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6243$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6244 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6245$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6246 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6247$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6248 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6249$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006250 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006251## -------------------------------------- ##
6252## Report this to http://bugs.python.org/ ##
6253## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006254_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006256 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00006257esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006258{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6259$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006261 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006262else
Skip Montanarof0d5f792004-08-15 14:08:23 +00006263 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006264fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006265ac_res=`eval 'as_val=${'$as_ac_Header'}
6266 $as_echo "$as_val"'`
6267 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6268$as_echo "$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006269
6270fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006271as_val=`eval 'as_val=${'$as_ac_Header'}
6272 $as_echo "$as_val"'`
6273 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006274 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00006275#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006276_ACEOF
6277
6278fi
6279
Guido van Rossum627b2d71993-12-24 10:39:16 +00006280done
6281
Martin v. Löwis11437992002-04-12 09:54:03 +00006282
6283
6284
6285
6286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006287ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006288for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Benjamin Petersona8332062009-09-11 22:36:27 +00006289 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6290{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
6291$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006292if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006293 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006294else
Martin v. Löwis11437992002-04-12 09:54:03 +00006295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006296/* confdefs.h. */
6297_ACEOF
6298cat confdefs.h >>conftest.$ac_ext
6299cat >>conftest.$ac_ext <<_ACEOF
6300/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006301#include <sys/types.h>
6302#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006303
Martin v. Löwis11437992002-04-12 09:54:03 +00006304int
6305main ()
6306{
6307if ((DIR *) 0)
6308return 0;
6309 ;
6310 return 0;
6311}
6312_ACEOF
6313rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006314if { (ac_try="$ac_compile"
6315case "(($ac_try" in
6316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6317 *) ac_try_echo=$ac_try;;
6318esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006319eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6320$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006323 grep -v '^ *+' conftest.er1 >conftest.err
6324 rm -f conftest.er1
6325 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006326 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006327 (exit $ac_status); } && {
6328 test -z "$ac_c_werror_flag" ||
6329 test ! -s conftest.err
6330 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006331 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006332else
Benjamin Petersona8332062009-09-11 22:36:27 +00006333 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006334sed 's/^/| /' conftest.$ac_ext >&5
6335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006336 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006338
6339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006340fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006341ac_res=`eval 'as_val=${'$as_ac_Header'}
6342 $as_echo "$as_val"'`
6343 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6344$as_echo "$ac_res" >&6; }
6345as_val=`eval 'as_val=${'$as_ac_Header'}
6346 $as_echo "$as_val"'`
6347 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006348 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00006349#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006350_ACEOF
6351
6352ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006354
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006355done
6356# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6357if test $ac_header_dirent = dirent.h; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006358 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6359$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006360if test "${ac_cv_search_opendir+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006361 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006362else
Martin v. Löwis11437992002-04-12 09:54:03 +00006363 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006364cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006365/* confdefs.h. */
6366_ACEOF
6367cat confdefs.h >>conftest.$ac_ext
6368cat >>conftest.$ac_ext <<_ACEOF
6369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006370
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006371/* Override any GCC internal prototype to avoid an error.
6372 Use char because int might match the return type of a GCC
6373 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006374#ifdef __cplusplus
6375extern "C"
6376#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006377char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006378int
6379main ()
6380{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006381return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006382 ;
6383 return 0;
6384}
6385_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006386for ac_lib in '' dir; do
6387 if test -z "$ac_lib"; then
6388 ac_res="none required"
6389 else
6390 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006391 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006392 fi
6393 rm -f conftest.$ac_objext conftest$ac_exeext
6394if { (ac_try="$ac_link"
6395case "(($ac_try" in
6396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6397 *) ac_try_echo=$ac_try;;
6398esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006399eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6400$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006401 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006402 ac_status=$?
6403 grep -v '^ *+' conftest.er1 >conftest.err
6404 rm -f conftest.er1
6405 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006406 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006407 (exit $ac_status); } && {
6408 test -z "$ac_c_werror_flag" ||
6409 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +00006410 } && test -s conftest$ac_exeext && {
6411 test "$cross_compiling" = yes ||
6412 $as_test_x conftest$ac_exeext
6413 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006414 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006415else
Benjamin Petersona8332062009-09-11 22:36:27 +00006416 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006417sed 's/^/| /' conftest.$ac_ext >&5
6418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006419
Thomas Wouters477c8d52006-05-27 19:21:47 +00006420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006421
Benjamin Petersona8332062009-09-11 22:36:27 +00006422rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006423rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6424 conftest$ac_exeext
6425 if test "${ac_cv_search_opendir+set}" = set; then
6426 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006428done
6429if test "${ac_cv_search_opendir+set}" = set; then
6430 :
6431else
6432 ac_cv_search_opendir=no
6433fi
6434rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006435LIBS=$ac_func_search_save_LIBS
6436fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006437{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6438$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006439ac_res=$ac_cv_search_opendir
6440if test "$ac_res" != no; then
6441 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006444
Michael W. Hudson54241132001-12-07 15:38:26 +00006445else
Benjamin Petersona8332062009-09-11 22:36:27 +00006446 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6447$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006448if test "${ac_cv_search_opendir+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006449 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006450else
6451 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006453/* confdefs.h. */
6454_ACEOF
6455cat confdefs.h >>conftest.$ac_ext
6456cat >>conftest.$ac_ext <<_ACEOF
6457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006459/* Override any GCC internal prototype to avoid an error.
6460 Use char because int might match the return type of a GCC
6461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006462#ifdef __cplusplus
6463extern "C"
6464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006465char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006466int
6467main ()
6468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006469return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006470 ;
6471 return 0;
6472}
6473_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006474for ac_lib in '' x; do
6475 if test -z "$ac_lib"; then
6476 ac_res="none required"
6477 else
6478 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006479 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006480 fi
6481 rm -f conftest.$ac_objext conftest$ac_exeext
6482if { (ac_try="$ac_link"
6483case "(($ac_try" in
6484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6485 *) ac_try_echo=$ac_try;;
6486esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006487eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6488$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006489 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006490 ac_status=$?
6491 grep -v '^ *+' conftest.er1 >conftest.err
6492 rm -f conftest.er1
6493 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006494 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006495 (exit $ac_status); } && {
6496 test -z "$ac_c_werror_flag" ||
6497 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +00006498 } && test -s conftest$ac_exeext && {
6499 test "$cross_compiling" = yes ||
6500 $as_test_x conftest$ac_exeext
6501 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006502 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006503else
Benjamin Petersona8332062009-09-11 22:36:27 +00006504 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006505sed 's/^/| /' conftest.$ac_ext >&5
6506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507
Thomas Wouters477c8d52006-05-27 19:21:47 +00006508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006509
Benjamin Petersona8332062009-09-11 22:36:27 +00006510rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006511rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6512 conftest$ac_exeext
6513 if test "${ac_cv_search_opendir+set}" = set; then
6514 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006516done
6517if test "${ac_cv_search_opendir+set}" = set; then
6518 :
6519else
6520 ac_cv_search_opendir=no
6521fi
6522rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006523LIBS=$ac_func_search_save_LIBS
6524fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006525{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6526$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006527ac_res=$ac_cv_search_opendir
6528if test "$ac_res" != no; then
6529 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006530
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006531fi
6532
6533fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006534
Benjamin Petersona8332062009-09-11 22:36:27 +00006535{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6536$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006537if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006538 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006539else
6540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006541/* confdefs.h. */
6542_ACEOF
6543cat confdefs.h >>conftest.$ac_ext
6544cat >>conftest.$ac_ext <<_ACEOF
6545/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006546#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006547int
6548main ()
6549{
6550return makedev(0, 0);
6551 ;
6552 return 0;
6553}
6554_ACEOF
6555rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556if { (ac_try="$ac_link"
6557case "(($ac_try" in
6558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6559 *) ac_try_echo=$ac_try;;
6560esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006561eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6562$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006563 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006565 grep -v '^ *+' conftest.er1 >conftest.err
6566 rm -f conftest.er1
6567 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006568 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006569 (exit $ac_status); } && {
6570 test -z "$ac_c_werror_flag" ||
6571 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +00006572 } && test -s conftest$ac_exeext && {
6573 test "$cross_compiling" = yes ||
6574 $as_test_x conftest$ac_exeext
6575 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006576 ac_cv_header_sys_types_h_makedev=yes
6577else
Benjamin Petersona8332062009-09-11 22:36:27 +00006578 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006579sed 's/^/| /' conftest.$ac_ext >&5
6580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006581 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006583
Benjamin Petersona8332062009-09-11 22:36:27 +00006584rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006586 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006587
6588fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006589{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6590$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006591
6592if test $ac_cv_header_sys_types_h_makedev = no; then
6593if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006594 { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6595$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006596if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006597 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006598fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006599{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6600$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006601else
6602 # Is the header compilable?
Benjamin Petersona8332062009-09-11 22:36:27 +00006603{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6604$as_echo_n "checking sys/mkdev.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006606/* confdefs.h. */
6607_ACEOF
6608cat confdefs.h >>conftest.$ac_ext
6609cat >>conftest.$ac_ext <<_ACEOF
6610/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006611$ac_includes_default
6612#include <sys/mkdev.h>
6613_ACEOF
6614rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006615if { (ac_try="$ac_compile"
6616case "(($ac_try" in
6617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6618 *) ac_try_echo=$ac_try;;
6619esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006620eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6621$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006624 grep -v '^ *+' conftest.er1 >conftest.err
6625 rm -f conftest.er1
6626 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006627 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628 (exit $ac_status); } && {
6629 test -z "$ac_c_werror_flag" ||
6630 test ! -s conftest.err
6631 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006632 ac_header_compiler=yes
6633else
Benjamin Petersona8332062009-09-11 22:36:27 +00006634 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006635sed 's/^/| /' conftest.$ac_ext >&5
6636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006639
6640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +00006641{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6642$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006643
6644# Is the header present?
Benjamin Petersona8332062009-09-11 22:36:27 +00006645{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6646$as_echo_n "checking sys/mkdev.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006648/* confdefs.h. */
6649_ACEOF
6650cat confdefs.h >>conftest.$ac_ext
6651cat >>conftest.$ac_ext <<_ACEOF
6652/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006653#include <sys/mkdev.h>
6654_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006655if { (ac_try="$ac_cpp conftest.$ac_ext"
6656case "(($ac_try" in
6657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6658 *) ac_try_echo=$ac_try;;
6659esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006660eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6661$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006663 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006664 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006665 rm -f conftest.er1
6666 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006667 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006668 (exit $ac_status); } >/dev/null && {
6669 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6670 test ! -s conftest.err
6671 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006672 ac_header_preproc=yes
6673else
Benjamin Petersona8332062009-09-11 22:36:27 +00006674 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006675sed 's/^/| /' conftest.$ac_ext >&5
6676
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006677 ac_header_preproc=no
6678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006680rm -f conftest.err conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +00006681{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6682$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006683
6684# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006685case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6686 yes:no: )
Benjamin Petersona8332062009-09-11 22:36:27 +00006687 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6688$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6689 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6690$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006691 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006692 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006693 no:yes:* )
Benjamin Petersona8332062009-09-11 22:36:27 +00006694 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6695$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6696 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6697$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6698 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6699$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6700 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6701$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6702 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6703$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6704 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6705$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006706 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006707## -------------------------------------- ##
6708## Report this to http://bugs.python.org/ ##
6709## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006710_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006712 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006713esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006714{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6715$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006716if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006717 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006718else
6719 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6720fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006721{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6722$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006723
6724fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006725if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006726
6727cat >>confdefs.h <<\_ACEOF
6728#define MAJOR_IN_MKDEV 1
6729_ACEOF
6730
6731fi
6732
6733
6734
6735 if test $ac_cv_header_sys_mkdev_h = no; then
6736 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006737 { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6738$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006739if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006740 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006741fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006742{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6743$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006744else
6745 # Is the header compilable?
Benjamin Petersona8332062009-09-11 22:36:27 +00006746{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6747$as_echo_n "checking sys/sysmacros.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006748cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006749/* confdefs.h. */
6750_ACEOF
6751cat confdefs.h >>conftest.$ac_ext
6752cat >>conftest.$ac_ext <<_ACEOF
6753/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006754$ac_includes_default
6755#include <sys/sysmacros.h>
6756_ACEOF
6757rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006758if { (ac_try="$ac_compile"
6759case "(($ac_try" in
6760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6761 *) ac_try_echo=$ac_try;;
6762esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006763eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6764$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006767 grep -v '^ *+' conftest.er1 >conftest.err
6768 rm -f conftest.er1
6769 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006770 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771 (exit $ac_status); } && {
6772 test -z "$ac_c_werror_flag" ||
6773 test ! -s conftest.err
6774 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006775 ac_header_compiler=yes
6776else
Benjamin Petersona8332062009-09-11 22:36:27 +00006777 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006778sed 's/^/| /' conftest.$ac_ext >&5
6779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006780 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782
6783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +00006784{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6785$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006786
6787# Is the header present?
Benjamin Petersona8332062009-09-11 22:36:27 +00006788{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6789$as_echo_n "checking sys/sysmacros.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006790cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006791/* confdefs.h. */
6792_ACEOF
6793cat confdefs.h >>conftest.$ac_ext
6794cat >>conftest.$ac_ext <<_ACEOF
6795/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006796#include <sys/sysmacros.h>
6797_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006798if { (ac_try="$ac_cpp conftest.$ac_ext"
6799case "(($ac_try" in
6800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6801 *) ac_try_echo=$ac_try;;
6802esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006803eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6804$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006805 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006806 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006807 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006808 rm -f conftest.er1
6809 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006810 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811 (exit $ac_status); } >/dev/null && {
6812 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6813 test ! -s conftest.err
6814 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006815 ac_header_preproc=yes
6816else
Benjamin Petersona8332062009-09-11 22:36:27 +00006817 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006818sed 's/^/| /' conftest.$ac_ext >&5
6819
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006820 ac_header_preproc=no
6821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006822
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006823rm -f conftest.err conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +00006824{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6825$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006826
6827# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006828case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6829 yes:no: )
Benjamin Petersona8332062009-09-11 22:36:27 +00006830 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6831$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6832 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6833$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006834 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006835 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006836 no:yes:* )
Benjamin Petersona8332062009-09-11 22:36:27 +00006837 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6838$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6839 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6840$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6841 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6842$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6843 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6844$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6845 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6846$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6847 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6848$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006850## -------------------------------------- ##
6851## Report this to http://bugs.python.org/ ##
6852## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006853_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006854 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006855 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006856esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006857{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6858$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006859if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006860 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006861else
6862 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6863fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006864{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6865$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006866
6867fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006868if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006869
6870cat >>confdefs.h <<\_ACEOF
6871#define MAJOR_IN_SYSMACROS 1
6872_ACEOF
6873
6874fi
6875
6876
6877 fi
6878fi
6879
Michael W. Hudson54241132001-12-07 15:38:26 +00006880
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006881# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006882
6883for ac_header in term.h
6884do
Benjamin Petersona8332062009-09-11 22:36:27 +00006885as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6886{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6887$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006888if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006889 $as_echo_n "(cached) " >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006890else
6891 cat >conftest.$ac_ext <<_ACEOF
6892/* confdefs.h. */
6893_ACEOF
6894cat confdefs.h >>conftest.$ac_ext
6895cat >>conftest.$ac_ext <<_ACEOF
6896/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006897
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006898#ifdef HAVE_CURSES_H
6899#include <curses.h>
6900#endif
6901
6902
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006903#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006904_ACEOF
6905rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906if { (ac_try="$ac_compile"
6907case "(($ac_try" in
6908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6909 *) ac_try_echo=$ac_try;;
6910esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006911eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6912$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006914 ac_status=$?
6915 grep -v '^ *+' conftest.er1 >conftest.err
6916 rm -f conftest.er1
6917 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006918 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006919 (exit $ac_status); } && {
6920 test -z "$ac_c_werror_flag" ||
6921 test ! -s conftest.err
6922 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006923 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006924else
Benjamin Petersona8332062009-09-11 22:36:27 +00006925 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006926sed 's/^/| /' conftest.$ac_ext >&5
6927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006928 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006930
6931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006932fi
Benjamin Petersona8332062009-09-11 22:36:27 +00006933ac_res=`eval 'as_val=${'$as_ac_Header'}
6934 $as_echo "$as_val"'`
6935 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6936$as_echo "$ac_res" >&6; }
6937as_val=`eval 'as_val=${'$as_ac_Header'}
6938 $as_echo "$as_val"'`
6939 if test "x$as_val" = x""yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006940 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00006941#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006942_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006943
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006944fi
6945
6946done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006947
6948
Martin v. Löwis11017b12006-01-14 18:12:57 +00006949# On Linux, netlink.h requires asm/types.h
6950
6951for ac_header in linux/netlink.h
6952do
Benjamin Petersona8332062009-09-11 22:36:27 +00006953as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6954{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6955$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006956if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +00006957 $as_echo_n "(cached) " >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006958else
6959 cat >conftest.$ac_ext <<_ACEOF
6960/* confdefs.h. */
6961_ACEOF
6962cat confdefs.h >>conftest.$ac_ext
6963cat >>conftest.$ac_ext <<_ACEOF
6964/* end confdefs.h. */
6965
6966#ifdef HAVE_ASM_TYPES_H
6967#include <asm/types.h>
6968#endif
6969#ifdef HAVE_SYS_SOCKET_H
6970#include <sys/socket.h>
6971#endif
6972
6973
6974#include <$ac_header>
6975_ACEOF
6976rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006977if { (ac_try="$ac_compile"
6978case "(($ac_try" in
6979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6980 *) ac_try_echo=$ac_try;;
6981esac
Benjamin Petersona8332062009-09-11 22:36:27 +00006982eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6983$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006985 ac_status=$?
6986 grep -v '^ *+' conftest.er1 >conftest.err
6987 rm -f conftest.er1
6988 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006989 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006990 (exit $ac_status); } && {
6991 test -z "$ac_c_werror_flag" ||
6992 test ! -s conftest.err
6993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006994 eval "$as_ac_Header=yes"
6995else
Benjamin Petersona8332062009-09-11 22:36:27 +00006996 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006997sed 's/^/| /' conftest.$ac_ext >&5
6998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006999 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00007000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007001
7002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00007003fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007004ac_res=`eval 'as_val=${'$as_ac_Header'}
7005 $as_echo "$as_val"'`
7006 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7007$as_echo "$ac_res" >&6; }
7008as_val=`eval 'as_val=${'$as_ac_Header'}
7009 $as_echo "$as_val"'`
7010 if test "x$as_val" = x""yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00007011 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00007012#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007013_ACEOF
7014
7015fi
7016
7017done
7018
7019
Guido van Rossum627b2d71993-12-24 10:39:16 +00007020# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007021was_it_defined=no
Benjamin Petersona8332062009-09-11 22:36:27 +00007022{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
7023$as_echo_n "checking for clock_t in time.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007024cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007025/* confdefs.h. */
7026_ACEOF
7027cat confdefs.h >>conftest.$ac_ext
7028cat >>conftest.$ac_ext <<_ACEOF
7029/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007030#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007031
7032_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007034 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00007035 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007036else
Martin v. Löwis11437992002-04-12 09:54:03 +00007037
7038
7039cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007040#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00007041_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007042
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007043
Guido van Rossum627b2d71993-12-24 10:39:16 +00007044fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007045rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007046
Benjamin Petersona8332062009-09-11 22:36:27 +00007047{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
7048$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007049
Neal Norwitz11690112002-07-30 01:08:28 +00007050# Check whether using makedev requires defining _OSF_SOURCE
Benjamin Petersona8332062009-09-11 22:36:27 +00007051{ $as_echo "$as_me:$LINENO: checking for makedev" >&5
7052$as_echo_n "checking for makedev... " >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007054/* confdefs.h. */
7055_ACEOF
7056cat confdefs.h >>conftest.$ac_ext
7057cat >>conftest.$ac_ext <<_ACEOF
7058/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007059#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007060int
7061main ()
7062{
7063 makedev(0, 0)
7064 ;
7065 return 0;
7066}
7067_ACEOF
7068rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069if { (ac_try="$ac_link"
7070case "(($ac_try" in
7071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7072 *) ac_try_echo=$ac_try;;
7073esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007074eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7075$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007076 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007078 grep -v '^ *+' conftest.er1 >conftest.err
7079 rm -f conftest.er1
7080 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007081 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082 (exit $ac_status); } && {
7083 test -z "$ac_c_werror_flag" ||
7084 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +00007085 } && test -s conftest$ac_exeext && {
7086 test "$cross_compiling" = yes ||
7087 $as_test_x conftest$ac_exeext
7088 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007089 ac_cv_has_makedev=yes
7090else
Benjamin Petersona8332062009-09-11 22:36:27 +00007091 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007092sed 's/^/| /' conftest.$ac_ext >&5
7093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007096
Benjamin Petersona8332062009-09-11 22:36:27 +00007097rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007099 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007100if test "$ac_cv_has_makedev" = "no"; then
7101 # we didn't link, try if _OSF_SOURCE will allow us to link
7102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007103/* confdefs.h. */
7104_ACEOF
7105cat confdefs.h >>conftest.$ac_ext
7106cat >>conftest.$ac_ext <<_ACEOF
7107/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007108
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007109#define _OSF_SOURCE 1
7110#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007111
Neal Norwitz11690112002-07-30 01:08:28 +00007112int
7113main ()
7114{
7115 makedev(0, 0)
7116 ;
7117 return 0;
7118}
7119_ACEOF
7120rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007121if { (ac_try="$ac_link"
7122case "(($ac_try" in
7123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7124 *) ac_try_echo=$ac_try;;
7125esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007126eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7127$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007128 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007130 grep -v '^ *+' conftest.er1 >conftest.err
7131 rm -f conftest.er1
7132 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007133 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007134 (exit $ac_status); } && {
7135 test -z "$ac_c_werror_flag" ||
7136 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +00007137 } && test -s conftest$ac_exeext && {
7138 test "$cross_compiling" = yes ||
7139 $as_test_x conftest$ac_exeext
7140 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007141 ac_cv_has_makedev=yes
7142else
Benjamin Petersona8332062009-09-11 22:36:27 +00007143 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007144sed 's/^/| /' conftest.$ac_ext >&5
7145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007148
Benjamin Petersona8332062009-09-11 22:36:27 +00007149rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007150rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007151 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007152 if test "$ac_cv_has_makedev" = "yes"; then
7153
7154cat >>confdefs.h <<\_ACEOF
7155#define _OSF_SOURCE 1
7156_ACEOF
7157
7158 fi
7159fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007160{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
7161$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007162if test "$ac_cv_has_makedev" = "yes"; then
7163
7164cat >>confdefs.h <<\_ACEOF
7165#define HAVE_MAKEDEV 1
7166_ACEOF
7167
7168fi
7169
Martin v. Löwis399a6892002-10-04 10:22:02 +00007170# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7171# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7172# defined, but the compiler does not support pragma redefine_extname,
7173# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7174# structures (such as rlimit64) without declaring them. As a
7175# work-around, disable LFS on such configurations
7176
7177use_lfs=yes
Benjamin Petersona8332062009-09-11 22:36:27 +00007178{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
7179$as_echo_n "checking Solaris LFS bug... " >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007181/* confdefs.h. */
7182_ACEOF
7183cat confdefs.h >>conftest.$ac_ext
7184cat >>conftest.$ac_ext <<_ACEOF
7185/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007186
7187#define _LARGEFILE_SOURCE 1
7188#define _FILE_OFFSET_BITS 64
7189#include <sys/resource.h>
7190
Martin v. Löwis399a6892002-10-04 10:22:02 +00007191int
7192main ()
7193{
7194struct rlimit foo;
7195 ;
7196 return 0;
7197}
7198_ACEOF
7199rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007200if { (ac_try="$ac_compile"
7201case "(($ac_try" in
7202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7203 *) ac_try_echo=$ac_try;;
7204esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007205eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7206$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00007208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007209 grep -v '^ *+' conftest.er1 >conftest.err
7210 rm -f conftest.er1
7211 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007212 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007213 (exit $ac_status); } && {
7214 test -z "$ac_c_werror_flag" ||
7215 test ! -s conftest.err
7216 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00007217 sol_lfs_bug=no
7218else
Benjamin Petersona8332062009-09-11 22:36:27 +00007219 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007220sed 's/^/| /' conftest.$ac_ext >&5
7221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007222 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007224
7225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +00007226{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
7227$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007228if test "$sol_lfs_bug" = "yes"; then
7229 use_lfs=no
7230fi
7231
7232if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007233# Two defines needed to enable largefile support on various platforms
7234# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00007235
Martin v. Löwis11437992002-04-12 09:54:03 +00007236cat >>confdefs.h <<\_ACEOF
7237#define _LARGEFILE_SOURCE 1
7238_ACEOF
7239
7240
7241cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007242#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00007243_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007244
Martin v. Löwis399a6892002-10-04 10:22:02 +00007245fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007246
Guido van Rossum84e7b241996-08-19 21:59:00 +00007247# Add some code to confdefs.h so that the test for off_t works on SCO
7248cat >> confdefs.h <<\EOF
7249#if defined(SCO_DS)
7250#undef _OFF_T
7251#endif
7252EOF
7253
Guido van Rossumef2255b2000-03-10 22:30:29 +00007254# Type availability checks
Benjamin Petersona8332062009-09-11 22:36:27 +00007255{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
7256$as_echo_n "checking for mode_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007257if test "${ac_cv_type_mode_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007258 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007259else
Benjamin Petersona8332062009-09-11 22:36:27 +00007260 ac_cv_type_mode_t=no
7261cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00007262/* confdefs.h. */
7263_ACEOF
7264cat confdefs.h >>conftest.$ac_ext
7265cat >>conftest.$ac_ext <<_ACEOF
7266/* end confdefs.h. */
7267$ac_includes_default
7268int
7269main ()
7270{
Benjamin Petersona8332062009-09-11 22:36:27 +00007271if (sizeof (mode_t))
7272 return 0;
Antoine Pitrou20327222009-05-24 20:39:11 +00007273 ;
7274 return 0;
7275}
7276_ACEOF
7277rm -f conftest.$ac_objext
7278if { (ac_try="$ac_compile"
7279case "(($ac_try" in
7280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7281 *) ac_try_echo=$ac_try;;
7282esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007283eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7284$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007285 (eval "$ac_compile") 2>conftest.er1
7286 ac_status=$?
7287 grep -v '^ *+' conftest.er1 >conftest.err
7288 rm -f conftest.er1
7289 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007290 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007291 (exit $ac_status); } && {
7292 test -z "$ac_c_werror_flag" ||
7293 test ! -s conftest.err
7294 } && test -s conftest.$ac_objext; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007295 cat >conftest.$ac_ext <<_ACEOF
7296/* confdefs.h. */
7297_ACEOF
7298cat confdefs.h >>conftest.$ac_ext
7299cat >>conftest.$ac_ext <<_ACEOF
7300/* end confdefs.h. */
7301$ac_includes_default
7302int
7303main ()
7304{
7305if (sizeof ((mode_t)))
7306 return 0;
7307 ;
7308 return 0;
7309}
7310_ACEOF
7311rm -f conftest.$ac_objext
7312if { (ac_try="$ac_compile"
7313case "(($ac_try" in
7314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7315 *) ac_try_echo=$ac_try;;
7316esac
7317eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7318$as_echo "$ac_try_echo") >&5
7319 (eval "$ac_compile") 2>conftest.er1
7320 ac_status=$?
7321 grep -v '^ *+' conftest.er1 >conftest.err
7322 rm -f conftest.er1
7323 cat conftest.err >&5
7324 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7325 (exit $ac_status); } && {
7326 test -z "$ac_c_werror_flag" ||
7327 test ! -s conftest.err
7328 } && test -s conftest.$ac_objext; then
7329 :
Jack Jansendd19cf82001-12-06 22:36:17 +00007330else
Benjamin Petersona8332062009-09-11 22:36:27 +00007331 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007332sed 's/^/| /' conftest.$ac_ext >&5
7333
Benjamin Petersona8332062009-09-11 22:36:27 +00007334 ac_cv_type_mode_t=yes
7335fi
7336
7337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7338else
7339 $as_echo "$as_me: failed program was:" >&5
7340sed 's/^/| /' conftest.$ac_ext >&5
7341
7342
Jack Jansendd19cf82001-12-06 22:36:17 +00007343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007344
7345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007346fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007347{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
7348$as_echo "$ac_cv_type_mode_t" >&6; }
7349if test "x$ac_cv_type_mode_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007350 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007351else
Martin v. Löwis11437992002-04-12 09:54:03 +00007352
7353cat >>confdefs.h <<_ACEOF
7354#define mode_t int
7355_ACEOF
7356
7357fi
7358
Benjamin Petersona8332062009-09-11 22:36:27 +00007359{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
7360$as_echo_n "checking for off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007361if test "${ac_cv_type_off_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007362 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007363else
Benjamin Petersona8332062009-09-11 22:36:27 +00007364 ac_cv_type_off_t=no
7365cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00007366/* confdefs.h. */
7367_ACEOF
7368cat confdefs.h >>conftest.$ac_ext
7369cat >>conftest.$ac_ext <<_ACEOF
7370/* end confdefs.h. */
7371$ac_includes_default
7372int
7373main ()
7374{
Benjamin Petersona8332062009-09-11 22:36:27 +00007375if (sizeof (off_t))
7376 return 0;
Antoine Pitrou20327222009-05-24 20:39:11 +00007377 ;
7378 return 0;
7379}
7380_ACEOF
7381rm -f conftest.$ac_objext
7382if { (ac_try="$ac_compile"
7383case "(($ac_try" in
7384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7385 *) ac_try_echo=$ac_try;;
7386esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007387eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7388$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007389 (eval "$ac_compile") 2>conftest.er1
7390 ac_status=$?
7391 grep -v '^ *+' conftest.er1 >conftest.err
7392 rm -f conftest.er1
7393 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007394 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007395 (exit $ac_status); } && {
7396 test -z "$ac_c_werror_flag" ||
7397 test ! -s conftest.err
7398 } && test -s conftest.$ac_objext; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007399 cat >conftest.$ac_ext <<_ACEOF
7400/* confdefs.h. */
7401_ACEOF
7402cat confdefs.h >>conftest.$ac_ext
7403cat >>conftest.$ac_ext <<_ACEOF
7404/* end confdefs.h. */
7405$ac_includes_default
7406int
7407main ()
7408{
7409if (sizeof ((off_t)))
7410 return 0;
7411 ;
7412 return 0;
7413}
7414_ACEOF
7415rm -f conftest.$ac_objext
7416if { (ac_try="$ac_compile"
7417case "(($ac_try" in
7418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7419 *) ac_try_echo=$ac_try;;
7420esac
7421eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7422$as_echo "$ac_try_echo") >&5
7423 (eval "$ac_compile") 2>conftest.er1
7424 ac_status=$?
7425 grep -v '^ *+' conftest.er1 >conftest.err
7426 rm -f conftest.er1
7427 cat conftest.err >&5
7428 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7429 (exit $ac_status); } && {
7430 test -z "$ac_c_werror_flag" ||
7431 test ! -s conftest.err
7432 } && test -s conftest.$ac_objext; then
7433 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007434else
Benjamin Petersona8332062009-09-11 22:36:27 +00007435 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007436sed 's/^/| /' conftest.$ac_ext >&5
7437
Benjamin Petersona8332062009-09-11 22:36:27 +00007438 ac_cv_type_off_t=yes
7439fi
7440
7441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7442else
7443 $as_echo "$as_me: failed program was:" >&5
7444sed 's/^/| /' conftest.$ac_ext >&5
7445
7446
Guido van Rossum627b2d71993-12-24 10:39:16 +00007447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007448
7449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007450fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007451{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7452$as_echo "$ac_cv_type_off_t" >&6; }
7453if test "x$ac_cv_type_off_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007454 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007455else
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
7457cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007458#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007459_ACEOF
7460
7461fi
7462
Benjamin Petersona8332062009-09-11 22:36:27 +00007463{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
7464$as_echo_n "checking for pid_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007465if test "${ac_cv_type_pid_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007466 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007467else
Benjamin Petersona8332062009-09-11 22:36:27 +00007468 ac_cv_type_pid_t=no
7469cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00007470/* confdefs.h. */
7471_ACEOF
7472cat confdefs.h >>conftest.$ac_ext
7473cat >>conftest.$ac_ext <<_ACEOF
7474/* end confdefs.h. */
7475$ac_includes_default
7476int
7477main ()
7478{
Benjamin Petersona8332062009-09-11 22:36:27 +00007479if (sizeof (pid_t))
7480 return 0;
Antoine Pitrou20327222009-05-24 20:39:11 +00007481 ;
7482 return 0;
7483}
7484_ACEOF
7485rm -f conftest.$ac_objext
7486if { (ac_try="$ac_compile"
7487case "(($ac_try" in
7488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7489 *) ac_try_echo=$ac_try;;
7490esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007491eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7492$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007493 (eval "$ac_compile") 2>conftest.er1
7494 ac_status=$?
7495 grep -v '^ *+' conftest.er1 >conftest.err
7496 rm -f conftest.er1
7497 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007498 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007499 (exit $ac_status); } && {
7500 test -z "$ac_c_werror_flag" ||
7501 test ! -s conftest.err
7502 } && test -s conftest.$ac_objext; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007503 cat >conftest.$ac_ext <<_ACEOF
7504/* confdefs.h. */
7505_ACEOF
7506cat confdefs.h >>conftest.$ac_ext
7507cat >>conftest.$ac_ext <<_ACEOF
7508/* end confdefs.h. */
7509$ac_includes_default
7510int
7511main ()
7512{
7513if (sizeof ((pid_t)))
7514 return 0;
7515 ;
7516 return 0;
7517}
7518_ACEOF
7519rm -f conftest.$ac_objext
7520if { (ac_try="$ac_compile"
7521case "(($ac_try" in
7522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7523 *) ac_try_echo=$ac_try;;
7524esac
7525eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7526$as_echo "$ac_try_echo") >&5
7527 (eval "$ac_compile") 2>conftest.er1
7528 ac_status=$?
7529 grep -v '^ *+' conftest.er1 >conftest.err
7530 rm -f conftest.er1
7531 cat conftest.err >&5
7532 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7533 (exit $ac_status); } && {
7534 test -z "$ac_c_werror_flag" ||
7535 test ! -s conftest.err
7536 } && test -s conftest.$ac_objext; then
7537 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007538else
Benjamin Petersona8332062009-09-11 22:36:27 +00007539 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007540sed 's/^/| /' conftest.$ac_ext >&5
7541
Benjamin Petersona8332062009-09-11 22:36:27 +00007542 ac_cv_type_pid_t=yes
7543fi
7544
7545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7546else
7547 $as_echo "$as_me: failed program was:" >&5
7548sed 's/^/| /' conftest.$ac_ext >&5
7549
7550
Guido van Rossum627b2d71993-12-24 10:39:16 +00007551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007552
7553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007554fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007555{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7556$as_echo "$ac_cv_type_pid_t" >&6; }
7557if test "x$ac_cv_type_pid_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007558 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007559else
Martin v. Löwis11437992002-04-12 09:54:03 +00007560
7561cat >>confdefs.h <<_ACEOF
7562#define pid_t int
7563_ACEOF
7564
7565fi
7566
Benjamin Petersona8332062009-09-11 22:36:27 +00007567{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7568$as_echo_n "checking return type of signal handlers... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007569if test "${ac_cv_type_signal+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007570 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007571else
7572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007573/* confdefs.h. */
7574_ACEOF
7575cat confdefs.h >>conftest.$ac_ext
7576cat >>conftest.$ac_ext <<_ACEOF
7577/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007578#include <sys/types.h>
7579#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007580
Martin v. Löwis11437992002-04-12 09:54:03 +00007581int
7582main ()
7583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007584return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007585 ;
7586 return 0;
7587}
7588_ACEOF
7589rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007590if { (ac_try="$ac_compile"
7591case "(($ac_try" in
7592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7593 *) ac_try_echo=$ac_try;;
7594esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007595eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7596$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007599 grep -v '^ *+' conftest.er1 >conftest.err
7600 rm -f conftest.er1
7601 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007602 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603 (exit $ac_status); } && {
7604 test -z "$ac_c_werror_flag" ||
7605 test ! -s conftest.err
7606 } && test -s conftest.$ac_objext; then
7607 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007608else
Benjamin Petersona8332062009-09-11 22:36:27 +00007609 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007610sed 's/^/| /' conftest.$ac_ext >&5
7611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007614
7615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007616fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007617{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7618$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007619
Martin v. Löwis11437992002-04-12 09:54:03 +00007620cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007621#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007622_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007623
Michael W. Hudson54241132001-12-07 15:38:26 +00007624
Benjamin Petersona8332062009-09-11 22:36:27 +00007625{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
7626$as_echo_n "checking for size_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007627if test "${ac_cv_type_size_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007628 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007629else
Benjamin Petersona8332062009-09-11 22:36:27 +00007630 ac_cv_type_size_t=no
7631cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00007632/* confdefs.h. */
7633_ACEOF
7634cat confdefs.h >>conftest.$ac_ext
7635cat >>conftest.$ac_ext <<_ACEOF
7636/* end confdefs.h. */
7637$ac_includes_default
7638int
7639main ()
7640{
Benjamin Petersona8332062009-09-11 22:36:27 +00007641if (sizeof (size_t))
7642 return 0;
Antoine Pitrou20327222009-05-24 20:39:11 +00007643 ;
7644 return 0;
7645}
7646_ACEOF
7647rm -f conftest.$ac_objext
7648if { (ac_try="$ac_compile"
7649case "(($ac_try" in
7650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7651 *) ac_try_echo=$ac_try;;
7652esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007653eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7654$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007655 (eval "$ac_compile") 2>conftest.er1
7656 ac_status=$?
7657 grep -v '^ *+' conftest.er1 >conftest.err
7658 rm -f conftest.er1
7659 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007660 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007661 (exit $ac_status); } && {
7662 test -z "$ac_c_werror_flag" ||
7663 test ! -s conftest.err
7664 } && test -s conftest.$ac_objext; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007665 cat >conftest.$ac_ext <<_ACEOF
7666/* confdefs.h. */
7667_ACEOF
7668cat confdefs.h >>conftest.$ac_ext
7669cat >>conftest.$ac_ext <<_ACEOF
7670/* end confdefs.h. */
7671$ac_includes_default
7672int
7673main ()
7674{
7675if (sizeof ((size_t)))
7676 return 0;
7677 ;
7678 return 0;
7679}
7680_ACEOF
7681rm -f conftest.$ac_objext
7682if { (ac_try="$ac_compile"
7683case "(($ac_try" in
7684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7685 *) ac_try_echo=$ac_try;;
7686esac
7687eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7688$as_echo "$ac_try_echo") >&5
7689 (eval "$ac_compile") 2>conftest.er1
7690 ac_status=$?
7691 grep -v '^ *+' conftest.er1 >conftest.err
7692 rm -f conftest.er1
7693 cat conftest.err >&5
7694 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7695 (exit $ac_status); } && {
7696 test -z "$ac_c_werror_flag" ||
7697 test ! -s conftest.err
7698 } && test -s conftest.$ac_objext; then
7699 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007700else
Benjamin Petersona8332062009-09-11 22:36:27 +00007701 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007702sed 's/^/| /' conftest.$ac_ext >&5
7703
Benjamin Petersona8332062009-09-11 22:36:27 +00007704 ac_cv_type_size_t=yes
7705fi
7706
7707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7708else
7709 $as_echo "$as_me: failed program was:" >&5
7710sed 's/^/| /' conftest.$ac_ext >&5
7711
7712
Guido van Rossum627b2d71993-12-24 10:39:16 +00007713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714
7715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007716fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007717{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7718$as_echo "$ac_cv_type_size_t" >&6; }
7719if test "x$ac_cv_type_size_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007721else
Martin v. Löwis11437992002-04-12 09:54:03 +00007722
7723cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007724#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007725_ACEOF
7726
7727fi
7728
Benjamin Petersona8332062009-09-11 22:36:27 +00007729{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7730$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007731if test "${ac_cv_type_uid_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007732 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007733else
7734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007735/* confdefs.h. */
7736_ACEOF
7737cat confdefs.h >>conftest.$ac_ext
7738cat >>conftest.$ac_ext <<_ACEOF
7739/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007740#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007741
7742_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007744 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007745 ac_cv_type_uid_t=yes
7746else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007747 ac_cv_type_uid_t=no
7748fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007749rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007751fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007752{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7753$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007754if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007755
Martin v. Löwis11437992002-04-12 09:54:03 +00007756cat >>confdefs.h <<\_ACEOF
7757#define uid_t int
7758_ACEOF
7759
7760
7761cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007764
7765fi
7766
Mark Dickinsonbd792642009-03-18 20:06:12 +00007767
Benjamin Petersona8332062009-09-11 22:36:27 +00007768 { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
7769$as_echo_n "checking for uint32_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007770if test "${ac_cv_c_uint32_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007771 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007772else
7773 ac_cv_c_uint32_t=no
7774 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7775 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7776 cat >conftest.$ac_ext <<_ACEOF
7777/* confdefs.h. */
7778_ACEOF
7779cat confdefs.h >>conftest.$ac_ext
7780cat >>conftest.$ac_ext <<_ACEOF
7781/* end confdefs.h. */
7782$ac_includes_default
7783int
7784main ()
7785{
7786static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7787test_array [0] = 0
7788
7789 ;
7790 return 0;
7791}
7792_ACEOF
7793rm -f conftest.$ac_objext
7794if { (ac_try="$ac_compile"
7795case "(($ac_try" in
7796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7797 *) ac_try_echo=$ac_try;;
7798esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007799eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7800$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007801 (eval "$ac_compile") 2>conftest.er1
7802 ac_status=$?
7803 grep -v '^ *+' conftest.er1 >conftest.err
7804 rm -f conftest.er1
7805 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007806 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007807 (exit $ac_status); } && {
7808 test -z "$ac_c_werror_flag" ||
7809 test ! -s conftest.err
7810 } && test -s conftest.$ac_objext; then
7811 case $ac_type in
7812 uint32_t) ac_cv_c_uint32_t=yes ;;
7813 *) ac_cv_c_uint32_t=$ac_type ;;
7814esac
7815
7816else
Benjamin Petersona8332062009-09-11 22:36:27 +00007817 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007818sed 's/^/| /' conftest.$ac_ext >&5
7819
7820
7821fi
7822
7823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7824 test "$ac_cv_c_uint32_t" != no && break
7825 done
7826fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007827{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7828$as_echo "$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007829 case $ac_cv_c_uint32_t in #(
7830 no|yes) ;; #(
7831 *)
7832
7833cat >>confdefs.h <<\_ACEOF
7834#define _UINT32_T 1
7835_ACEOF
7836
7837
7838cat >>confdefs.h <<_ACEOF
7839#define uint32_t $ac_cv_c_uint32_t
7840_ACEOF
7841;;
7842 esac
7843
7844
Benjamin Petersona8332062009-09-11 22:36:27 +00007845 { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5
7846$as_echo_n "checking for uint64_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007847if test "${ac_cv_c_uint64_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007848 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007849else
7850 ac_cv_c_uint64_t=no
7851 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7852 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7853 cat >conftest.$ac_ext <<_ACEOF
7854/* confdefs.h. */
7855_ACEOF
7856cat confdefs.h >>conftest.$ac_ext
7857cat >>conftest.$ac_ext <<_ACEOF
7858/* end confdefs.h. */
7859$ac_includes_default
7860int
7861main ()
7862{
7863static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7864test_array [0] = 0
7865
7866 ;
7867 return 0;
7868}
7869_ACEOF
7870rm -f conftest.$ac_objext
7871if { (ac_try="$ac_compile"
7872case "(($ac_try" in
7873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7874 *) ac_try_echo=$ac_try;;
7875esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007876eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7877$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007878 (eval "$ac_compile") 2>conftest.er1
7879 ac_status=$?
7880 grep -v '^ *+' conftest.er1 >conftest.err
7881 rm -f conftest.er1
7882 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007883 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007884 (exit $ac_status); } && {
7885 test -z "$ac_c_werror_flag" ||
7886 test ! -s conftest.err
7887 } && test -s conftest.$ac_objext; then
7888 case $ac_type in
7889 uint64_t) ac_cv_c_uint64_t=yes ;;
7890 *) ac_cv_c_uint64_t=$ac_type ;;
7891esac
7892
7893else
Benjamin Petersona8332062009-09-11 22:36:27 +00007894 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007895sed 's/^/| /' conftest.$ac_ext >&5
7896
7897
7898fi
7899
7900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7901 test "$ac_cv_c_uint64_t" != no && break
7902 done
7903fi
Benjamin Petersona8332062009-09-11 22:36:27 +00007904{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7905$as_echo "$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007906 case $ac_cv_c_uint64_t in #(
7907 no|yes) ;; #(
7908 *)
7909
7910cat >>confdefs.h <<\_ACEOF
7911#define _UINT64_T 1
7912_ACEOF
7913
7914
7915cat >>confdefs.h <<_ACEOF
7916#define uint64_t $ac_cv_c_uint64_t
7917_ACEOF
7918;;
7919 esac
7920
7921
Benjamin Petersona8332062009-09-11 22:36:27 +00007922 { $as_echo "$as_me:$LINENO: checking for int32_t" >&5
7923$as_echo_n "checking for int32_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007924if test "${ac_cv_c_int32_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00007925 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007926else
7927 ac_cv_c_int32_t=no
7928 for ac_type in 'int32_t' 'int' 'long int' \
7929 'long long int' 'short int' 'signed char'; do
7930 cat >conftest.$ac_ext <<_ACEOF
7931/* confdefs.h. */
7932_ACEOF
7933cat confdefs.h >>conftest.$ac_ext
7934cat >>conftest.$ac_ext <<_ACEOF
7935/* end confdefs.h. */
7936$ac_includes_default
7937int
7938main ()
7939{
7940static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7941test_array [0] = 0
7942
7943 ;
7944 return 0;
7945}
7946_ACEOF
7947rm -f conftest.$ac_objext
7948if { (ac_try="$ac_compile"
7949case "(($ac_try" in
7950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7951 *) ac_try_echo=$ac_try;;
7952esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007953eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7954$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007955 (eval "$ac_compile") 2>conftest.er1
7956 ac_status=$?
7957 grep -v '^ *+' conftest.er1 >conftest.err
7958 rm -f conftest.er1
7959 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007960 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007961 (exit $ac_status); } && {
7962 test -z "$ac_c_werror_flag" ||
7963 test ! -s conftest.err
7964 } && test -s conftest.$ac_objext; then
7965 cat >conftest.$ac_ext <<_ACEOF
7966/* confdefs.h. */
7967_ACEOF
7968cat confdefs.h >>conftest.$ac_ext
7969cat >>conftest.$ac_ext <<_ACEOF
7970/* end confdefs.h. */
7971$ac_includes_default
7972int
7973main ()
7974{
7975static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Benjamin Petersona8332062009-09-11 22:36:27 +00007976 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007977test_array [0] = 0
7978
7979 ;
7980 return 0;
7981}
7982_ACEOF
7983rm -f conftest.$ac_objext
7984if { (ac_try="$ac_compile"
7985case "(($ac_try" in
7986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7987 *) ac_try_echo=$ac_try;;
7988esac
Benjamin Petersona8332062009-09-11 22:36:27 +00007989eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7990$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007991 (eval "$ac_compile") 2>conftest.er1
7992 ac_status=$?
7993 grep -v '^ *+' conftest.er1 >conftest.err
7994 rm -f conftest.er1
7995 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007996 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007997 (exit $ac_status); } && {
7998 test -z "$ac_c_werror_flag" ||
7999 test ! -s conftest.err
8000 } && test -s conftest.$ac_objext; then
8001 :
8002else
Benjamin Petersona8332062009-09-11 22:36:27 +00008003 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008004sed 's/^/| /' conftest.$ac_ext >&5
8005
8006 case $ac_type in
8007 int32_t) ac_cv_c_int32_t=yes ;;
8008 *) ac_cv_c_int32_t=$ac_type ;;
8009esac
8010
8011fi
8012
8013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8014else
Benjamin Petersona8332062009-09-11 22:36:27 +00008015 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008016sed 's/^/| /' conftest.$ac_ext >&5
8017
8018
8019fi
8020
8021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8022 test "$ac_cv_c_int32_t" != no && break
8023 done
8024fi
Benjamin Petersona8332062009-09-11 22:36:27 +00008025{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
8026$as_echo "$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008027 case $ac_cv_c_int32_t in #(
8028 no|yes) ;; #(
8029 *)
8030
8031cat >>confdefs.h <<_ACEOF
8032#define int32_t $ac_cv_c_int32_t
8033_ACEOF
8034;;
8035 esac
8036
8037
Benjamin Petersona8332062009-09-11 22:36:27 +00008038 { $as_echo "$as_me:$LINENO: checking for int64_t" >&5
8039$as_echo_n "checking for int64_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008040if test "${ac_cv_c_int64_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00008041 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00008042else
8043 ac_cv_c_int64_t=no
8044 for ac_type in 'int64_t' 'int' 'long int' \
8045 'long long int' 'short int' 'signed char'; do
8046 cat >conftest.$ac_ext <<_ACEOF
8047/* confdefs.h. */
8048_ACEOF
8049cat confdefs.h >>conftest.$ac_ext
8050cat >>conftest.$ac_ext <<_ACEOF
8051/* end confdefs.h. */
8052$ac_includes_default
8053int
8054main ()
8055{
8056static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
8057test_array [0] = 0
8058
8059 ;
8060 return 0;
8061}
8062_ACEOF
8063rm -f conftest.$ac_objext
8064if { (ac_try="$ac_compile"
8065case "(($ac_try" in
8066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8067 *) ac_try_echo=$ac_try;;
8068esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008069eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8070$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008071 (eval "$ac_compile") 2>conftest.er1
8072 ac_status=$?
8073 grep -v '^ *+' conftest.er1 >conftest.err
8074 rm -f conftest.er1
8075 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008076 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008077 (exit $ac_status); } && {
8078 test -z "$ac_c_werror_flag" ||
8079 test ! -s conftest.err
8080 } && test -s conftest.$ac_objext; then
8081 cat >conftest.$ac_ext <<_ACEOF
8082/* confdefs.h. */
8083_ACEOF
8084cat confdefs.h >>conftest.$ac_ext
8085cat >>conftest.$ac_ext <<_ACEOF
8086/* end confdefs.h. */
8087$ac_includes_default
8088int
8089main ()
8090{
8091static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Benjamin Petersona8332062009-09-11 22:36:27 +00008092 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00008093test_array [0] = 0
8094
8095 ;
8096 return 0;
8097}
8098_ACEOF
8099rm -f conftest.$ac_objext
8100if { (ac_try="$ac_compile"
8101case "(($ac_try" in
8102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8103 *) ac_try_echo=$ac_try;;
8104esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008105eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8106$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008107 (eval "$ac_compile") 2>conftest.er1
8108 ac_status=$?
8109 grep -v '^ *+' conftest.er1 >conftest.err
8110 rm -f conftest.er1
8111 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008112 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008113 (exit $ac_status); } && {
8114 test -z "$ac_c_werror_flag" ||
8115 test ! -s conftest.err
8116 } && test -s conftest.$ac_objext; then
8117 :
8118else
Benjamin Petersona8332062009-09-11 22:36:27 +00008119 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008120sed 's/^/| /' conftest.$ac_ext >&5
8121
8122 case $ac_type in
8123 int64_t) ac_cv_c_int64_t=yes ;;
8124 *) ac_cv_c_int64_t=$ac_type ;;
8125esac
8126
8127fi
8128
8129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8130else
Benjamin Petersona8332062009-09-11 22:36:27 +00008131 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008132sed 's/^/| /' conftest.$ac_ext >&5
8133
8134
8135fi
8136
8137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8138 test "$ac_cv_c_int64_t" != no && break
8139 done
8140fi
Benjamin Petersona8332062009-09-11 22:36:27 +00008141{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
8142$as_echo "$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008143 case $ac_cv_c_int64_t in #(
8144 no|yes) ;; #(
8145 *)
8146
8147cat >>confdefs.h <<_ACEOF
8148#define int64_t $ac_cv_c_int64_t
8149_ACEOF
8150;;
8151 esac
8152
Benjamin Petersona8332062009-09-11 22:36:27 +00008153{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
8154$as_echo_n "checking for ssize_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00008155if test "${ac_cv_type_ssize_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00008156 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008157else
Benjamin Petersona8332062009-09-11 22:36:27 +00008158 ac_cv_type_ssize_t=no
8159cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00008160/* confdefs.h. */
8161_ACEOF
8162cat confdefs.h >>conftest.$ac_ext
8163cat >>conftest.$ac_ext <<_ACEOF
8164/* end confdefs.h. */
8165$ac_includes_default
8166int
8167main ()
8168{
Benjamin Petersona8332062009-09-11 22:36:27 +00008169if (sizeof (ssize_t))
8170 return 0;
Antoine Pitrou20327222009-05-24 20:39:11 +00008171 ;
8172 return 0;
8173}
8174_ACEOF
8175rm -f conftest.$ac_objext
8176if { (ac_try="$ac_compile"
8177case "(($ac_try" in
8178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8179 *) ac_try_echo=$ac_try;;
8180esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008181eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8182$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008183 (eval "$ac_compile") 2>conftest.er1
8184 ac_status=$?
8185 grep -v '^ *+' conftest.er1 >conftest.err
8186 rm -f conftest.er1
8187 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008188 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008189 (exit $ac_status); } && {
8190 test -z "$ac_c_werror_flag" ||
8191 test ! -s conftest.err
8192 } && test -s conftest.$ac_objext; then
Benjamin Petersona8332062009-09-11 22:36:27 +00008193 cat >conftest.$ac_ext <<_ACEOF
8194/* confdefs.h. */
8195_ACEOF
8196cat confdefs.h >>conftest.$ac_ext
8197cat >>conftest.$ac_ext <<_ACEOF
8198/* end confdefs.h. */
8199$ac_includes_default
8200int
8201main ()
8202{
8203if (sizeof ((ssize_t)))
8204 return 0;
8205 ;
8206 return 0;
8207}
8208_ACEOF
8209rm -f conftest.$ac_objext
8210if { (ac_try="$ac_compile"
8211case "(($ac_try" in
8212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8213 *) ac_try_echo=$ac_try;;
8214esac
8215eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8216$as_echo "$ac_try_echo") >&5
8217 (eval "$ac_compile") 2>conftest.er1
8218 ac_status=$?
8219 grep -v '^ *+' conftest.er1 >conftest.err
8220 rm -f conftest.er1
8221 cat conftest.err >&5
8222 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8223 (exit $ac_status); } && {
8224 test -z "$ac_c_werror_flag" ||
8225 test ! -s conftest.err
8226 } && test -s conftest.$ac_objext; then
8227 :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008228else
Benjamin Petersona8332062009-09-11 22:36:27 +00008229 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00008230sed 's/^/| /' conftest.$ac_ext >&5
8231
Benjamin Petersona8332062009-09-11 22:36:27 +00008232 ac_cv_type_ssize_t=yes
8233fi
8234
8235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8236else
8237 $as_echo "$as_me: failed program was:" >&5
8238sed 's/^/| /' conftest.$ac_ext >&5
8239
8240
Martin v. Löwis18e16552006-02-15 17:27:45 +00008241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242
8243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00008244fi
Benjamin Petersona8332062009-09-11 22:36:27 +00008245{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
8246$as_echo "$ac_cv_type_ssize_t" >&6; }
8247if test "x$ac_cv_type_ssize_t" = x""yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00008248
8249cat >>confdefs.h <<\_ACEOF
8250#define HAVE_SSIZE_T 1
8251_ACEOF
8252
8253fi
8254
Jack Jansendd19cf82001-12-06 22:36:17 +00008255
Michael W. Hudson54241132001-12-07 15:38:26 +00008256# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008257# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258# The cast to long int works around a bug in the HP C Compiler
8259# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8260# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8261# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +00008262{ $as_echo "$as_me:$LINENO: checking size of int" >&5
8263$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008264if test "${ac_cv_sizeof_int+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00008265 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008266else
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 if test "$cross_compiling" = yes; then
8268 # Depending upon the size, compute the lo and hi bounds.
8269cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008270/* confdefs.h. */
8271_ACEOF
8272cat confdefs.h >>conftest.$ac_ext
8273cat >>conftest.$ac_ext <<_ACEOF
8274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008275$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008276int
8277main ()
8278{
Benjamin Petersona8332062009-09-11 22:36:27 +00008279static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008280test_array [0] = 0
8281
8282 ;
8283 return 0;
8284}
8285_ACEOF
8286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287if { (ac_try="$ac_compile"
8288case "(($ac_try" in
8289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8290 *) ac_try_echo=$ac_try;;
8291esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008292eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8293$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008294 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008296 grep -v '^ *+' conftest.er1 >conftest.err
8297 rm -f conftest.er1
8298 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008299 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008300 (exit $ac_status); } && {
8301 test -z "$ac_c_werror_flag" ||
8302 test ! -s conftest.err
8303 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008304 ac_lo=0 ac_mid=0
8305 while :; do
8306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008307/* confdefs.h. */
8308_ACEOF
8309cat confdefs.h >>conftest.$ac_ext
8310cat >>conftest.$ac_ext <<_ACEOF
8311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008312$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008313int
8314main ()
8315{
Benjamin Petersona8332062009-09-11 22:36:27 +00008316static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008317test_array [0] = 0
8318
8319 ;
8320 return 0;
8321}
8322_ACEOF
8323rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324if { (ac_try="$ac_compile"
8325case "(($ac_try" in
8326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8327 *) ac_try_echo=$ac_try;;
8328esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008329eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8330$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008333 grep -v '^ *+' conftest.er1 >conftest.err
8334 rm -f conftest.er1
8335 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008336 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008337 (exit $ac_status); } && {
8338 test -z "$ac_c_werror_flag" ||
8339 test ! -s conftest.err
8340 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008341 ac_hi=$ac_mid; break
8342else
Benjamin Petersona8332062009-09-11 22:36:27 +00008343 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008344sed 's/^/| /' conftest.$ac_ext >&5
8345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346 ac_lo=`expr $ac_mid + 1`
8347 if test $ac_lo -le $ac_mid; then
8348 ac_lo= ac_hi=
8349 break
8350 fi
8351 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353
8354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008355 done
8356else
Benjamin Petersona8332062009-09-11 22:36:27 +00008357 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008358sed 's/^/| /' conftest.$ac_ext >&5
8359
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008361/* confdefs.h. */
8362_ACEOF
8363cat confdefs.h >>conftest.$ac_ext
8364cat >>conftest.$ac_ext <<_ACEOF
8365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008366$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008367int
8368main ()
8369{
Benjamin Petersona8332062009-09-11 22:36:27 +00008370static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008371test_array [0] = 0
8372
8373 ;
8374 return 0;
8375}
8376_ACEOF
8377rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378if { (ac_try="$ac_compile"
8379case "(($ac_try" in
8380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8381 *) ac_try_echo=$ac_try;;
8382esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008383eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8384$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008387 grep -v '^ *+' conftest.er1 >conftest.err
8388 rm -f conftest.er1
8389 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008390 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391 (exit $ac_status); } && {
8392 test -z "$ac_c_werror_flag" ||
8393 test ! -s conftest.err
8394 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 ac_hi=-1 ac_mid=-1
8396 while :; do
8397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008398/* confdefs.h. */
8399_ACEOF
8400cat confdefs.h >>conftest.$ac_ext
8401cat >>conftest.$ac_ext <<_ACEOF
8402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008403$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008404int
8405main ()
8406{
Benjamin Petersona8332062009-09-11 22:36:27 +00008407static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008408test_array [0] = 0
8409
8410 ;
8411 return 0;
8412}
8413_ACEOF
8414rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415if { (ac_try="$ac_compile"
8416case "(($ac_try" in
8417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8418 *) ac_try_echo=$ac_try;;
8419esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008420eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8421$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008424 grep -v '^ *+' conftest.er1 >conftest.err
8425 rm -f conftest.er1
8426 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008427 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428 (exit $ac_status); } && {
8429 test -z "$ac_c_werror_flag" ||
8430 test ! -s conftest.err
8431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008432 ac_lo=$ac_mid; break
8433else
Benjamin Petersona8332062009-09-11 22:36:27 +00008434 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008435sed 's/^/| /' conftest.$ac_ext >&5
8436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437 ac_hi=`expr '(' $ac_mid ')' - 1`
8438 if test $ac_mid -le $ac_hi; then
8439 ac_lo= ac_hi=
8440 break
8441 fi
8442 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444
8445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008446 done
8447else
Benjamin Petersona8332062009-09-11 22:36:27 +00008448 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008449sed 's/^/| /' conftest.$ac_ext >&5
8450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008451 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453
8454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456
8457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008458# Binary search between lo and hi bounds.
8459while test "x$ac_lo" != "x$ac_hi"; do
8460 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008462/* confdefs.h. */
8463_ACEOF
8464cat confdefs.h >>conftest.$ac_ext
8465cat >>conftest.$ac_ext <<_ACEOF
8466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008467$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008468int
8469main ()
8470{
Benjamin Petersona8332062009-09-11 22:36:27 +00008471static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008472test_array [0] = 0
8473
8474 ;
8475 return 0;
8476}
8477_ACEOF
8478rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479if { (ac_try="$ac_compile"
8480case "(($ac_try" in
8481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8482 *) ac_try_echo=$ac_try;;
8483esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008484eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8485$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008488 grep -v '^ *+' conftest.er1 >conftest.err
8489 rm -f conftest.er1
8490 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008491 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 (exit $ac_status); } && {
8493 test -z "$ac_c_werror_flag" ||
8494 test ! -s conftest.err
8495 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ac_hi=$ac_mid
8497else
Benjamin Petersona8332062009-09-11 22:36:27 +00008498 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008499sed 's/^/| /' conftest.$ac_ext >&5
8500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503
8504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008505done
8506case $ac_lo in
8507?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508'') if test "$ac_cv_type_int" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +00008509 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8511{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008512See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008513$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008514See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +00008515 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008516 else
8517 ac_cv_sizeof_int=0
8518 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008519esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008520else
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008522/* confdefs.h. */
8523_ACEOF
8524cat confdefs.h >>conftest.$ac_ext
8525cat >>conftest.$ac_ext <<_ACEOF
8526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008527$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +00008528static long int longval () { return (long int) (sizeof (int)); }
8529static unsigned long int ulongval () { return (long int) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008530#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008531#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008532int
8533main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008534{
Martin v. Löwis11437992002-04-12 09:54:03 +00008535
8536 FILE *f = fopen ("conftest.val", "w");
8537 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00008539 if (((long int) (sizeof (int))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008540 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +00008542 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00008544 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 }
8546 else
8547 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +00008549 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00008551 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 }
Benjamin Petersona8332062009-09-11 22:36:27 +00008553 /* Do not output a trailing newline, as this causes \r\n confusion
8554 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008555 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008556
8557 ;
8558 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008559}
Martin v. Löwis11437992002-04-12 09:54:03 +00008560_ACEOF
8561rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562if { (ac_try="$ac_link"
8563case "(($ac_try" in
8564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8565 *) ac_try_echo=$ac_try;;
8566esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008567eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8568$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00008571 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 { (case "(($ac_try" in
8574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8575 *) ac_try_echo=$ac_try;;
8576esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008577eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8578$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00008581 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 (exit $ac_status); }; }; then
8583 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008584else
Benjamin Petersona8332062009-09-11 22:36:27 +00008585 $as_echo "$as_me: program exited with status $ac_status" >&5
8586$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008587sed 's/^/| /' conftest.$ac_ext >&5
8588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008590if test "$ac_cv_type_int" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +00008591 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8593{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008594See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008595$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008596See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +00008597 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598 else
8599 ac_cv_sizeof_int=0
8600 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008601fi
Benjamin Petersona8332062009-09-11 22:36:27 +00008602rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603rm -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 +00008604fi
8605rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008606fi
Benjamin Petersona8332062009-09-11 22:36:27 +00008607{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8608$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609
8610
8611
Martin v. Löwis11437992002-04-12 09:54:03 +00008612cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008613#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008614_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008615
8616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617# The cast to long int works around a bug in the HP C Compiler
8618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8620# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +00008621{ $as_echo "$as_me:$LINENO: checking size of long" >&5
8622$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008623if test "${ac_cv_sizeof_long+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00008624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008625else
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 if test "$cross_compiling" = yes; then
8627 # Depending upon the size, compute the lo and hi bounds.
8628cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008629/* confdefs.h. */
8630_ACEOF
8631cat confdefs.h >>conftest.$ac_ext
8632cat >>conftest.$ac_ext <<_ACEOF
8633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008634$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008635int
8636main ()
8637{
Benjamin Petersona8332062009-09-11 22:36:27 +00008638static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008639test_array [0] = 0
8640
8641 ;
8642 return 0;
8643}
8644_ACEOF
8645rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646if { (ac_try="$ac_compile"
8647case "(($ac_try" in
8648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8649 *) ac_try_echo=$ac_try;;
8650esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008651eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8652$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008655 grep -v '^ *+' conftest.er1 >conftest.err
8656 rm -f conftest.er1
8657 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008658 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659 (exit $ac_status); } && {
8660 test -z "$ac_c_werror_flag" ||
8661 test ! -s conftest.err
8662 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ac_lo=0 ac_mid=0
8664 while :; do
8665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008666/* confdefs.h. */
8667_ACEOF
8668cat confdefs.h >>conftest.$ac_ext
8669cat >>conftest.$ac_ext <<_ACEOF
8670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008671$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008672int
8673main ()
8674{
Benjamin Petersona8332062009-09-11 22:36:27 +00008675static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008676test_array [0] = 0
8677
8678 ;
8679 return 0;
8680}
8681_ACEOF
8682rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683if { (ac_try="$ac_compile"
8684case "(($ac_try" in
8685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8686 *) ac_try_echo=$ac_try;;
8687esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008688eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8689$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008692 grep -v '^ *+' conftest.er1 >conftest.err
8693 rm -f conftest.er1
8694 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008695 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696 (exit $ac_status); } && {
8697 test -z "$ac_c_werror_flag" ||
8698 test ! -s conftest.err
8699 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ac_hi=$ac_mid; break
8701else
Benjamin Petersona8332062009-09-11 22:36:27 +00008702 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008703sed 's/^/| /' conftest.$ac_ext >&5
8704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008705 ac_lo=`expr $ac_mid + 1`
8706 if test $ac_lo -le $ac_mid; then
8707 ac_lo= ac_hi=
8708 break
8709 fi
8710 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712
8713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 done
8715else
Benjamin Petersona8332062009-09-11 22:36:27 +00008716 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008717sed 's/^/| /' conftest.$ac_ext >&5
8718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008720/* confdefs.h. */
8721_ACEOF
8722cat confdefs.h >>conftest.$ac_ext
8723cat >>conftest.$ac_ext <<_ACEOF
8724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008725$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008726int
8727main ()
8728{
Benjamin Petersona8332062009-09-11 22:36:27 +00008729static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008730test_array [0] = 0
8731
8732 ;
8733 return 0;
8734}
8735_ACEOF
8736rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008737if { (ac_try="$ac_compile"
8738case "(($ac_try" in
8739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8740 *) ac_try_echo=$ac_try;;
8741esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008742eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8743$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008746 grep -v '^ *+' conftest.er1 >conftest.err
8747 rm -f conftest.er1
8748 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008749 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008750 (exit $ac_status); } && {
8751 test -z "$ac_c_werror_flag" ||
8752 test ! -s conftest.err
8753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ac_hi=-1 ac_mid=-1
8755 while :; do
8756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008757/* confdefs.h. */
8758_ACEOF
8759cat confdefs.h >>conftest.$ac_ext
8760cat >>conftest.$ac_ext <<_ACEOF
8761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008763int
8764main ()
8765{
Benjamin Petersona8332062009-09-11 22:36:27 +00008766static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008767test_array [0] = 0
8768
8769 ;
8770 return 0;
8771}
8772_ACEOF
8773rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008774if { (ac_try="$ac_compile"
8775case "(($ac_try" in
8776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8777 *) ac_try_echo=$ac_try;;
8778esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008779eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8780$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008783 grep -v '^ *+' conftest.er1 >conftest.err
8784 rm -f conftest.er1
8785 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008786 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787 (exit $ac_status); } && {
8788 test -z "$ac_c_werror_flag" ||
8789 test ! -s conftest.err
8790 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008791 ac_lo=$ac_mid; break
8792else
Benjamin Petersona8332062009-09-11 22:36:27 +00008793 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008794sed 's/^/| /' conftest.$ac_ext >&5
8795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008796 ac_hi=`expr '(' $ac_mid ')' - 1`
8797 if test $ac_mid -le $ac_hi; then
8798 ac_lo= ac_hi=
8799 break
8800 fi
8801 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008803
8804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 done
8806else
Benjamin Petersona8332062009-09-11 22:36:27 +00008807 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008808sed 's/^/| /' conftest.$ac_ext >&5
8809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812
8813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815
8816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008817# Binary search between lo and hi bounds.
8818while test "x$ac_lo" != "x$ac_hi"; do
8819 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008821/* confdefs.h. */
8822_ACEOF
8823cat confdefs.h >>conftest.$ac_ext
8824cat >>conftest.$ac_ext <<_ACEOF
8825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008826$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008827int
8828main ()
8829{
Benjamin Petersona8332062009-09-11 22:36:27 +00008830static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008831test_array [0] = 0
8832
8833 ;
8834 return 0;
8835}
8836_ACEOF
8837rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838if { (ac_try="$ac_compile"
8839case "(($ac_try" in
8840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8841 *) ac_try_echo=$ac_try;;
8842esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008843eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8844$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008847 grep -v '^ *+' conftest.er1 >conftest.err
8848 rm -f conftest.er1
8849 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008850 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 (exit $ac_status); } && {
8852 test -z "$ac_c_werror_flag" ||
8853 test ! -s conftest.err
8854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 ac_hi=$ac_mid
8856else
Benjamin Petersona8332062009-09-11 22:36:27 +00008857 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008858sed 's/^/| /' conftest.$ac_ext >&5
8859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008862
8863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008864done
8865case $ac_lo in
8866?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867'') if test "$ac_cv_type_long" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +00008868 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8870{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008871See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008872$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008873See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +00008874 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008875 else
8876 ac_cv_sizeof_long=0
8877 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008878esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008879else
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008881/* confdefs.h. */
8882_ACEOF
8883cat confdefs.h >>conftest.$ac_ext
8884cat >>conftest.$ac_ext <<_ACEOF
8885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008886$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +00008887static long int longval () { return (long int) (sizeof (long)); }
8888static unsigned long int ulongval () { return (long int) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008889#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008890#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008891int
8892main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008893{
Martin v. Löwis11437992002-04-12 09:54:03 +00008894
8895 FILE *f = fopen ("conftest.val", "w");
8896 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00008898 if (((long int) (sizeof (long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +00008901 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00008903 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 }
8905 else
8906 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +00008908 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008909 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00008910 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 }
Benjamin Petersona8332062009-09-11 22:36:27 +00008912 /* Do not output a trailing newline, as this causes \r\n confusion
8913 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008915
8916 ;
8917 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008918}
Martin v. Löwis11437992002-04-12 09:54:03 +00008919_ACEOF
8920rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008921if { (ac_try="$ac_link"
8922case "(($ac_try" in
8923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8924 *) ac_try_echo=$ac_try;;
8925esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008926eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8927$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00008930 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008932 { (case "(($ac_try" in
8933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8934 *) ac_try_echo=$ac_try;;
8935esac
Benjamin Petersona8332062009-09-11 22:36:27 +00008936eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8937$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00008940 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008941 (exit $ac_status); }; }; then
8942 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008943else
Benjamin Petersona8332062009-09-11 22:36:27 +00008944 $as_echo "$as_me: program exited with status $ac_status" >&5
8945$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008946sed 's/^/| /' conftest.$ac_ext >&5
8947
Martin v. Löwis11437992002-04-12 09:54:03 +00008948( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949if test "$ac_cv_type_long" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +00008950 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8952{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008953See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008954$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008955See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +00008956 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008957 else
8958 ac_cv_sizeof_long=0
8959 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008960fi
Benjamin Petersona8332062009-09-11 22:36:27 +00008961rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008962rm -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 +00008963fi
8964rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008965fi
Benjamin Petersona8332062009-09-11 22:36:27 +00008966{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8967$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008968
8969
8970
Martin v. Löwis11437992002-04-12 09:54:03 +00008971cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008972#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008973_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008974
8975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976# The cast to long int works around a bug in the HP C Compiler
8977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8979# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +00008980{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
8981$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008982if test "${ac_cv_sizeof_void_p+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00008983 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008984else
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 if test "$cross_compiling" = yes; then
8986 # Depending upon the size, compute the lo and hi bounds.
8987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008988/* confdefs.h. */
8989_ACEOF
8990cat confdefs.h >>conftest.$ac_ext
8991cat >>conftest.$ac_ext <<_ACEOF
8992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008993$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008994int
8995main ()
8996{
Benjamin Petersona8332062009-09-11 22:36:27 +00008997static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008998test_array [0] = 0
8999
9000 ;
9001 return 0;
9002}
9003_ACEOF
9004rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009005if { (ac_try="$ac_compile"
9006case "(($ac_try" in
9007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9008 *) ac_try_echo=$ac_try;;
9009esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009010eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9011$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009014 grep -v '^ *+' conftest.er1 >conftest.err
9015 rm -f conftest.er1
9016 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009017 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009018 (exit $ac_status); } && {
9019 test -z "$ac_c_werror_flag" ||
9020 test ! -s conftest.err
9021 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 ac_lo=0 ac_mid=0
9023 while :; do
9024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* confdefs.h. */
9026_ACEOF
9027cat confdefs.h >>conftest.$ac_ext
9028cat >>conftest.$ac_ext <<_ACEOF
9029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009030$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009031int
9032main ()
9033{
Benjamin Petersona8332062009-09-11 22:36:27 +00009034static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009035test_array [0] = 0
9036
9037 ;
9038 return 0;
9039}
9040_ACEOF
9041rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009042if { (ac_try="$ac_compile"
9043case "(($ac_try" in
9044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9045 *) ac_try_echo=$ac_try;;
9046esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009047eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9048$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009051 grep -v '^ *+' conftest.er1 >conftest.err
9052 rm -f conftest.er1
9053 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009054 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055 (exit $ac_status); } && {
9056 test -z "$ac_c_werror_flag" ||
9057 test ! -s conftest.err
9058 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 ac_hi=$ac_mid; break
9060else
Benjamin Petersona8332062009-09-11 22:36:27 +00009061 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009062sed 's/^/| /' conftest.$ac_ext >&5
9063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009064 ac_lo=`expr $ac_mid + 1`
9065 if test $ac_lo -le $ac_mid; then
9066 ac_lo= ac_hi=
9067 break
9068 fi
9069 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009071
9072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 done
9074else
Benjamin Petersona8332062009-09-11 22:36:27 +00009075 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009076sed 's/^/| /' conftest.$ac_ext >&5
9077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009078 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009079/* confdefs.h. */
9080_ACEOF
9081cat confdefs.h >>conftest.$ac_ext
9082cat >>conftest.$ac_ext <<_ACEOF
9083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009084$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009085int
9086main ()
9087{
Benjamin Petersona8332062009-09-11 22:36:27 +00009088static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009089test_array [0] = 0
9090
9091 ;
9092 return 0;
9093}
9094_ACEOF
9095rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009096if { (ac_try="$ac_compile"
9097case "(($ac_try" in
9098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9099 *) ac_try_echo=$ac_try;;
9100esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009101eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9102$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009105 grep -v '^ *+' conftest.er1 >conftest.err
9106 rm -f conftest.er1
9107 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009108 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009109 (exit $ac_status); } && {
9110 test -z "$ac_c_werror_flag" ||
9111 test ! -s conftest.err
9112 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 ac_hi=-1 ac_mid=-1
9114 while :; do
9115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009116/* confdefs.h. */
9117_ACEOF
9118cat confdefs.h >>conftest.$ac_ext
9119cat >>conftest.$ac_ext <<_ACEOF
9120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009121$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009122int
9123main ()
9124{
Benjamin Petersona8332062009-09-11 22:36:27 +00009125static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009126test_array [0] = 0
9127
9128 ;
9129 return 0;
9130}
9131_ACEOF
9132rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009133if { (ac_try="$ac_compile"
9134case "(($ac_try" in
9135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9136 *) ac_try_echo=$ac_try;;
9137esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009138eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9139$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009142 grep -v '^ *+' conftest.er1 >conftest.err
9143 rm -f conftest.er1
9144 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009145 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009146 (exit $ac_status); } && {
9147 test -z "$ac_c_werror_flag" ||
9148 test ! -s conftest.err
9149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 ac_lo=$ac_mid; break
9151else
Benjamin Petersona8332062009-09-11 22:36:27 +00009152 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009153sed 's/^/| /' conftest.$ac_ext >&5
9154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009155 ac_hi=`expr '(' $ac_mid ')' - 1`
9156 if test $ac_mid -le $ac_hi; then
9157 ac_lo= ac_hi=
9158 break
9159 fi
9160 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162
9163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 done
9165else
Benjamin Petersona8332062009-09-11 22:36:27 +00009166 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009167sed 's/^/| /' conftest.$ac_ext >&5
9168
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009171
9172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009174
9175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009176# Binary search between lo and hi bounds.
9177while test "x$ac_lo" != "x$ac_hi"; do
9178 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009180/* confdefs.h. */
9181_ACEOF
9182cat confdefs.h >>conftest.$ac_ext
9183cat >>conftest.$ac_ext <<_ACEOF
9184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009185$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009186int
9187main ()
9188{
Benjamin Petersona8332062009-09-11 22:36:27 +00009189static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009190test_array [0] = 0
9191
9192 ;
9193 return 0;
9194}
9195_ACEOF
9196rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009197if { (ac_try="$ac_compile"
9198case "(($ac_try" in
9199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9200 *) ac_try_echo=$ac_try;;
9201esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009202eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9203$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009206 grep -v '^ *+' conftest.er1 >conftest.err
9207 rm -f conftest.er1
9208 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009209 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009210 (exit $ac_status); } && {
9211 test -z "$ac_c_werror_flag" ||
9212 test ! -s conftest.err
9213 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 ac_hi=$ac_mid
9215else
Benjamin Petersona8332062009-09-11 22:36:27 +00009216 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009217sed 's/^/| /' conftest.$ac_ext >&5
9218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009219 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009221
9222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009223done
9224case $ac_lo in
9225?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226'') if test "$ac_cv_type_void_p" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +00009227 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9229{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009230See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009231$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009232See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +00009233 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234 else
9235 ac_cv_sizeof_void_p=0
9236 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009237esac
Guido van Rossumad678af1998-10-02 14:42:15 +00009238else
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009240/* confdefs.h. */
9241_ACEOF
9242cat confdefs.h >>conftest.$ac_ext
9243cat >>conftest.$ac_ext <<_ACEOF
9244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009245$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +00009246static long int longval () { return (long int) (sizeof (void *)); }
9247static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009248#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009249#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009250int
9251main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00009252{
Martin v. Löwis11437992002-04-12 09:54:03 +00009253
9254 FILE *f = fopen ("conftest.val", "w");
9255 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00009257 if (((long int) (sizeof (void *))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009258 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +00009260 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00009262 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 }
9264 else
9265 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009266 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +00009267 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00009269 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 }
Benjamin Petersona8332062009-09-11 22:36:27 +00009271 /* Do not output a trailing newline, as this causes \r\n confusion
9272 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009274
9275 ;
9276 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00009277}
Martin v. Löwis11437992002-04-12 09:54:03 +00009278_ACEOF
9279rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009280if { (ac_try="$ac_link"
9281case "(($ac_try" in
9282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9283 *) ac_try_echo=$ac_try;;
9284esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009285eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9286$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009287 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00009289 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009291 { (case "(($ac_try" in
9292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9293 *) ac_try_echo=$ac_try;;
9294esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009295eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9296$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009297 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00009299 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 (exit $ac_status); }; }; then
9301 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00009302else
Benjamin Petersona8332062009-09-11 22:36:27 +00009303 $as_echo "$as_me: program exited with status $ac_status" >&5
9304$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009305sed 's/^/| /' conftest.$ac_ext >&5
9306
Martin v. Löwis11437992002-04-12 09:54:03 +00009307( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308if test "$ac_cv_type_void_p" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +00009309 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9310$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9311{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009312See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009313$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009314See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +00009315 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009316 else
9317 ac_cv_sizeof_void_p=0
9318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009319fi
Benjamin Petersona8332062009-09-11 22:36:27 +00009320rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321rm -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 +00009322fi
9323rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00009324fi
Benjamin Petersona8332062009-09-11 22:36:27 +00009325{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
9326$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009327
9328
9329
Martin v. Löwis11437992002-04-12 09:54:03 +00009330cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009331#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00009332_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009333
9334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009335# The cast to long int works around a bug in the HP C Compiler
9336# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9337# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9338# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +00009339{ $as_echo "$as_me:$LINENO: checking size of short" >&5
9340$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009341if test "${ac_cv_sizeof_short+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00009342 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009343else
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 if test "$cross_compiling" = yes; then
9345 # Depending upon the size, compute the lo and hi bounds.
9346cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009347/* confdefs.h. */
9348_ACEOF
9349cat confdefs.h >>conftest.$ac_ext
9350cat >>conftest.$ac_ext <<_ACEOF
9351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009352$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009353int
9354main ()
9355{
Benjamin Petersona8332062009-09-11 22:36:27 +00009356static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009357test_array [0] = 0
9358
9359 ;
9360 return 0;
9361}
9362_ACEOF
9363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364if { (ac_try="$ac_compile"
9365case "(($ac_try" in
9366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9367 *) ac_try_echo=$ac_try;;
9368esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009369eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9370$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009373 grep -v '^ *+' conftest.er1 >conftest.err
9374 rm -f conftest.er1
9375 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009376 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377 (exit $ac_status); } && {
9378 test -z "$ac_c_werror_flag" ||
9379 test ! -s conftest.err
9380 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_lo=0 ac_mid=0
9382 while :; do
9383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009384/* confdefs.h. */
9385_ACEOF
9386cat confdefs.h >>conftest.$ac_ext
9387cat >>conftest.$ac_ext <<_ACEOF
9388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009389$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009390int
9391main ()
9392{
Benjamin Petersona8332062009-09-11 22:36:27 +00009393static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009394test_array [0] = 0
9395
9396 ;
9397 return 0;
9398}
9399_ACEOF
9400rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401if { (ac_try="$ac_compile"
9402case "(($ac_try" in
9403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9404 *) ac_try_echo=$ac_try;;
9405esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009406eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9407$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009410 grep -v '^ *+' conftest.er1 >conftest.err
9411 rm -f conftest.er1
9412 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009413 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414 (exit $ac_status); } && {
9415 test -z "$ac_c_werror_flag" ||
9416 test ! -s conftest.err
9417 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 ac_hi=$ac_mid; break
9419else
Benjamin Petersona8332062009-09-11 22:36:27 +00009420 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009421sed 's/^/| /' conftest.$ac_ext >&5
9422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423 ac_lo=`expr $ac_mid + 1`
9424 if test $ac_lo -le $ac_mid; then
9425 ac_lo= ac_hi=
9426 break
9427 fi
9428 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430
9431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 done
9433else
Benjamin Petersona8332062009-09-11 22:36:27 +00009434 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009435sed 's/^/| /' conftest.$ac_ext >&5
9436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009438/* confdefs.h. */
9439_ACEOF
9440cat confdefs.h >>conftest.$ac_ext
9441cat >>conftest.$ac_ext <<_ACEOF
9442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009443$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009444int
9445main ()
9446{
Benjamin Petersona8332062009-09-11 22:36:27 +00009447static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009448test_array [0] = 0
9449
9450 ;
9451 return 0;
9452}
9453_ACEOF
9454rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455if { (ac_try="$ac_compile"
9456case "(($ac_try" in
9457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9458 *) ac_try_echo=$ac_try;;
9459esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009460eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9461$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009464 grep -v '^ *+' conftest.er1 >conftest.err
9465 rm -f conftest.er1
9466 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009467 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009468 (exit $ac_status); } && {
9469 test -z "$ac_c_werror_flag" ||
9470 test ! -s conftest.err
9471 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009472 ac_hi=-1 ac_mid=-1
9473 while :; do
9474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009475/* confdefs.h. */
9476_ACEOF
9477cat confdefs.h >>conftest.$ac_ext
9478cat >>conftest.$ac_ext <<_ACEOF
9479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009480$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009481int
9482main ()
9483{
Benjamin Petersona8332062009-09-11 22:36:27 +00009484static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009485test_array [0] = 0
9486
9487 ;
9488 return 0;
9489}
9490_ACEOF
9491rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492if { (ac_try="$ac_compile"
9493case "(($ac_try" in
9494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9495 *) ac_try_echo=$ac_try;;
9496esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009497eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9498$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009501 grep -v '^ *+' conftest.er1 >conftest.err
9502 rm -f conftest.er1
9503 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009504 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505 (exit $ac_status); } && {
9506 test -z "$ac_c_werror_flag" ||
9507 test ! -s conftest.err
9508 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_lo=$ac_mid; break
9510else
Benjamin Petersona8332062009-09-11 22:36:27 +00009511 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009512sed 's/^/| /' conftest.$ac_ext >&5
9513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514 ac_hi=`expr '(' $ac_mid ')' - 1`
9515 if test $ac_mid -le $ac_hi; then
9516 ac_lo= ac_hi=
9517 break
9518 fi
9519 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521
9522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 done
9524else
Benjamin Petersona8332062009-09-11 22:36:27 +00009525 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009526sed 's/^/| /' conftest.$ac_ext >&5
9527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530
9531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009533
9534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009535# Binary search between lo and hi bounds.
9536while test "x$ac_lo" != "x$ac_hi"; do
9537 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9538 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009539/* confdefs.h. */
9540_ACEOF
9541cat confdefs.h >>conftest.$ac_ext
9542cat >>conftest.$ac_ext <<_ACEOF
9543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009544$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009545int
9546main ()
9547{
Benjamin Petersona8332062009-09-11 22:36:27 +00009548static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009549test_array [0] = 0
9550
9551 ;
9552 return 0;
9553}
9554_ACEOF
9555rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556if { (ac_try="$ac_compile"
9557case "(($ac_try" in
9558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9559 *) ac_try_echo=$ac_try;;
9560esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009561eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9562$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009565 grep -v '^ *+' conftest.er1 >conftest.err
9566 rm -f conftest.er1
9567 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009568 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569 (exit $ac_status); } && {
9570 test -z "$ac_c_werror_flag" ||
9571 test ! -s conftest.err
9572 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_hi=$ac_mid
9574else
Benjamin Petersona8332062009-09-11 22:36:27 +00009575 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009576sed 's/^/| /' conftest.$ac_ext >&5
9577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580
9581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009582done
9583case $ac_lo in
9584?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585'') if test "$ac_cv_type_short" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +00009586 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9587$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9588{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009589See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009590$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009591See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +00009592 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593 else
9594 ac_cv_sizeof_short=0
9595 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009596esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009597else
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* confdefs.h. */
9600_ACEOF
9601cat confdefs.h >>conftest.$ac_ext
9602cat >>conftest.$ac_ext <<_ACEOF
9603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009604$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +00009605static long int longval () { return (long int) (sizeof (short)); }
9606static unsigned long int ulongval () { return (long int) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009607#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009608#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009609int
9610main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009611{
Martin v. Löwis11437992002-04-12 09:54:03 +00009612
9613 FILE *f = fopen ("conftest.val", "w");
9614 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00009616 if (((long int) (sizeof (short))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +00009619 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00009621 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 }
9623 else
9624 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009625 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +00009626 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00009628 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 }
Benjamin Petersona8332062009-09-11 22:36:27 +00009630 /* Do not output a trailing newline, as this causes \r\n confusion
9631 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009633
9634 ;
9635 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009636}
Martin v. Löwis11437992002-04-12 09:54:03 +00009637_ACEOF
9638rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639if { (ac_try="$ac_link"
9640case "(($ac_try" in
9641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9642 *) ac_try_echo=$ac_try;;
9643esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009644eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9645$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00009648 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009650 { (case "(($ac_try" in
9651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9652 *) ac_try_echo=$ac_try;;
9653esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009654eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9655$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009656 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +00009658 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 (exit $ac_status); }; }; then
9660 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009661else
Benjamin Petersona8332062009-09-11 22:36:27 +00009662 $as_echo "$as_me: program exited with status $ac_status" >&5
9663$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009664sed 's/^/| /' conftest.$ac_ext >&5
9665
Martin v. Löwis11437992002-04-12 09:54:03 +00009666( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667if test "$ac_cv_type_short" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +00009668 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9670{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009671See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009672$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009673See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +00009674 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675 else
9676 ac_cv_sizeof_short=0
9677 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009678fi
Benjamin Petersona8332062009-09-11 22:36:27 +00009679rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680rm -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 +00009681fi
9682rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009683fi
Benjamin Petersona8332062009-09-11 22:36:27 +00009684{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9685$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686
9687
9688
Martin v. Löwis11437992002-04-12 09:54:03 +00009689cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009690#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009691_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009692
9693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009694# The cast to long int works around a bug in the HP C Compiler
9695# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9696# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9697# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +00009698{ $as_echo "$as_me:$LINENO: checking size of float" >&5
9699$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009700if test "${ac_cv_sizeof_float+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +00009701 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009702else
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 if test "$cross_compiling" = yes; then
9704 # Depending upon the size, compute the lo and hi bounds.
9705cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009706/* confdefs.h. */
9707_ACEOF
9708cat confdefs.h >>conftest.$ac_ext
9709cat >>conftest.$ac_ext <<_ACEOF
9710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009711$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009712int
9713main ()
9714{
Benjamin Petersona8332062009-09-11 22:36:27 +00009715static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009716test_array [0] = 0
9717
9718 ;
9719 return 0;
9720}
9721_ACEOF
9722rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723if { (ac_try="$ac_compile"
9724case "(($ac_try" in
9725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9726 *) ac_try_echo=$ac_try;;
9727esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009728eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9729$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009732 grep -v '^ *+' conftest.er1 >conftest.err
9733 rm -f conftest.er1
9734 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009735 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736 (exit $ac_status); } && {
9737 test -z "$ac_c_werror_flag" ||
9738 test ! -s conftest.err
9739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ac_lo=0 ac_mid=0
9741 while :; do
9742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009743/* confdefs.h. */
9744_ACEOF
9745cat confdefs.h >>conftest.$ac_ext
9746cat >>conftest.$ac_ext <<_ACEOF
9747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009748$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009749int
9750main ()
9751{
Benjamin Petersona8332062009-09-11 22:36:27 +00009752static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009753test_array [0] = 0
9754
9755 ;
9756 return 0;
9757}
9758_ACEOF
9759rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009760if { (ac_try="$ac_compile"
9761case "(($ac_try" in
9762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9763 *) ac_try_echo=$ac_try;;
9764esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009765eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9766$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009769 grep -v '^ *+' conftest.er1 >conftest.err
9770 rm -f conftest.er1
9771 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009772 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773 (exit $ac_status); } && {
9774 test -z "$ac_c_werror_flag" ||
9775 test ! -s conftest.err
9776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_hi=$ac_mid; break
9778else
Benjamin Petersona8332062009-09-11 22:36:27 +00009779 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009780sed 's/^/| /' conftest.$ac_ext >&5
9781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782 ac_lo=`expr $ac_mid + 1`
9783 if test $ac_lo -le $ac_mid; then
9784 ac_lo= ac_hi=
9785 break
9786 fi
9787 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009789
9790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 done
9792else
Benjamin Petersona8332062009-09-11 22:36:27 +00009793 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009794sed 's/^/| /' conftest.$ac_ext >&5
9795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009797/* confdefs.h. */
9798_ACEOF
9799cat confdefs.h >>conftest.$ac_ext
9800cat >>conftest.$ac_ext <<_ACEOF
9801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009802$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
9805{
Benjamin Petersona8332062009-09-11 22:36:27 +00009806static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009807test_array [0] = 0
9808
9809 ;
9810 return 0;
9811}
9812_ACEOF
9813rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814if { (ac_try="$ac_compile"
9815case "(($ac_try" in
9816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9817 *) ac_try_echo=$ac_try;;
9818esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009819eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9820$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009823 grep -v '^ *+' conftest.er1 >conftest.err
9824 rm -f conftest.er1
9825 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009826 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827 (exit $ac_status); } && {
9828 test -z "$ac_c_werror_flag" ||
9829 test ! -s conftest.err
9830 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 ac_hi=-1 ac_mid=-1
9832 while :; do
9833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009834/* confdefs.h. */
9835_ACEOF
9836cat confdefs.h >>conftest.$ac_ext
9837cat >>conftest.$ac_ext <<_ACEOF
9838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009839$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009840int
9841main ()
9842{
Benjamin Petersona8332062009-09-11 22:36:27 +00009843static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009844test_array [0] = 0
9845
9846 ;
9847 return 0;
9848}
9849_ACEOF
9850rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009851if { (ac_try="$ac_compile"
9852case "(($ac_try" in
9853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9854 *) ac_try_echo=$ac_try;;
9855esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009856eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9857$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009860 grep -v '^ *+' conftest.er1 >conftest.err
9861 rm -f conftest.er1
9862 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009863 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864 (exit $ac_status); } && {
9865 test -z "$ac_c_werror_flag" ||
9866 test ! -s conftest.err
9867 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 ac_lo=$ac_mid; break
9869else
Benjamin Petersona8332062009-09-11 22:36:27 +00009870 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009871sed 's/^/| /' conftest.$ac_ext >&5
9872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873 ac_hi=`expr '(' $ac_mid ')' - 1`
9874 if test $ac_mid -le $ac_hi; then
9875 ac_lo= ac_hi=
9876 break
9877 fi
9878 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880
9881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 done
9883else
Benjamin Petersona8332062009-09-11 22:36:27 +00009884 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009885sed 's/^/| /' conftest.$ac_ext >&5
9886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889
9890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892
9893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009894# Binary search between lo and hi bounds.
9895while test "x$ac_lo" != "x$ac_hi"; do
9896 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009898/* confdefs.h. */
9899_ACEOF
9900cat confdefs.h >>conftest.$ac_ext
9901cat >>conftest.$ac_ext <<_ACEOF
9902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009903$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009904int
9905main ()
9906{
Benjamin Petersona8332062009-09-11 22:36:27 +00009907static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009908test_array [0] = 0
9909
9910 ;
9911 return 0;
9912}
9913_ACEOF
9914rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915if { (ac_try="$ac_compile"
9916case "(($ac_try" in
9917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9918 *) ac_try_echo=$ac_try;;
9919esac
Benjamin Petersona8332062009-09-11 22:36:27 +00009920eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9921$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009924 grep -v '^ *+' conftest.er1 >conftest.err
9925 rm -f conftest.er1
9926 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009927 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928 (exit $ac_status); } && {
9929 test -z "$ac_c_werror_flag" ||
9930 test ! -s conftest.err
9931 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009932 ac_hi=$ac_mid
9933else
Benjamin Petersona8332062009-09-11 22:36:27 +00009934 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009935sed 's/^/| /' conftest.$ac_ext >&5
9936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009937 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939
9940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009941done
9942case $ac_lo in
9943?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944'') if test "$ac_cv_type_float" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +00009945 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9946$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9947{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009948See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00009949$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009950See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +00009951 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009952 else
9953 ac_cv_sizeof_float=0
9954 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009955esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009956else
Martin v. Löwis11437992002-04-12 09:54:03 +00009957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009958/* confdefs.h. */
9959_ACEOF
9960cat confdefs.h >>conftest.$ac_ext
9961cat >>conftest.$ac_ext <<_ACEOF
9962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009963$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +00009964static long int longval () { return (long int) (sizeof (float)); }
9965static unsigned long int ulongval () { return (long int) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009966#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009967#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009968int
9969main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009970{
Martin v. Löwis11437992002-04-12 09:54:03 +00009971
9972 FILE *f = fopen ("conftest.val", "w");
9973 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009974 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00009975 if (((long int) (sizeof (float))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +00009978 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009979 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00009980 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 }
9982 else
9983 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +00009985 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +00009987 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 }
Benjamin Petersona8332062009-09-11 22:36:27 +00009989 /* Do not output a trailing newline, as this causes \r\n confusion
9990 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009991 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009992
9993 ;
9994 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009995}
Martin v. Löwis11437992002-04-12 09:54:03 +00009996_ACEOF
9997rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009998if { (ac_try="$ac_link"
9999case "(($ac_try" in
10000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10001 *) ac_try_echo=$ac_try;;
10002esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010003eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10004$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010006 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000010007 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010008 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009 { (case "(($ac_try" in
10010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10011 *) ac_try_echo=$ac_try;;
10012esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010013eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10014$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000010017 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010018 (exit $ac_status); }; }; then
10019 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010020else
Benjamin Petersona8332062009-09-11 22:36:27 +000010021 $as_echo "$as_me: program exited with status $ac_status" >&5
10022$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010023sed 's/^/| /' conftest.$ac_ext >&5
10024
Martin v. Löwis11437992002-04-12 09:54:03 +000010025( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010026if test "$ac_cv_type_float" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000010027 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10029{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010030See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010031$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010032See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000010033 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010034 else
10035 ac_cv_sizeof_float=0
10036 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010037fi
Benjamin Petersona8332062009-09-11 22:36:27 +000010038rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039rm -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 +000010040fi
10041rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010042fi
Benjamin Petersona8332062009-09-11 22:36:27 +000010043{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
10044$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010045
10046
10047
Martin v. Löwis11437992002-04-12 09:54:03 +000010048cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010049#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +000010050_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010051
10052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010053# The cast to long int works around a bug in the HP C Compiler
10054# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10055# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10056# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +000010057{ $as_echo "$as_me:$LINENO: checking size of double" >&5
10058$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010059if test "${ac_cv_sizeof_double+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000010060 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010061else
Martin v. Löwis11437992002-04-12 09:54:03 +000010062 if test "$cross_compiling" = yes; then
10063 # Depending upon the size, compute the lo and hi bounds.
10064cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010065/* confdefs.h. */
10066_ACEOF
10067cat confdefs.h >>conftest.$ac_ext
10068cat >>conftest.$ac_ext <<_ACEOF
10069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010070$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010071int
10072main ()
10073{
Benjamin Petersona8332062009-09-11 22:36:27 +000010074static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010075test_array [0] = 0
10076
10077 ;
10078 return 0;
10079}
10080_ACEOF
10081rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010082if { (ac_try="$ac_compile"
10083case "(($ac_try" in
10084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10085 *) ac_try_echo=$ac_try;;
10086esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010087eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10088$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010089 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010091 grep -v '^ *+' conftest.er1 >conftest.err
10092 rm -f conftest.er1
10093 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010094 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095 (exit $ac_status); } && {
10096 test -z "$ac_c_werror_flag" ||
10097 test ! -s conftest.err
10098 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 ac_lo=0 ac_mid=0
10100 while :; do
10101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010102/* confdefs.h. */
10103_ACEOF
10104cat confdefs.h >>conftest.$ac_ext
10105cat >>conftest.$ac_ext <<_ACEOF
10106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010107$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010108int
10109main ()
10110{
Benjamin Petersona8332062009-09-11 22:36:27 +000010111static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010112test_array [0] = 0
10113
10114 ;
10115 return 0;
10116}
10117_ACEOF
10118rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119if { (ac_try="$ac_compile"
10120case "(($ac_try" in
10121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10122 *) ac_try_echo=$ac_try;;
10123esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010124eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10125$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010126 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010128 grep -v '^ *+' conftest.er1 >conftest.err
10129 rm -f conftest.er1
10130 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010131 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132 (exit $ac_status); } && {
10133 test -z "$ac_c_werror_flag" ||
10134 test ! -s conftest.err
10135 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ac_hi=$ac_mid; break
10137else
Benjamin Petersona8332062009-09-11 22:36:27 +000010138 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010139sed 's/^/| /' conftest.$ac_ext >&5
10140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141 ac_lo=`expr $ac_mid + 1`
10142 if test $ac_lo -le $ac_mid; then
10143 ac_lo= ac_hi=
10144 break
10145 fi
10146 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010148
10149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 done
10151else
Benjamin Petersona8332062009-09-11 22:36:27 +000010152 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010153sed 's/^/| /' conftest.$ac_ext >&5
10154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010156/* confdefs.h. */
10157_ACEOF
10158cat confdefs.h >>conftest.$ac_ext
10159cat >>conftest.$ac_ext <<_ACEOF
10160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010161$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010162int
10163main ()
10164{
Benjamin Petersona8332062009-09-11 22:36:27 +000010165static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010166test_array [0] = 0
10167
10168 ;
10169 return 0;
10170}
10171_ACEOF
10172rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010173if { (ac_try="$ac_compile"
10174case "(($ac_try" in
10175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10176 *) ac_try_echo=$ac_try;;
10177esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010178eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10179$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010182 grep -v '^ *+' conftest.er1 >conftest.err
10183 rm -f conftest.er1
10184 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010185 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186 (exit $ac_status); } && {
10187 test -z "$ac_c_werror_flag" ||
10188 test ! -s conftest.err
10189 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 ac_hi=-1 ac_mid=-1
10191 while :; do
10192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010193/* confdefs.h. */
10194_ACEOF
10195cat confdefs.h >>conftest.$ac_ext
10196cat >>conftest.$ac_ext <<_ACEOF
10197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010198$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010199int
10200main ()
10201{
Benjamin Petersona8332062009-09-11 22:36:27 +000010202static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010203test_array [0] = 0
10204
10205 ;
10206 return 0;
10207}
10208_ACEOF
10209rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210if { (ac_try="$ac_compile"
10211case "(($ac_try" in
10212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10213 *) ac_try_echo=$ac_try;;
10214esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010215eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10216$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010219 grep -v '^ *+' conftest.er1 >conftest.err
10220 rm -f conftest.er1
10221 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010222 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223 (exit $ac_status); } && {
10224 test -z "$ac_c_werror_flag" ||
10225 test ! -s conftest.err
10226 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 ac_lo=$ac_mid; break
10228else
Benjamin Petersona8332062009-09-11 22:36:27 +000010229 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010230sed 's/^/| /' conftest.$ac_ext >&5
10231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232 ac_hi=`expr '(' $ac_mid ')' - 1`
10233 if test $ac_mid -le $ac_hi; then
10234 ac_lo= ac_hi=
10235 break
10236 fi
10237 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239
10240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 done
10242else
Benjamin Petersona8332062009-09-11 22:36:27 +000010243 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010244sed 's/^/| /' conftest.$ac_ext >&5
10245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010246 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248
10249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251
10252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010253# Binary search between lo and hi bounds.
10254while test "x$ac_lo" != "x$ac_hi"; do
10255 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010257/* confdefs.h. */
10258_ACEOF
10259cat confdefs.h >>conftest.$ac_ext
10260cat >>conftest.$ac_ext <<_ACEOF
10261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010262$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010263int
10264main ()
10265{
Benjamin Petersona8332062009-09-11 22:36:27 +000010266static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010267test_array [0] = 0
10268
10269 ;
10270 return 0;
10271}
10272_ACEOF
10273rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010274if { (ac_try="$ac_compile"
10275case "(($ac_try" in
10276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10277 *) ac_try_echo=$ac_try;;
10278esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010279eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10280$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010283 grep -v '^ *+' conftest.er1 >conftest.err
10284 rm -f conftest.er1
10285 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010286 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287 (exit $ac_status); } && {
10288 test -z "$ac_c_werror_flag" ||
10289 test ! -s conftest.err
10290 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ac_hi=$ac_mid
10292else
Benjamin Petersona8332062009-09-11 22:36:27 +000010293 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010294sed 's/^/| /' conftest.$ac_ext >&5
10295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010298
10299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010300done
10301case $ac_lo in
10302?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303'') if test "$ac_cv_type_double" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000010304 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10306{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010307See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010308$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010309See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000010310 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311 else
10312 ac_cv_sizeof_double=0
10313 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010314esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000010315else
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* confdefs.h. */
10318_ACEOF
10319cat confdefs.h >>conftest.$ac_ext
10320cat >>conftest.$ac_ext <<_ACEOF
10321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010322$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +000010323static long int longval () { return (long int) (sizeof (double)); }
10324static unsigned long int ulongval () { return (long int) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010325#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010326#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010327int
10328main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +000010329{
Martin v. Löwis11437992002-04-12 09:54:03 +000010330
10331 FILE *f = fopen ("conftest.val", "w");
10332 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000010334 if (((long int) (sizeof (double))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000010337 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000010339 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 }
10341 else
10342 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000010344 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010345 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000010346 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 }
Benjamin Petersona8332062009-09-11 22:36:27 +000010348 /* Do not output a trailing newline, as this causes \r\n confusion
10349 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010351
10352 ;
10353 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010354}
Martin v. Löwis11437992002-04-12 09:54:03 +000010355_ACEOF
10356rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357if { (ac_try="$ac_link"
10358case "(($ac_try" in
10359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10360 *) ac_try_echo=$ac_try;;
10361esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010362eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10363$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000010366 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368 { (case "(($ac_try" in
10369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10370 *) ac_try_echo=$ac_try;;
10371esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010372eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10373$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010374 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000010376 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 (exit $ac_status); }; }; then
10378 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010379else
Benjamin Petersona8332062009-09-11 22:36:27 +000010380 $as_echo "$as_me: program exited with status $ac_status" >&5
10381$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010382sed 's/^/| /' conftest.$ac_ext >&5
10383
Martin v. Löwis11437992002-04-12 09:54:03 +000010384( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385if test "$ac_cv_type_double" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000010386 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10388{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010389See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010390$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010391See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000010392 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010393 else
10394 ac_cv_sizeof_double=0
10395 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010396fi
Benjamin Petersona8332062009-09-11 22:36:27 +000010397rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398rm -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 +000010399fi
10400rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010401fi
Benjamin Petersona8332062009-09-11 22:36:27 +000010402{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10403$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404
10405
10406
Martin v. Löwis11437992002-04-12 09:54:03 +000010407cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010408#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010409_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010410
10411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010412# The cast to long int works around a bug in the HP C Compiler
10413# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10414# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10415# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +000010416{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5
10417$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010418if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000010419 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010420else
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 if test "$cross_compiling" = yes; then
10422 # Depending upon the size, compute the lo and hi bounds.
10423cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010424/* confdefs.h. */
10425_ACEOF
10426cat confdefs.h >>conftest.$ac_ext
10427cat >>conftest.$ac_ext <<_ACEOF
10428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010429$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010430int
10431main ()
10432{
Benjamin Petersona8332062009-09-11 22:36:27 +000010433static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010434test_array [0] = 0
10435
10436 ;
10437 return 0;
10438}
10439_ACEOF
10440rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441if { (ac_try="$ac_compile"
10442case "(($ac_try" in
10443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10444 *) ac_try_echo=$ac_try;;
10445esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010446eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10447$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010450 grep -v '^ *+' conftest.er1 >conftest.err
10451 rm -f conftest.er1
10452 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010453 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010454 (exit $ac_status); } && {
10455 test -z "$ac_c_werror_flag" ||
10456 test ! -s conftest.err
10457 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ac_lo=0 ac_mid=0
10459 while :; do
10460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010461/* confdefs.h. */
10462_ACEOF
10463cat confdefs.h >>conftest.$ac_ext
10464cat >>conftest.$ac_ext <<_ACEOF
10465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010466$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010467int
10468main ()
10469{
Benjamin Petersona8332062009-09-11 22:36:27 +000010470static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010471test_array [0] = 0
10472
10473 ;
10474 return 0;
10475}
10476_ACEOF
10477rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478if { (ac_try="$ac_compile"
10479case "(($ac_try" in
10480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10481 *) ac_try_echo=$ac_try;;
10482esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010483eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10484$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010487 grep -v '^ *+' conftest.er1 >conftest.err
10488 rm -f conftest.er1
10489 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010490 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010491 (exit $ac_status); } && {
10492 test -z "$ac_c_werror_flag" ||
10493 test ! -s conftest.err
10494 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010495 ac_hi=$ac_mid; break
10496else
Benjamin Petersona8332062009-09-11 22:36:27 +000010497 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010498sed 's/^/| /' conftest.$ac_ext >&5
10499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500 ac_lo=`expr $ac_mid + 1`
10501 if test $ac_lo -le $ac_mid; then
10502 ac_lo= ac_hi=
10503 break
10504 fi
10505 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010507
10508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 done
10510else
Benjamin Petersona8332062009-09-11 22:36:27 +000010511 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010512sed 's/^/| /' conftest.$ac_ext >&5
10513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010515/* confdefs.h. */
10516_ACEOF
10517cat confdefs.h >>conftest.$ac_ext
10518cat >>conftest.$ac_ext <<_ACEOF
10519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010520$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010521int
10522main ()
10523{
Benjamin Petersona8332062009-09-11 22:36:27 +000010524static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010525test_array [0] = 0
10526
10527 ;
10528 return 0;
10529}
10530_ACEOF
10531rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532if { (ac_try="$ac_compile"
10533case "(($ac_try" in
10534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10535 *) ac_try_echo=$ac_try;;
10536esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010537eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10538$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010540 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010541 grep -v '^ *+' conftest.er1 >conftest.err
10542 rm -f conftest.er1
10543 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010544 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545 (exit $ac_status); } && {
10546 test -z "$ac_c_werror_flag" ||
10547 test ! -s conftest.err
10548 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010549 ac_hi=-1 ac_mid=-1
10550 while :; do
10551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010552/* confdefs.h. */
10553_ACEOF
10554cat confdefs.h >>conftest.$ac_ext
10555cat >>conftest.$ac_ext <<_ACEOF
10556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010557$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010558int
10559main ()
10560{
Benjamin Petersona8332062009-09-11 22:36:27 +000010561static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010562test_array [0] = 0
10563
10564 ;
10565 return 0;
10566}
10567_ACEOF
10568rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569if { (ac_try="$ac_compile"
10570case "(($ac_try" in
10571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10572 *) ac_try_echo=$ac_try;;
10573esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010574eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10575$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010578 grep -v '^ *+' conftest.er1 >conftest.err
10579 rm -f conftest.er1
10580 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010581 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582 (exit $ac_status); } && {
10583 test -z "$ac_c_werror_flag" ||
10584 test ! -s conftest.err
10585 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 ac_lo=$ac_mid; break
10587else
Benjamin Petersona8332062009-09-11 22:36:27 +000010588 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010589sed 's/^/| /' conftest.$ac_ext >&5
10590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010591 ac_hi=`expr '(' $ac_mid ')' - 1`
10592 if test $ac_mid -le $ac_hi; then
10593 ac_lo= ac_hi=
10594 break
10595 fi
10596 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598
10599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 done
10601else
Benjamin Petersona8332062009-09-11 22:36:27 +000010602 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010603sed 's/^/| /' conftest.$ac_ext >&5
10604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010605 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010607
10608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010610
10611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010612# Binary search between lo and hi bounds.
10613while test "x$ac_lo" != "x$ac_hi"; do
10614 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010616/* confdefs.h. */
10617_ACEOF
10618cat confdefs.h >>conftest.$ac_ext
10619cat >>conftest.$ac_ext <<_ACEOF
10620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010621$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010622int
10623main ()
10624{
Benjamin Petersona8332062009-09-11 22:36:27 +000010625static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010626test_array [0] = 0
10627
10628 ;
10629 return 0;
10630}
10631_ACEOF
10632rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633if { (ac_try="$ac_compile"
10634case "(($ac_try" in
10635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10636 *) ac_try_echo=$ac_try;;
10637esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010638eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10639$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010642 grep -v '^ *+' conftest.er1 >conftest.err
10643 rm -f conftest.er1
10644 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010645 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646 (exit $ac_status); } && {
10647 test -z "$ac_c_werror_flag" ||
10648 test ! -s conftest.err
10649 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010650 ac_hi=$ac_mid
10651else
Benjamin Petersona8332062009-09-11 22:36:27 +000010652 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010653sed 's/^/| /' conftest.$ac_ext >&5
10654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010655 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657
10658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010659done
10660case $ac_lo in
10661?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662'') if test "$ac_cv_type_fpos_t" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000010663 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10665{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010666See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010667$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010668See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000010669 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670 else
10671 ac_cv_sizeof_fpos_t=0
10672 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010673esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010674else
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010676/* confdefs.h. */
10677_ACEOF
10678cat confdefs.h >>conftest.$ac_ext
10679cat >>conftest.$ac_ext <<_ACEOF
10680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010681$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +000010682static long int longval () { return (long int) (sizeof (fpos_t)); }
10683static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010684#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010685#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010686int
10687main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010688{
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
10690 FILE *f = fopen ("conftest.val", "w");
10691 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000010693 if (((long int) (sizeof (fpos_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000010696 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010697 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000010698 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010699 }
10700 else
10701 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000010703 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000010705 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 }
Benjamin Petersona8332062009-09-11 22:36:27 +000010707 /* Do not output a trailing newline, as this causes \r\n confusion
10708 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010710
10711 ;
10712 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010713}
Martin v. Löwis11437992002-04-12 09:54:03 +000010714_ACEOF
10715rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716if { (ac_try="$ac_link"
10717case "(($ac_try" in
10718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10719 *) ac_try_echo=$ac_try;;
10720esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010721eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10722$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010724 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000010725 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010726 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727 { (case "(($ac_try" in
10728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10729 *) ac_try_echo=$ac_try;;
10730esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010731eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10732$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010734 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000010735 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 (exit $ac_status); }; }; then
10737 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010738else
Benjamin Petersona8332062009-09-11 22:36:27 +000010739 $as_echo "$as_me: program exited with status $ac_status" >&5
10740$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010741sed 's/^/| /' conftest.$ac_ext >&5
10742
Martin v. Löwis11437992002-04-12 09:54:03 +000010743( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010744if test "$ac_cv_type_fpos_t" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000010745 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10747{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010748See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010749$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010750See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000010751 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752 else
10753 ac_cv_sizeof_fpos_t=0
10754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010755fi
Benjamin Petersona8332062009-09-11 22:36:27 +000010756rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757rm -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 +000010758fi
10759rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010760fi
Benjamin Petersona8332062009-09-11 22:36:27 +000010761{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10762$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010763
10764
10765
Martin v. Löwis11437992002-04-12 09:54:03 +000010766cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010767#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010768_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010769
Michael W. Hudson54241132001-12-07 15:38:26 +000010770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771# The cast to long int works around a bug in the HP C Compiler
10772# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10773# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10774# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +000010775{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
10776$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010777if test "${ac_cv_sizeof_size_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000010778 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010779else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010780 if test "$cross_compiling" = yes; then
10781 # Depending upon the size, compute the lo and hi bounds.
10782cat >conftest.$ac_ext <<_ACEOF
10783/* confdefs.h. */
10784_ACEOF
10785cat confdefs.h >>conftest.$ac_ext
10786cat >>conftest.$ac_ext <<_ACEOF
10787/* end confdefs.h. */
10788$ac_includes_default
10789int
10790main ()
10791{
Benjamin Petersona8332062009-09-11 22:36:27 +000010792static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010793test_array [0] = 0
10794
10795 ;
10796 return 0;
10797}
10798_ACEOF
10799rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010800if { (ac_try="$ac_compile"
10801case "(($ac_try" in
10802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10803 *) ac_try_echo=$ac_try;;
10804esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010805eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10806$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010807 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010808 ac_status=$?
10809 grep -v '^ *+' conftest.er1 >conftest.err
10810 rm -f conftest.er1
10811 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010812 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813 (exit $ac_status); } && {
10814 test -z "$ac_c_werror_flag" ||
10815 test ! -s conftest.err
10816 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010817 ac_lo=0 ac_mid=0
10818 while :; do
10819 cat >conftest.$ac_ext <<_ACEOF
10820/* confdefs.h. */
10821_ACEOF
10822cat confdefs.h >>conftest.$ac_ext
10823cat >>conftest.$ac_ext <<_ACEOF
10824/* end confdefs.h. */
10825$ac_includes_default
10826int
10827main ()
10828{
Benjamin Petersona8332062009-09-11 22:36:27 +000010829static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010830test_array [0] = 0
10831
10832 ;
10833 return 0;
10834}
10835_ACEOF
10836rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010837if { (ac_try="$ac_compile"
10838case "(($ac_try" in
10839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10840 *) ac_try_echo=$ac_try;;
10841esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010842eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10843$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010845 ac_status=$?
10846 grep -v '^ *+' conftest.er1 >conftest.err
10847 rm -f conftest.er1
10848 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010849 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010850 (exit $ac_status); } && {
10851 test -z "$ac_c_werror_flag" ||
10852 test ! -s conftest.err
10853 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010854 ac_hi=$ac_mid; break
10855else
Benjamin Petersona8332062009-09-11 22:36:27 +000010856 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010857sed 's/^/| /' conftest.$ac_ext >&5
10858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859 ac_lo=`expr $ac_mid + 1`
10860 if test $ac_lo -le $ac_mid; then
10861 ac_lo= ac_hi=
10862 break
10863 fi
10864 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866
10867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010868 done
10869else
Benjamin Petersona8332062009-09-11 22:36:27 +000010870 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010871sed 's/^/| /' conftest.$ac_ext >&5
10872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010873 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010874/* confdefs.h. */
10875_ACEOF
10876cat confdefs.h >>conftest.$ac_ext
10877cat >>conftest.$ac_ext <<_ACEOF
10878/* end confdefs.h. */
10879$ac_includes_default
10880int
10881main ()
10882{
Benjamin Petersona8332062009-09-11 22:36:27 +000010883static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010884test_array [0] = 0
10885
10886 ;
10887 return 0;
10888}
10889_ACEOF
10890rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010891if { (ac_try="$ac_compile"
10892case "(($ac_try" in
10893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10894 *) ac_try_echo=$ac_try;;
10895esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010896eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10897$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010899 ac_status=$?
10900 grep -v '^ *+' conftest.er1 >conftest.err
10901 rm -f conftest.er1
10902 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010903 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010904 (exit $ac_status); } && {
10905 test -z "$ac_c_werror_flag" ||
10906 test ! -s conftest.err
10907 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010908 ac_hi=-1 ac_mid=-1
10909 while :; do
10910 cat >conftest.$ac_ext <<_ACEOF
10911/* confdefs.h. */
10912_ACEOF
10913cat confdefs.h >>conftest.$ac_ext
10914cat >>conftest.$ac_ext <<_ACEOF
10915/* end confdefs.h. */
10916$ac_includes_default
10917int
10918main ()
10919{
Benjamin Petersona8332062009-09-11 22:36:27 +000010920static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010921test_array [0] = 0
10922
10923 ;
10924 return 0;
10925}
10926_ACEOF
10927rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010928if { (ac_try="$ac_compile"
10929case "(($ac_try" in
10930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10931 *) ac_try_echo=$ac_try;;
10932esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010933eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10934$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010936 ac_status=$?
10937 grep -v '^ *+' conftest.er1 >conftest.err
10938 rm -f conftest.er1
10939 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000010940 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941 (exit $ac_status); } && {
10942 test -z "$ac_c_werror_flag" ||
10943 test ! -s conftest.err
10944 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010945 ac_lo=$ac_mid; break
10946else
Benjamin Petersona8332062009-09-11 22:36:27 +000010947 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010948sed 's/^/| /' conftest.$ac_ext >&5
10949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010950 ac_hi=`expr '(' $ac_mid ')' - 1`
10951 if test $ac_mid -le $ac_hi; then
10952 ac_lo= ac_hi=
10953 break
10954 fi
10955 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957
10958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010959 done
10960else
Benjamin Petersona8332062009-09-11 22:36:27 +000010961 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010962sed 's/^/| /' conftest.$ac_ext >&5
10963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010964 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966
10967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969
10970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010971# Binary search between lo and hi bounds.
10972while test "x$ac_lo" != "x$ac_hi"; do
10973 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10974 cat >conftest.$ac_ext <<_ACEOF
10975/* confdefs.h. */
10976_ACEOF
10977cat confdefs.h >>conftest.$ac_ext
10978cat >>conftest.$ac_ext <<_ACEOF
10979/* end confdefs.h. */
10980$ac_includes_default
10981int
10982main ()
10983{
Benjamin Petersona8332062009-09-11 22:36:27 +000010984static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010985test_array [0] = 0
10986
10987 ;
10988 return 0;
10989}
10990_ACEOF
10991rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992if { (ac_try="$ac_compile"
10993case "(($ac_try" in
10994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10995 *) ac_try_echo=$ac_try;;
10996esac
Benjamin Petersona8332062009-09-11 22:36:27 +000010997eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10998$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011000 ac_status=$?
11001 grep -v '^ *+' conftest.er1 >conftest.err
11002 rm -f conftest.er1
11003 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011004 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005 (exit $ac_status); } && {
11006 test -z "$ac_c_werror_flag" ||
11007 test ! -s conftest.err
11008 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000011009 ac_hi=$ac_mid
11010else
Benjamin Petersona8332062009-09-11 22:36:27 +000011011 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011012sed 's/^/| /' conftest.$ac_ext >&5
11013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016
11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011018done
11019case $ac_lo in
11020?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011021'') if test "$ac_cv_type_size_t" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000011022 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11024{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011025See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011026$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011027See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000011028 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029 else
11030 ac_cv_sizeof_size_t=0
11031 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011032esac
11033else
Martin v. Löwis18e16552006-02-15 17:27:45 +000011034 cat >conftest.$ac_ext <<_ACEOF
11035/* confdefs.h. */
11036_ACEOF
11037cat confdefs.h >>conftest.$ac_ext
11038cat >>conftest.$ac_ext <<_ACEOF
11039/* end confdefs.h. */
11040$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +000011041static long int longval () { return (long int) (sizeof (size_t)); }
11042static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011043#include <stdio.h>
11044#include <stdlib.h>
11045int
11046main ()
11047{
11048
11049 FILE *f = fopen ("conftest.val", "w");
11050 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000011052 if (((long int) (sizeof (size_t))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011053 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000011055 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000011057 fprintf (f, "%ld", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000011058 }
11059 else
11060 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000011062 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000011064 fprintf (f, "%lu", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000011065 }
Benjamin Petersona8332062009-09-11 22:36:27 +000011066 /* Do not output a trailing newline, as this causes \r\n confusion
11067 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011068 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011069
11070 ;
11071 return 0;
11072}
11073_ACEOF
11074rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011075if { (ac_try="$ac_link"
11076case "(($ac_try" in
11077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11078 *) ac_try_echo=$ac_try;;
11079esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011080eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11081$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011082 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011083 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000011084 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011085 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086 { (case "(($ac_try" in
11087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11088 *) ac_try_echo=$ac_try;;
11089esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011090eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11091$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011092 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011093 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000011094 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011095 (exit $ac_status); }; }; then
11096 ac_cv_sizeof_size_t=`cat conftest.val`
11097else
Benjamin Petersona8332062009-09-11 22:36:27 +000011098 $as_echo "$as_me: program exited with status $ac_status" >&5
11099$as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011100sed 's/^/| /' conftest.$ac_ext >&5
11101
11102( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011103if test "$ac_cv_type_size_t" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000011104 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11106{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011107See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011108$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011109See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000011110 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011111 else
11112 ac_cv_sizeof_size_t=0
11113 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000011114fi
Benjamin Petersona8332062009-09-11 22:36:27 +000011115rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116rm -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 +000011117fi
11118rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000011119fi
Benjamin Petersona8332062009-09-11 22:36:27 +000011120{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
11121$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122
11123
11124
Martin v. Löwis18e16552006-02-15 17:27:45 +000011125cat >>confdefs.h <<_ACEOF
11126#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
11127_ACEOF
11128
11129
Christian Heimes400adb02008-02-01 08:12:03 +000011130# The cast to long int works around a bug in the HP C Compiler
11131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11133# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +000011134{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5
11135$as_echo_n "checking size of pid_t... " >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011136if test "${ac_cv_sizeof_pid_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000011137 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +000011138else
11139 if test "$cross_compiling" = yes; then
11140 # Depending upon the size, compute the lo and hi bounds.
11141cat >conftest.$ac_ext <<_ACEOF
11142/* confdefs.h. */
11143_ACEOF
11144cat confdefs.h >>conftest.$ac_ext
11145cat >>conftest.$ac_ext <<_ACEOF
11146/* end confdefs.h. */
11147$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011148int
11149main ()
11150{
Benjamin Petersona8332062009-09-11 22:36:27 +000011151static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000011152test_array [0] = 0
11153
11154 ;
11155 return 0;
11156}
11157_ACEOF
11158rm -f conftest.$ac_objext
11159if { (ac_try="$ac_compile"
11160case "(($ac_try" in
11161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11162 *) ac_try_echo=$ac_try;;
11163esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011164eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11165$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011166 (eval "$ac_compile") 2>conftest.er1
11167 ac_status=$?
11168 grep -v '^ *+' conftest.er1 >conftest.err
11169 rm -f conftest.er1
11170 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011171 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011172 (exit $ac_status); } && {
11173 test -z "$ac_c_werror_flag" ||
11174 test ! -s conftest.err
11175 } && test -s conftest.$ac_objext; then
11176 ac_lo=0 ac_mid=0
11177 while :; do
11178 cat >conftest.$ac_ext <<_ACEOF
11179/* confdefs.h. */
11180_ACEOF
11181cat confdefs.h >>conftest.$ac_ext
11182cat >>conftest.$ac_ext <<_ACEOF
11183/* end confdefs.h. */
11184$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011185int
11186main ()
11187{
Benjamin Petersona8332062009-09-11 22:36:27 +000011188static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011189test_array [0] = 0
11190
11191 ;
11192 return 0;
11193}
11194_ACEOF
11195rm -f conftest.$ac_objext
11196if { (ac_try="$ac_compile"
11197case "(($ac_try" in
11198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11199 *) ac_try_echo=$ac_try;;
11200esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011201eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11202$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011203 (eval "$ac_compile") 2>conftest.er1
11204 ac_status=$?
11205 grep -v '^ *+' conftest.er1 >conftest.err
11206 rm -f conftest.er1
11207 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011208 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011209 (exit $ac_status); } && {
11210 test -z "$ac_c_werror_flag" ||
11211 test ! -s conftest.err
11212 } && test -s conftest.$ac_objext; then
11213 ac_hi=$ac_mid; break
11214else
Benjamin Petersona8332062009-09-11 22:36:27 +000011215 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011216sed 's/^/| /' conftest.$ac_ext >&5
11217
11218 ac_lo=`expr $ac_mid + 1`
11219 if test $ac_lo -le $ac_mid; then
11220 ac_lo= ac_hi=
11221 break
11222 fi
11223 ac_mid=`expr 2 '*' $ac_mid + 1`
11224fi
11225
11226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11227 done
11228else
Benjamin Petersona8332062009-09-11 22:36:27 +000011229 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011230sed 's/^/| /' conftest.$ac_ext >&5
11231
11232 cat >conftest.$ac_ext <<_ACEOF
11233/* confdefs.h. */
11234_ACEOF
11235cat confdefs.h >>conftest.$ac_ext
11236cat >>conftest.$ac_ext <<_ACEOF
11237/* end confdefs.h. */
11238$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011239int
11240main ()
11241{
Benjamin Petersona8332062009-09-11 22:36:27 +000011242static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000011243test_array [0] = 0
11244
11245 ;
11246 return 0;
11247}
11248_ACEOF
11249rm -f conftest.$ac_objext
11250if { (ac_try="$ac_compile"
11251case "(($ac_try" in
11252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11253 *) ac_try_echo=$ac_try;;
11254esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011255eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11256$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011257 (eval "$ac_compile") 2>conftest.er1
11258 ac_status=$?
11259 grep -v '^ *+' conftest.er1 >conftest.err
11260 rm -f conftest.er1
11261 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011262 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011263 (exit $ac_status); } && {
11264 test -z "$ac_c_werror_flag" ||
11265 test ! -s conftest.err
11266 } && test -s conftest.$ac_objext; then
11267 ac_hi=-1 ac_mid=-1
11268 while :; do
11269 cat >conftest.$ac_ext <<_ACEOF
11270/* confdefs.h. */
11271_ACEOF
11272cat confdefs.h >>conftest.$ac_ext
11273cat >>conftest.$ac_ext <<_ACEOF
11274/* end confdefs.h. */
11275$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011276int
11277main ()
11278{
Benjamin Petersona8332062009-09-11 22:36:27 +000011279static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011280test_array [0] = 0
11281
11282 ;
11283 return 0;
11284}
11285_ACEOF
11286rm -f conftest.$ac_objext
11287if { (ac_try="$ac_compile"
11288case "(($ac_try" in
11289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11290 *) ac_try_echo=$ac_try;;
11291esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011292eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11293$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011294 (eval "$ac_compile") 2>conftest.er1
11295 ac_status=$?
11296 grep -v '^ *+' conftest.er1 >conftest.err
11297 rm -f conftest.er1
11298 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011299 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011300 (exit $ac_status); } && {
11301 test -z "$ac_c_werror_flag" ||
11302 test ! -s conftest.err
11303 } && test -s conftest.$ac_objext; then
11304 ac_lo=$ac_mid; break
11305else
Benjamin Petersona8332062009-09-11 22:36:27 +000011306 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011307sed 's/^/| /' conftest.$ac_ext >&5
11308
11309 ac_hi=`expr '(' $ac_mid ')' - 1`
11310 if test $ac_mid -le $ac_hi; then
11311 ac_lo= ac_hi=
11312 break
11313 fi
11314 ac_mid=`expr 2 '*' $ac_mid`
11315fi
11316
11317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11318 done
11319else
Benjamin Petersona8332062009-09-11 22:36:27 +000011320 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011321sed 's/^/| /' conftest.$ac_ext >&5
11322
11323 ac_lo= ac_hi=
11324fi
11325
11326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11327fi
11328
11329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11330# Binary search between lo and hi bounds.
11331while test "x$ac_lo" != "x$ac_hi"; do
11332 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11333 cat >conftest.$ac_ext <<_ACEOF
11334/* confdefs.h. */
11335_ACEOF
11336cat confdefs.h >>conftest.$ac_ext
11337cat >>conftest.$ac_ext <<_ACEOF
11338/* end confdefs.h. */
11339$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011340int
11341main ()
11342{
Benjamin Petersona8332062009-09-11 22:36:27 +000011343static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011344test_array [0] = 0
11345
11346 ;
11347 return 0;
11348}
11349_ACEOF
11350rm -f conftest.$ac_objext
11351if { (ac_try="$ac_compile"
11352case "(($ac_try" in
11353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11354 *) ac_try_echo=$ac_try;;
11355esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011356eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11357$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011358 (eval "$ac_compile") 2>conftest.er1
11359 ac_status=$?
11360 grep -v '^ *+' conftest.er1 >conftest.err
11361 rm -f conftest.er1
11362 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011363 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011364 (exit $ac_status); } && {
11365 test -z "$ac_c_werror_flag" ||
11366 test ! -s conftest.err
11367 } && test -s conftest.$ac_objext; then
11368 ac_hi=$ac_mid
11369else
Benjamin Petersona8332062009-09-11 22:36:27 +000011370 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011371sed 's/^/| /' conftest.$ac_ext >&5
11372
11373 ac_lo=`expr '(' $ac_mid ')' + 1`
11374fi
11375
11376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11377done
11378case $ac_lo in
11379?*) ac_cv_sizeof_pid_t=$ac_lo;;
11380'') if test "$ac_cv_type_pid_t" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000011381 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11382$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11383{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011384See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011385$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011386See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000011387 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011388 else
11389 ac_cv_sizeof_pid_t=0
11390 fi ;;
11391esac
11392else
11393 cat >conftest.$ac_ext <<_ACEOF
11394/* confdefs.h. */
11395_ACEOF
11396cat confdefs.h >>conftest.$ac_ext
11397cat >>conftest.$ac_ext <<_ACEOF
11398/* end confdefs.h. */
11399$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +000011400static long int longval () { return (long int) (sizeof (pid_t)); }
11401static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011402#include <stdio.h>
11403#include <stdlib.h>
11404int
11405main ()
11406{
11407
11408 FILE *f = fopen ("conftest.val", "w");
11409 if (! f)
11410 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000011411 if (((long int) (sizeof (pid_t))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011412 {
11413 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000011414 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000011415 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000011416 fprintf (f, "%ld", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011417 }
11418 else
11419 {
11420 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000011421 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000011422 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000011423 fprintf (f, "%lu", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011424 }
Benjamin Petersona8332062009-09-11 22:36:27 +000011425 /* Do not output a trailing newline, as this causes \r\n confusion
11426 on some platforms. */
Christian Heimes400adb02008-02-01 08:12:03 +000011427 return ferror (f) || fclose (f) != 0;
11428
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433rm -f conftest$ac_exeext
11434if { (ac_try="$ac_link"
11435case "(($ac_try" in
11436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11437 *) ac_try_echo=$ac_try;;
11438esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011439eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11440$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011441 (eval "$ac_link") 2>&5
11442 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000011443 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011444 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11445 { (case "(($ac_try" in
11446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11447 *) ac_try_echo=$ac_try;;
11448esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011449eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11450$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011451 (eval "$ac_try") 2>&5
11452 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000011453 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011454 (exit $ac_status); }; }; then
11455 ac_cv_sizeof_pid_t=`cat conftest.val`
11456else
Benjamin Petersona8332062009-09-11 22:36:27 +000011457 $as_echo "$as_me: program exited with status $ac_status" >&5
11458$as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011459sed 's/^/| /' conftest.$ac_ext >&5
11460
11461( exit $ac_status )
11462if test "$ac_cv_type_pid_t" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000011463 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11465{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011466See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011467$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011468See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000011469 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011470 else
11471 ac_cv_sizeof_pid_t=0
11472 fi
11473fi
Benjamin Petersona8332062009-09-11 22:36:27 +000011474rm -rf conftest.dSYM
Christian Heimes400adb02008-02-01 08:12:03 +000011475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11476fi
11477rm -f conftest.val
11478fi
Benjamin Petersona8332062009-09-11 22:36:27 +000011479{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11480$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011481
11482
11483
11484cat >>confdefs.h <<_ACEOF
11485#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11486_ACEOF
11487
11488
Michael W. Hudson54241132001-12-07 15:38:26 +000011489
Benjamin Petersona8332062009-09-11 22:36:27 +000011490{ $as_echo "$as_me:$LINENO: checking for long long support" >&5
11491$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011492have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011493cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011494/* confdefs.h. */
11495_ACEOF
11496cat confdefs.h >>conftest.$ac_ext
11497cat >>conftest.$ac_ext <<_ACEOF
11498/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011499
Martin v. Löwis11437992002-04-12 09:54:03 +000011500int
11501main ()
11502{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011503long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011504 ;
11505 return 0;
11506}
11507_ACEOF
11508rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509if { (ac_try="$ac_compile"
11510case "(($ac_try" in
11511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11512 *) ac_try_echo=$ac_try;;
11513esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011514eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11515$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011518 grep -v '^ *+' conftest.er1 >conftest.err
11519 rm -f conftest.er1
11520 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011521 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522 (exit $ac_status); } && {
11523 test -z "$ac_c_werror_flag" ||
11524 test ! -s conftest.err
11525 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011526
11527
11528cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011529#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011530_ACEOF
11531
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011532 have_long_long=yes
11533
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011534else
Benjamin Petersona8332062009-09-11 22:36:27 +000011535 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011536sed 's/^/| /' conftest.$ac_ext >&5
11537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011538
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540
11541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000011542{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5
11543$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011544if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545# The cast to long int works around a bug in the HP C Compiler
11546# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11547# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11548# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +000011549{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
11550$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011551if test "${ac_cv_sizeof_long_long+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000011552 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011553else
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 if test "$cross_compiling" = yes; then
11555 # Depending upon the size, compute the lo and hi bounds.
11556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* confdefs.h. */
11558_ACEOF
11559cat confdefs.h >>conftest.$ac_ext
11560cat >>conftest.$ac_ext <<_ACEOF
11561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011562$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011563int
11564main ()
11565{
Benjamin Petersona8332062009-09-11 22:36:27 +000011566static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011567test_array [0] = 0
11568
11569 ;
11570 return 0;
11571}
11572_ACEOF
11573rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574if { (ac_try="$ac_compile"
11575case "(($ac_try" in
11576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11577 *) ac_try_echo=$ac_try;;
11578esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011579eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11580$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011583 grep -v '^ *+' conftest.er1 >conftest.err
11584 rm -f conftest.er1
11585 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011586 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011587 (exit $ac_status); } && {
11588 test -z "$ac_c_werror_flag" ||
11589 test ! -s conftest.err
11590 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 ac_lo=0 ac_mid=0
11592 while :; do
11593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011594/* confdefs.h. */
11595_ACEOF
11596cat confdefs.h >>conftest.$ac_ext
11597cat >>conftest.$ac_ext <<_ACEOF
11598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011599$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011600int
11601main ()
11602{
Benjamin Petersona8332062009-09-11 22:36:27 +000011603static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011604test_array [0] = 0
11605
11606 ;
11607 return 0;
11608}
11609_ACEOF
11610rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011611if { (ac_try="$ac_compile"
11612case "(($ac_try" in
11613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11614 *) ac_try_echo=$ac_try;;
11615esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011616eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11617$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011620 grep -v '^ *+' conftest.er1 >conftest.err
11621 rm -f conftest.er1
11622 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011623 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624 (exit $ac_status); } && {
11625 test -z "$ac_c_werror_flag" ||
11626 test ! -s conftest.err
11627 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 ac_hi=$ac_mid; break
11629else
Benjamin Petersona8332062009-09-11 22:36:27 +000011630 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011631sed 's/^/| /' conftest.$ac_ext >&5
11632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011633 ac_lo=`expr $ac_mid + 1`
11634 if test $ac_lo -le $ac_mid; then
11635 ac_lo= ac_hi=
11636 break
11637 fi
11638 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011640
11641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011642 done
11643else
Benjamin Petersona8332062009-09-11 22:36:27 +000011644 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011645sed 's/^/| /' conftest.$ac_ext >&5
11646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011648/* confdefs.h. */
11649_ACEOF
11650cat confdefs.h >>conftest.$ac_ext
11651cat >>conftest.$ac_ext <<_ACEOF
11652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011653$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011654int
11655main ()
11656{
Benjamin Petersona8332062009-09-11 22:36:27 +000011657static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011658test_array [0] = 0
11659
11660 ;
11661 return 0;
11662}
11663_ACEOF
11664rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665if { (ac_try="$ac_compile"
11666case "(($ac_try" in
11667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11668 *) ac_try_echo=$ac_try;;
11669esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011670eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11671$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011674 grep -v '^ *+' conftest.er1 >conftest.err
11675 rm -f conftest.er1
11676 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011677 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011678 (exit $ac_status); } && {
11679 test -z "$ac_c_werror_flag" ||
11680 test ! -s conftest.err
11681 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 ac_hi=-1 ac_mid=-1
11683 while :; do
11684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011685/* confdefs.h. */
11686_ACEOF
11687cat confdefs.h >>conftest.$ac_ext
11688cat >>conftest.$ac_ext <<_ACEOF
11689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011690$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011691int
11692main ()
11693{
Benjamin Petersona8332062009-09-11 22:36:27 +000011694static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011695test_array [0] = 0
11696
11697 ;
11698 return 0;
11699}
11700_ACEOF
11701rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011702if { (ac_try="$ac_compile"
11703case "(($ac_try" in
11704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11705 *) ac_try_echo=$ac_try;;
11706esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011707eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11708$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011711 grep -v '^ *+' conftest.er1 >conftest.err
11712 rm -f conftest.er1
11713 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011714 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011715 (exit $ac_status); } && {
11716 test -z "$ac_c_werror_flag" ||
11717 test ! -s conftest.err
11718 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011719 ac_lo=$ac_mid; break
11720else
Benjamin Petersona8332062009-09-11 22:36:27 +000011721 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011722sed 's/^/| /' conftest.$ac_ext >&5
11723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011724 ac_hi=`expr '(' $ac_mid ')' - 1`
11725 if test $ac_mid -le $ac_hi; then
11726 ac_lo= ac_hi=
11727 break
11728 fi
11729 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011731
11732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011733 done
11734else
Benjamin Petersona8332062009-09-11 22:36:27 +000011735 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011736sed 's/^/| /' conftest.$ac_ext >&5
11737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011738 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011740
11741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011743
11744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011745# Binary search between lo and hi bounds.
11746while test "x$ac_lo" != "x$ac_hi"; do
11747 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011749/* confdefs.h. */
11750_ACEOF
11751cat confdefs.h >>conftest.$ac_ext
11752cat >>conftest.$ac_ext <<_ACEOF
11753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011754$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011755int
11756main ()
11757{
Benjamin Petersona8332062009-09-11 22:36:27 +000011758static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011759test_array [0] = 0
11760
11761 ;
11762 return 0;
11763}
11764_ACEOF
11765rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011766if { (ac_try="$ac_compile"
11767case "(($ac_try" in
11768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11769 *) ac_try_echo=$ac_try;;
11770esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011771eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11772$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011773 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011775 grep -v '^ *+' conftest.er1 >conftest.err
11776 rm -f conftest.er1
11777 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011778 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011779 (exit $ac_status); } && {
11780 test -z "$ac_c_werror_flag" ||
11781 test ! -s conftest.err
11782 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011783 ac_hi=$ac_mid
11784else
Benjamin Petersona8332062009-09-11 22:36:27 +000011785 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011786sed 's/^/| /' conftest.$ac_ext >&5
11787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011788 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011790
11791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011792done
11793case $ac_lo in
11794?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011795'') if test "$ac_cv_type_long_long" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000011796 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11798{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011799See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011800$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011801See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000011802 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011803 else
11804 ac_cv_sizeof_long_long=0
11805 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011806esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011807else
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011809/* confdefs.h. */
11810_ACEOF
11811cat confdefs.h >>conftest.$ac_ext
11812cat >>conftest.$ac_ext <<_ACEOF
11813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011814$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +000011815static long int longval () { return (long int) (sizeof (long long)); }
11816static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011817#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011818#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011819int
11820main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011821{
Martin v. Löwis11437992002-04-12 09:54:03 +000011822
11823 FILE *f = fopen ("conftest.val", "w");
11824 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011825 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000011826 if (((long int) (sizeof (long long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011827 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011828 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000011829 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011830 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000011831 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011832 }
11833 else
11834 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000011836 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000011838 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011839 }
Benjamin Petersona8332062009-09-11 22:36:27 +000011840 /* Do not output a trailing newline, as this causes \r\n confusion
11841 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011842 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011843
11844 ;
11845 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011846}
Martin v. Löwis11437992002-04-12 09:54:03 +000011847_ACEOF
11848rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011849if { (ac_try="$ac_link"
11850case "(($ac_try" in
11851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11852 *) ac_try_echo=$ac_try;;
11853esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011854eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11855$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011856 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011857 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000011858 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011859 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011860 { (case "(($ac_try" in
11861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11862 *) ac_try_echo=$ac_try;;
11863esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011864eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11865$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011866 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011867 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000011868 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011869 (exit $ac_status); }; }; then
11870 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011871else
Benjamin Petersona8332062009-09-11 22:36:27 +000011872 $as_echo "$as_me: program exited with status $ac_status" >&5
11873$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011874sed 's/^/| /' conftest.$ac_ext >&5
11875
Martin v. Löwis11437992002-04-12 09:54:03 +000011876( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011877if test "$ac_cv_type_long_long" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000011878 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11880{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011881See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011882$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011883See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000011884 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011885 else
11886 ac_cv_sizeof_long_long=0
11887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011888fi
Benjamin Petersona8332062009-09-11 22:36:27 +000011889rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890rm -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 +000011891fi
11892rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011893fi
Benjamin Petersona8332062009-09-11 22:36:27 +000011894{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11895$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011896
11897
11898
Martin v. Löwis11437992002-04-12 09:54:03 +000011899cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011900#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011901_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011902
Michael W. Hudson54241132001-12-07 15:38:26 +000011903
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011904fi
11905
Benjamin Petersona8332062009-09-11 22:36:27 +000011906{ $as_echo "$as_me:$LINENO: checking for long double support" >&5
11907$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011908have_long_double=no
11909cat >conftest.$ac_ext <<_ACEOF
11910/* confdefs.h. */
11911_ACEOF
11912cat confdefs.h >>conftest.$ac_ext
11913cat >>conftest.$ac_ext <<_ACEOF
11914/* end confdefs.h. */
11915
11916int
11917main ()
11918{
11919long double x; x = (long double)0;
11920 ;
11921 return 0;
11922}
11923_ACEOF
11924rm -f conftest.$ac_objext
11925if { (ac_try="$ac_compile"
11926case "(($ac_try" in
11927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11928 *) ac_try_echo=$ac_try;;
11929esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011930eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11931$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011932 (eval "$ac_compile") 2>conftest.er1
11933 ac_status=$?
11934 grep -v '^ *+' conftest.er1 >conftest.err
11935 rm -f conftest.er1
11936 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000011937 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011938 (exit $ac_status); } && {
11939 test -z "$ac_c_werror_flag" ||
11940 test ! -s conftest.err
11941 } && test -s conftest.$ac_objext; then
11942
11943
11944cat >>confdefs.h <<\_ACEOF
11945#define HAVE_LONG_DOUBLE 1
11946_ACEOF
11947
11948 have_long_double=yes
11949
11950else
Benjamin Petersona8332062009-09-11 22:36:27 +000011951 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011952sed 's/^/| /' conftest.$ac_ext >&5
11953
11954
11955fi
11956
11957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000011958{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5
11959$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011961# The cast to long int works around a bug in the HP C Compiler
11962# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11963# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11964# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +000011965{ $as_echo "$as_me:$LINENO: checking size of long double" >&5
11966$as_echo_n "checking size of long double... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011967if test "${ac_cv_sizeof_long_double+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000011968 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011969else
11970 if test "$cross_compiling" = yes; then
11971 # Depending upon the size, compute the lo and hi bounds.
11972cat >conftest.$ac_ext <<_ACEOF
11973/* confdefs.h. */
11974_ACEOF
11975cat confdefs.h >>conftest.$ac_ext
11976cat >>conftest.$ac_ext <<_ACEOF
11977/* end confdefs.h. */
11978$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011979int
11980main ()
11981{
Benjamin Petersona8332062009-09-11 22:36:27 +000011982static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011983test_array [0] = 0
11984
11985 ;
11986 return 0;
11987}
11988_ACEOF
11989rm -f conftest.$ac_objext
11990if { (ac_try="$ac_compile"
11991case "(($ac_try" in
11992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11993 *) ac_try_echo=$ac_try;;
11994esac
Benjamin Petersona8332062009-09-11 22:36:27 +000011995eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11996$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011997 (eval "$ac_compile") 2>conftest.er1
11998 ac_status=$?
11999 grep -v '^ *+' conftest.er1 >conftest.err
12000 rm -f conftest.er1
12001 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012002 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012003 (exit $ac_status); } && {
12004 test -z "$ac_c_werror_flag" ||
12005 test ! -s conftest.err
12006 } && test -s conftest.$ac_objext; then
12007 ac_lo=0 ac_mid=0
12008 while :; do
12009 cat >conftest.$ac_ext <<_ACEOF
12010/* confdefs.h. */
12011_ACEOF
12012cat confdefs.h >>conftest.$ac_ext
12013cat >>conftest.$ac_ext <<_ACEOF
12014/* end confdefs.h. */
12015$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012016int
12017main ()
12018{
Benjamin Petersona8332062009-09-11 22:36:27 +000012019static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012020test_array [0] = 0
12021
12022 ;
12023 return 0;
12024}
12025_ACEOF
12026rm -f conftest.$ac_objext
12027if { (ac_try="$ac_compile"
12028case "(($ac_try" in
12029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12030 *) ac_try_echo=$ac_try;;
12031esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012032eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12033$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012034 (eval "$ac_compile") 2>conftest.er1
12035 ac_status=$?
12036 grep -v '^ *+' conftest.er1 >conftest.err
12037 rm -f conftest.er1
12038 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012039 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012040 (exit $ac_status); } && {
12041 test -z "$ac_c_werror_flag" ||
12042 test ! -s conftest.err
12043 } && test -s conftest.$ac_objext; then
12044 ac_hi=$ac_mid; break
12045else
Benjamin Petersona8332062009-09-11 22:36:27 +000012046 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012047sed 's/^/| /' conftest.$ac_ext >&5
12048
12049 ac_lo=`expr $ac_mid + 1`
12050 if test $ac_lo -le $ac_mid; then
12051 ac_lo= ac_hi=
12052 break
12053 fi
12054 ac_mid=`expr 2 '*' $ac_mid + 1`
12055fi
12056
12057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12058 done
12059else
Benjamin Petersona8332062009-09-11 22:36:27 +000012060 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012061sed 's/^/| /' conftest.$ac_ext >&5
12062
12063 cat >conftest.$ac_ext <<_ACEOF
12064/* confdefs.h. */
12065_ACEOF
12066cat confdefs.h >>conftest.$ac_ext
12067cat >>conftest.$ac_ext <<_ACEOF
12068/* end confdefs.h. */
12069$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012070int
12071main ()
12072{
Benjamin Petersona8332062009-09-11 22:36:27 +000012073static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012074test_array [0] = 0
12075
12076 ;
12077 return 0;
12078}
12079_ACEOF
12080rm -f conftest.$ac_objext
12081if { (ac_try="$ac_compile"
12082case "(($ac_try" in
12083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12084 *) ac_try_echo=$ac_try;;
12085esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012086eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12087$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012088 (eval "$ac_compile") 2>conftest.er1
12089 ac_status=$?
12090 grep -v '^ *+' conftest.er1 >conftest.err
12091 rm -f conftest.er1
12092 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012093 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012094 (exit $ac_status); } && {
12095 test -z "$ac_c_werror_flag" ||
12096 test ! -s conftest.err
12097 } && test -s conftest.$ac_objext; then
12098 ac_hi=-1 ac_mid=-1
12099 while :; do
12100 cat >conftest.$ac_ext <<_ACEOF
12101/* confdefs.h. */
12102_ACEOF
12103cat confdefs.h >>conftest.$ac_ext
12104cat >>conftest.$ac_ext <<_ACEOF
12105/* end confdefs.h. */
12106$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012107int
12108main ()
12109{
Benjamin Petersona8332062009-09-11 22:36:27 +000012110static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012111test_array [0] = 0
12112
12113 ;
12114 return 0;
12115}
12116_ACEOF
12117rm -f conftest.$ac_objext
12118if { (ac_try="$ac_compile"
12119case "(($ac_try" in
12120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12121 *) ac_try_echo=$ac_try;;
12122esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012123eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12124$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012125 (eval "$ac_compile") 2>conftest.er1
12126 ac_status=$?
12127 grep -v '^ *+' conftest.er1 >conftest.err
12128 rm -f conftest.er1
12129 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012130 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012131 (exit $ac_status); } && {
12132 test -z "$ac_c_werror_flag" ||
12133 test ! -s conftest.err
12134 } && test -s conftest.$ac_objext; then
12135 ac_lo=$ac_mid; break
12136else
Benjamin Petersona8332062009-09-11 22:36:27 +000012137 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012138sed 's/^/| /' conftest.$ac_ext >&5
12139
12140 ac_hi=`expr '(' $ac_mid ')' - 1`
12141 if test $ac_mid -le $ac_hi; then
12142 ac_lo= ac_hi=
12143 break
12144 fi
12145 ac_mid=`expr 2 '*' $ac_mid`
12146fi
12147
12148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12149 done
12150else
Benjamin Petersona8332062009-09-11 22:36:27 +000012151 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012152sed 's/^/| /' conftest.$ac_ext >&5
12153
12154 ac_lo= ac_hi=
12155fi
12156
12157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12158fi
12159
12160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12161# Binary search between lo and hi bounds.
12162while test "x$ac_lo" != "x$ac_hi"; do
12163 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12164 cat >conftest.$ac_ext <<_ACEOF
12165/* confdefs.h. */
12166_ACEOF
12167cat confdefs.h >>conftest.$ac_ext
12168cat >>conftest.$ac_ext <<_ACEOF
12169/* end confdefs.h. */
12170$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012171int
12172main ()
12173{
Benjamin Petersona8332062009-09-11 22:36:27 +000012174static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012175test_array [0] = 0
12176
12177 ;
12178 return 0;
12179}
12180_ACEOF
12181rm -f conftest.$ac_objext
12182if { (ac_try="$ac_compile"
12183case "(($ac_try" in
12184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12185 *) ac_try_echo=$ac_try;;
12186esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012187eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12188$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012189 (eval "$ac_compile") 2>conftest.er1
12190 ac_status=$?
12191 grep -v '^ *+' conftest.er1 >conftest.err
12192 rm -f conftest.er1
12193 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012194 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012195 (exit $ac_status); } && {
12196 test -z "$ac_c_werror_flag" ||
12197 test ! -s conftest.err
12198 } && test -s conftest.$ac_objext; then
12199 ac_hi=$ac_mid
12200else
Benjamin Petersona8332062009-09-11 22:36:27 +000012201 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012202sed 's/^/| /' conftest.$ac_ext >&5
12203
12204 ac_lo=`expr '(' $ac_mid ')' + 1`
12205fi
12206
12207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12208done
12209case $ac_lo in
12210?*) ac_cv_sizeof_long_double=$ac_lo;;
12211'') if test "$ac_cv_type_long_double" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000012212 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12213$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12214{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012215See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012216$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012217See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000012218 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012219 else
12220 ac_cv_sizeof_long_double=0
12221 fi ;;
12222esac
12223else
12224 cat >conftest.$ac_ext <<_ACEOF
12225/* confdefs.h. */
12226_ACEOF
12227cat confdefs.h >>conftest.$ac_ext
12228cat >>conftest.$ac_ext <<_ACEOF
12229/* end confdefs.h. */
12230$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +000012231static long int longval () { return (long int) (sizeof (long double)); }
12232static unsigned long int ulongval () { return (long int) (sizeof (long double)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012233#include <stdio.h>
12234#include <stdlib.h>
12235int
12236main ()
12237{
12238
12239 FILE *f = fopen ("conftest.val", "w");
12240 if (! f)
12241 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000012242 if (((long int) (sizeof (long double))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012243 {
12244 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000012245 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012246 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000012247 fprintf (f, "%ld", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012248 }
12249 else
12250 {
12251 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000012252 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012253 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000012254 fprintf (f, "%lu", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012255 }
Benjamin Petersona8332062009-09-11 22:36:27 +000012256 /* Do not output a trailing newline, as this causes \r\n confusion
12257 on some platforms. */
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012258 return ferror (f) || fclose (f) != 0;
12259
12260 ;
12261 return 0;
12262}
12263_ACEOF
12264rm -f conftest$ac_exeext
12265if { (ac_try="$ac_link"
12266case "(($ac_try" in
12267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12268 *) ac_try_echo=$ac_try;;
12269esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012270eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12271$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012272 (eval "$ac_link") 2>&5
12273 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000012274 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012275 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12276 { (case "(($ac_try" in
12277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12278 *) ac_try_echo=$ac_try;;
12279esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012280eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12281$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012282 (eval "$ac_try") 2>&5
12283 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000012284 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012285 (exit $ac_status); }; }; then
12286 ac_cv_sizeof_long_double=`cat conftest.val`
12287else
Benjamin Petersona8332062009-09-11 22:36:27 +000012288 $as_echo "$as_me: program exited with status $ac_status" >&5
12289$as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012290sed 's/^/| /' conftest.$ac_ext >&5
12291
12292( exit $ac_status )
12293if test "$ac_cv_type_long_double" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000012294 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12296{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012297See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012298$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012299See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000012300 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012301 else
12302 ac_cv_sizeof_long_double=0
12303 fi
12304fi
Benjamin Petersona8332062009-09-11 22:36:27 +000012305rm -rf conftest.dSYM
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12307fi
12308rm -f conftest.val
12309fi
Benjamin Petersona8332062009-09-11 22:36:27 +000012310{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12311$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012312
12313
12314
12315cat >>confdefs.h <<_ACEOF
12316#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12317_ACEOF
12318
12319
12320fi
12321
12322
Benjamin Petersona8332062009-09-11 22:36:27 +000012323{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5
12324$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012325have_c99_bool=no
12326cat >conftest.$ac_ext <<_ACEOF
12327/* confdefs.h. */
12328_ACEOF
12329cat confdefs.h >>conftest.$ac_ext
12330cat >>conftest.$ac_ext <<_ACEOF
12331/* end confdefs.h. */
12332
12333int
12334main ()
12335{
12336_Bool x; x = (_Bool)0;
12337 ;
12338 return 0;
12339}
12340_ACEOF
12341rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342if { (ac_try="$ac_compile"
12343case "(($ac_try" in
12344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12345 *) ac_try_echo=$ac_try;;
12346esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012347eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12348$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012350 ac_status=$?
12351 grep -v '^ *+' conftest.er1 >conftest.err
12352 rm -f conftest.er1
12353 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012354 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355 (exit $ac_status); } && {
12356 test -z "$ac_c_werror_flag" ||
12357 test ! -s conftest.err
12358 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012359
12360
12361cat >>confdefs.h <<\_ACEOF
12362#define HAVE_C99_BOOL 1
12363_ACEOF
12364
12365 have_c99_bool=yes
12366
12367else
Benjamin Petersona8332062009-09-11 22:36:27 +000012368 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012369sed 's/^/| /' conftest.$ac_ext >&5
12370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371
Thomas Woutersb2137042007-02-01 18:02:27 +000012372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373
12374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000012375{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12376$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012377if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378# The cast to long int works around a bug in the HP C Compiler
12379# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12380# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12381# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +000012382{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5
12383$as_echo_n "checking size of _Bool... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012384if test "${ac_cv_sizeof__Bool+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000012385 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012386else
12387 if test "$cross_compiling" = yes; then
12388 # Depending upon the size, compute the lo and hi bounds.
12389cat >conftest.$ac_ext <<_ACEOF
12390/* confdefs.h. */
12391_ACEOF
12392cat confdefs.h >>conftest.$ac_ext
12393cat >>conftest.$ac_ext <<_ACEOF
12394/* end confdefs.h. */
12395$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012396int
12397main ()
12398{
Benjamin Petersona8332062009-09-11 22:36:27 +000012399static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012400test_array [0] = 0
12401
12402 ;
12403 return 0;
12404}
12405_ACEOF
12406rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407if { (ac_try="$ac_compile"
12408case "(($ac_try" in
12409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12410 *) ac_try_echo=$ac_try;;
12411esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012412eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12413$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012415 ac_status=$?
12416 grep -v '^ *+' conftest.er1 >conftest.err
12417 rm -f conftest.er1
12418 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012419 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420 (exit $ac_status); } && {
12421 test -z "$ac_c_werror_flag" ||
12422 test ! -s conftest.err
12423 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012424 ac_lo=0 ac_mid=0
12425 while :; do
12426 cat >conftest.$ac_ext <<_ACEOF
12427/* confdefs.h. */
12428_ACEOF
12429cat confdefs.h >>conftest.$ac_ext
12430cat >>conftest.$ac_ext <<_ACEOF
12431/* end confdefs.h. */
12432$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012433int
12434main ()
12435{
Benjamin Petersona8332062009-09-11 22:36:27 +000012436static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012437test_array [0] = 0
12438
12439 ;
12440 return 0;
12441}
12442_ACEOF
12443rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444if { (ac_try="$ac_compile"
12445case "(($ac_try" in
12446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12447 *) ac_try_echo=$ac_try;;
12448esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012449eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12450$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012452 ac_status=$?
12453 grep -v '^ *+' conftest.er1 >conftest.err
12454 rm -f conftest.er1
12455 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012456 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457 (exit $ac_status); } && {
12458 test -z "$ac_c_werror_flag" ||
12459 test ! -s conftest.err
12460 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012461 ac_hi=$ac_mid; break
12462else
Benjamin Petersona8332062009-09-11 22:36:27 +000012463 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012464sed 's/^/| /' conftest.$ac_ext >&5
12465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466 ac_lo=`expr $ac_mid + 1`
12467 if test $ac_lo -le $ac_mid; then
12468 ac_lo= ac_hi=
12469 break
12470 fi
12471 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473
12474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012475 done
12476else
Benjamin Petersona8332062009-09-11 22:36:27 +000012477 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012478sed 's/^/| /' conftest.$ac_ext >&5
12479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012481/* confdefs.h. */
12482_ACEOF
12483cat confdefs.h >>conftest.$ac_ext
12484cat >>conftest.$ac_ext <<_ACEOF
12485/* end confdefs.h. */
12486$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012487int
12488main ()
12489{
Benjamin Petersona8332062009-09-11 22:36:27 +000012490static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012491test_array [0] = 0
12492
12493 ;
12494 return 0;
12495}
12496_ACEOF
12497rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498if { (ac_try="$ac_compile"
12499case "(($ac_try" in
12500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12501 *) ac_try_echo=$ac_try;;
12502esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012503eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12504$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012505 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012506 ac_status=$?
12507 grep -v '^ *+' conftest.er1 >conftest.err
12508 rm -f conftest.er1
12509 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012510 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012511 (exit $ac_status); } && {
12512 test -z "$ac_c_werror_flag" ||
12513 test ! -s conftest.err
12514 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012515 ac_hi=-1 ac_mid=-1
12516 while :; do
12517 cat >conftest.$ac_ext <<_ACEOF
12518/* confdefs.h. */
12519_ACEOF
12520cat confdefs.h >>conftest.$ac_ext
12521cat >>conftest.$ac_ext <<_ACEOF
12522/* end confdefs.h. */
12523$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012524int
12525main ()
12526{
Benjamin Petersona8332062009-09-11 22:36:27 +000012527static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012528test_array [0] = 0
12529
12530 ;
12531 return 0;
12532}
12533_ACEOF
12534rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535if { (ac_try="$ac_compile"
12536case "(($ac_try" in
12537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12538 *) ac_try_echo=$ac_try;;
12539esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012540eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12541$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012543 ac_status=$?
12544 grep -v '^ *+' conftest.er1 >conftest.err
12545 rm -f conftest.er1
12546 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012547 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548 (exit $ac_status); } && {
12549 test -z "$ac_c_werror_flag" ||
12550 test ! -s conftest.err
12551 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012552 ac_lo=$ac_mid; break
12553else
Benjamin Petersona8332062009-09-11 22:36:27 +000012554 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012555sed 's/^/| /' conftest.$ac_ext >&5
12556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012557 ac_hi=`expr '(' $ac_mid ')' - 1`
12558 if test $ac_mid -le $ac_hi; then
12559 ac_lo= ac_hi=
12560 break
12561 fi
12562 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564
12565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012566 done
12567else
Benjamin Petersona8332062009-09-11 22:36:27 +000012568 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012569sed 's/^/| /' conftest.$ac_ext >&5
12570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573
12574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012576
12577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012578# Binary search between lo and hi bounds.
12579while test "x$ac_lo" != "x$ac_hi"; do
12580 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12581 cat >conftest.$ac_ext <<_ACEOF
12582/* confdefs.h. */
12583_ACEOF
12584cat confdefs.h >>conftest.$ac_ext
12585cat >>conftest.$ac_ext <<_ACEOF
12586/* end confdefs.h. */
12587$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012588int
12589main ()
12590{
Benjamin Petersona8332062009-09-11 22:36:27 +000012591static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012592test_array [0] = 0
12593
12594 ;
12595 return 0;
12596}
12597_ACEOF
12598rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599if { (ac_try="$ac_compile"
12600case "(($ac_try" in
12601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12602 *) ac_try_echo=$ac_try;;
12603esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012604eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12605$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012607 ac_status=$?
12608 grep -v '^ *+' conftest.er1 >conftest.err
12609 rm -f conftest.er1
12610 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012611 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012612 (exit $ac_status); } && {
12613 test -z "$ac_c_werror_flag" ||
12614 test ! -s conftest.err
12615 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012616 ac_hi=$ac_mid
12617else
Benjamin Petersona8332062009-09-11 22:36:27 +000012618 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012619sed 's/^/| /' conftest.$ac_ext >&5
12620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012621 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012623
12624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012625done
12626case $ac_lo in
12627?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628'') if test "$ac_cv_type__Bool" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000012629 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12630$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12631{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012632See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012633$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012634See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000012635 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012636 else
12637 ac_cv_sizeof__Bool=0
12638 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012639esac
12640else
12641 cat >conftest.$ac_ext <<_ACEOF
12642/* confdefs.h. */
12643_ACEOF
12644cat confdefs.h >>conftest.$ac_ext
12645cat >>conftest.$ac_ext <<_ACEOF
12646/* end confdefs.h. */
12647$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +000012648static long int longval () { return (long int) (sizeof (_Bool)); }
12649static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012650#include <stdio.h>
12651#include <stdlib.h>
12652int
12653main ()
12654{
12655
12656 FILE *f = fopen ("conftest.val", "w");
12657 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012658 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000012659 if (((long int) (sizeof (_Bool))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012660 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000012662 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012663 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000012664 fprintf (f, "%ld", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012665 }
12666 else
12667 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000012669 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012670 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000012671 fprintf (f, "%lu", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012672 }
Benjamin Petersona8332062009-09-11 22:36:27 +000012673 /* Do not output a trailing newline, as this causes \r\n confusion
12674 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012676
12677 ;
12678 return 0;
12679}
12680_ACEOF
12681rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012682if { (ac_try="$ac_link"
12683case "(($ac_try" in
12684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12685 *) ac_try_echo=$ac_try;;
12686esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012687eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12688$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012690 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000012691 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693 { (case "(($ac_try" in
12694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12695 *) ac_try_echo=$ac_try;;
12696esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012697eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12698$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012700 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000012701 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012702 (exit $ac_status); }; }; then
12703 ac_cv_sizeof__Bool=`cat conftest.val`
12704else
Benjamin Petersona8332062009-09-11 22:36:27 +000012705 $as_echo "$as_me: program exited with status $ac_status" >&5
12706$as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012707sed 's/^/| /' conftest.$ac_ext >&5
12708
12709( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710if test "$ac_cv_type__Bool" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000012711 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12713{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012714See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012715$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012716See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000012717 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718 else
12719 ac_cv_sizeof__Bool=0
12720 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012721fi
Benjamin Petersona8332062009-09-11 22:36:27 +000012722rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723rm -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 +000012724fi
12725rm -f conftest.val
12726fi
Benjamin Petersona8332062009-09-11 22:36:27 +000012727{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12728$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729
12730
12731
Thomas Woutersb2137042007-02-01 18:02:27 +000012732cat >>confdefs.h <<_ACEOF
12733#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12734_ACEOF
12735
12736
12737fi
12738
Benjamin Petersona8332062009-09-11 22:36:27 +000012739{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
12740$as_echo_n "checking for uintptr_t... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012741if test "${ac_cv_type_uintptr_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000012742 $as_echo_n "(cached) " >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012743else
Benjamin Petersona8332062009-09-11 22:36:27 +000012744 ac_cv_type_uintptr_t=no
12745cat >conftest.$ac_ext <<_ACEOF
12746/* confdefs.h. */
12747_ACEOF
12748cat confdefs.h >>conftest.$ac_ext
12749cat >>conftest.$ac_ext <<_ACEOF
12750/* end confdefs.h. */
12751#ifdef HAVE_STDINT_H
12752 #include <stdint.h>
12753 #endif
12754
12755int
12756main ()
12757{
12758if (sizeof (uintptr_t))
12759 return 0;
12760 ;
12761 return 0;
12762}
12763_ACEOF
12764rm -f conftest.$ac_objext
12765if { (ac_try="$ac_compile"
12766case "(($ac_try" in
12767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12768 *) ac_try_echo=$ac_try;;
12769esac
12770eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12771$as_echo "$ac_try_echo") >&5
12772 (eval "$ac_compile") 2>conftest.er1
12773 ac_status=$?
12774 grep -v '^ *+' conftest.er1 >conftest.err
12775 rm -f conftest.er1
12776 cat conftest.err >&5
12777 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12778 (exit $ac_status); } && {
12779 test -z "$ac_c_werror_flag" ||
12780 test ! -s conftest.err
12781 } && test -s conftest.$ac_objext; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012783/* confdefs.h. */
12784_ACEOF
12785cat confdefs.h >>conftest.$ac_ext
12786cat >>conftest.$ac_ext <<_ACEOF
12787/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012788#ifdef HAVE_STDINT_H
12789 #include <stdint.h>
12790 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012791
Martin v. Löwis11437992002-04-12 09:54:03 +000012792int
12793main ()
12794{
Benjamin Petersona8332062009-09-11 22:36:27 +000012795if (sizeof ((uintptr_t)))
12796 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 ;
12798 return 0;
12799}
12800_ACEOF
12801rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802if { (ac_try="$ac_compile"
12803case "(($ac_try" in
12804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12805 *) ac_try_echo=$ac_try;;
12806esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012807eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12808$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012811 grep -v '^ *+' conftest.er1 >conftest.err
12812 rm -f conftest.er1
12813 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012814 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815 (exit $ac_status); } && {
12816 test -z "$ac_c_werror_flag" ||
12817 test ! -s conftest.err
12818 } && test -s conftest.$ac_objext; then
Benjamin Petersona8332062009-09-11 22:36:27 +000012819 :
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012820else
Benjamin Petersona8332062009-09-11 22:36:27 +000012821 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012822sed 's/^/| /' conftest.$ac_ext >&5
12823
Benjamin Petersona8332062009-09-11 22:36:27 +000012824 ac_cv_type_uintptr_t=yes
12825fi
12826
12827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12828else
12829 $as_echo "$as_me: failed program was:" >&5
12830sed 's/^/| /' conftest.$ac_ext >&5
12831
12832
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834
12835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012836fi
Benjamin Petersona8332062009-09-11 22:36:27 +000012837{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12838$as_echo "$ac_cv_type_uintptr_t" >&6; }
12839if test "x$ac_cv_type_uintptr_t" = x""yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012840
12841cat >>confdefs.h <<_ACEOF
12842#define HAVE_UINTPTR_T 1
12843_ACEOF
12844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012845# The cast to long int works around a bug in the HP C Compiler
12846# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12847# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12848# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +000012849{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12850$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012851if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000012852 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012853else
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 if test "$cross_compiling" = yes; then
12855 # Depending upon the size, compute the lo and hi bounds.
12856cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012857/* confdefs.h. */
12858_ACEOF
12859cat confdefs.h >>conftest.$ac_ext
12860cat >>conftest.$ac_ext <<_ACEOF
12861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012862$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012863int
12864main ()
12865{
Benjamin Petersona8332062009-09-11 22:36:27 +000012866static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012867test_array [0] = 0
12868
12869 ;
12870 return 0;
12871}
12872_ACEOF
12873rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874if { (ac_try="$ac_compile"
12875case "(($ac_try" in
12876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12877 *) ac_try_echo=$ac_try;;
12878esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012879eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12880$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012883 grep -v '^ *+' conftest.er1 >conftest.err
12884 rm -f conftest.er1
12885 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012886 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887 (exit $ac_status); } && {
12888 test -z "$ac_c_werror_flag" ||
12889 test ! -s conftest.err
12890 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 ac_lo=0 ac_mid=0
12892 while :; do
12893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012894/* confdefs.h. */
12895_ACEOF
12896cat confdefs.h >>conftest.$ac_ext
12897cat >>conftest.$ac_ext <<_ACEOF
12898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012899$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012900int
12901main ()
12902{
Benjamin Petersona8332062009-09-11 22:36:27 +000012903static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012904test_array [0] = 0
12905
12906 ;
12907 return 0;
12908}
12909_ACEOF
12910rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911if { (ac_try="$ac_compile"
12912case "(($ac_try" in
12913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12914 *) ac_try_echo=$ac_try;;
12915esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012916eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12917$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012920 grep -v '^ *+' conftest.er1 >conftest.err
12921 rm -f conftest.er1
12922 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012923 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924 (exit $ac_status); } && {
12925 test -z "$ac_c_werror_flag" ||
12926 test ! -s conftest.err
12927 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 ac_hi=$ac_mid; break
12929else
Benjamin Petersona8332062009-09-11 22:36:27 +000012930 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012931sed 's/^/| /' conftest.$ac_ext >&5
12932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933 ac_lo=`expr $ac_mid + 1`
12934 if test $ac_lo -le $ac_mid; then
12935 ac_lo= ac_hi=
12936 break
12937 fi
12938 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940
12941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 done
12943else
Benjamin Petersona8332062009-09-11 22:36:27 +000012944 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012945sed 's/^/| /' conftest.$ac_ext >&5
12946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012948/* confdefs.h. */
12949_ACEOF
12950cat confdefs.h >>conftest.$ac_ext
12951cat >>conftest.$ac_ext <<_ACEOF
12952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012953$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012954int
12955main ()
12956{
Benjamin Petersona8332062009-09-11 22:36:27 +000012957static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012958test_array [0] = 0
12959
12960 ;
12961 return 0;
12962}
12963_ACEOF
12964rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965if { (ac_try="$ac_compile"
12966case "(($ac_try" in
12967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12968 *) ac_try_echo=$ac_try;;
12969esac
Benjamin Petersona8332062009-09-11 22:36:27 +000012970eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12971$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012974 grep -v '^ *+' conftest.er1 >conftest.err
12975 rm -f conftest.er1
12976 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000012977 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978 (exit $ac_status); } && {
12979 test -z "$ac_c_werror_flag" ||
12980 test ! -s conftest.err
12981 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 ac_hi=-1 ac_mid=-1
12983 while :; do
12984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012985/* confdefs.h. */
12986_ACEOF
12987cat confdefs.h >>conftest.$ac_ext
12988cat >>conftest.$ac_ext <<_ACEOF
12989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012990$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012991int
12992main ()
12993{
Benjamin Petersona8332062009-09-11 22:36:27 +000012994static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012995test_array [0] = 0
12996
12997 ;
12998 return 0;
12999}
13000_ACEOF
13001rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013002if { (ac_try="$ac_compile"
13003case "(($ac_try" in
13004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13005 *) ac_try_echo=$ac_try;;
13006esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013007eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13008$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013009 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013011 grep -v '^ *+' conftest.er1 >conftest.err
13012 rm -f conftest.er1
13013 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000013014 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013015 (exit $ac_status); } && {
13016 test -z "$ac_c_werror_flag" ||
13017 test ! -s conftest.err
13018 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013019 ac_lo=$ac_mid; break
13020else
Benjamin Petersona8332062009-09-11 22:36:27 +000013021 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013022sed 's/^/| /' conftest.$ac_ext >&5
13023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013024 ac_hi=`expr '(' $ac_mid ')' - 1`
13025 if test $ac_mid -le $ac_hi; then
13026 ac_lo= ac_hi=
13027 break
13028 fi
13029 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000013030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031
13032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 done
13034else
Benjamin Petersona8332062009-09-11 22:36:27 +000013035 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013036sed 's/^/| /' conftest.$ac_ext >&5
13037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013038 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000013039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013040
13041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013043
13044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013045# Binary search between lo and hi bounds.
13046while test "x$ac_lo" != "x$ac_hi"; do
13047 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013049/* confdefs.h. */
13050_ACEOF
13051cat confdefs.h >>conftest.$ac_ext
13052cat >>conftest.$ac_ext <<_ACEOF
13053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013054$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013055int
13056main ()
13057{
Benjamin Petersona8332062009-09-11 22:36:27 +000013058static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000013059test_array [0] = 0
13060
13061 ;
13062 return 0;
13063}
13064_ACEOF
13065rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013066if { (ac_try="$ac_compile"
13067case "(($ac_try" in
13068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13069 *) ac_try_echo=$ac_try;;
13070esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013071eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13072$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013075 grep -v '^ *+' conftest.er1 >conftest.err
13076 rm -f conftest.er1
13077 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000013078 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079 (exit $ac_status); } && {
13080 test -z "$ac_c_werror_flag" ||
13081 test ! -s conftest.err
13082 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013083 ac_hi=$ac_mid
13084else
Benjamin Petersona8332062009-09-11 22:36:27 +000013085 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013086sed 's/^/| /' conftest.$ac_ext >&5
13087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013088 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013090
13091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013092done
13093case $ac_lo in
13094?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013095'') if test "$ac_cv_type_uintptr_t" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000013096 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13098{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013099See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000013100$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013101See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000013102 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013103 else
13104 ac_cv_sizeof_uintptr_t=0
13105 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013106esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013107else
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013109/* confdefs.h. */
13110_ACEOF
13111cat confdefs.h >>conftest.$ac_ext
13112cat >>conftest.$ac_ext <<_ACEOF
13113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013114$ac_includes_default
Benjamin Petersona8332062009-09-11 22:36:27 +000013115static long int longval () { return (long int) (sizeof (uintptr_t)); }
13116static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013117#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013118#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013119int
13120main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013121{
Martin v. Löwis11437992002-04-12 09:54:03 +000013122
13123 FILE *f = fopen ("conftest.val", "w");
13124 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013125 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000013126 if (((long int) (sizeof (uintptr_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013127 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013128 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000013129 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000013131 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 }
13133 else
13134 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013135 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000013136 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013137 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000013138 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 }
Benjamin Petersona8332062009-09-11 22:36:27 +000013140 /* Do not output a trailing newline, as this causes \r\n confusion
13141 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013142 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013143
13144 ;
13145 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013146}
Martin v. Löwis11437992002-04-12 09:54:03 +000013147_ACEOF
13148rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013149if { (ac_try="$ac_link"
13150case "(($ac_try" in
13151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13152 *) ac_try_echo=$ac_try;;
13153esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013154eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13155$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013156 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013157 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000013158 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160 { (case "(($ac_try" in
13161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13162 *) ac_try_echo=$ac_try;;
13163esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013164eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13165$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013166 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013167 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000013168 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 (exit $ac_status); }; }; then
13170 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013171else
Benjamin Petersona8332062009-09-11 22:36:27 +000013172 $as_echo "$as_me: program exited with status $ac_status" >&5
13173$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013174sed 's/^/| /' conftest.$ac_ext >&5
13175
Martin v. Löwis11437992002-04-12 09:54:03 +000013176( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177if test "$ac_cv_type_uintptr_t" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000013178 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13179$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13180{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013181See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000013182$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013183See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000013184 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013185 else
13186 ac_cv_sizeof_uintptr_t=0
13187 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013188fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013189rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013190rm -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 +000013191fi
13192rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013193fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013194{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13195$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013196
13197
13198
Martin v. Löwis11437992002-04-12 09:54:03 +000013199cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013200#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013201_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013202
Michael W. Hudson54241132001-12-07 15:38:26 +000013203
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013204fi
13205
Thomas Wouters89f507f2006-12-13 04:49:30 +000013206
13207
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013208# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Benjamin Petersona8332062009-09-11 22:36:27 +000013209{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
13210$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013211if test "${ac_cv_sizeof_off_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000013212 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013213else
13214 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013215 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013216else
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013218/* confdefs.h. */
13219_ACEOF
13220cat confdefs.h >>conftest.$ac_ext
13221cat >>conftest.$ac_ext <<_ACEOF
13222/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013223#include <stdio.h>
13224#include <sys/types.h>
13225main()
13226{
13227 FILE *f=fopen("conftestval", "w");
13228 if (!f) exit(1);
13229 fprintf(f, "%d\n", sizeof(off_t));
13230 exit(0);
13231}
Martin v. Löwis11437992002-04-12 09:54:03 +000013232_ACEOF
13233rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013234if { (ac_try="$ac_link"
13235case "(($ac_try" in
13236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13237 *) ac_try_echo=$ac_try;;
13238esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013239eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13240$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013241 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013242 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000013243 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013245 { (case "(($ac_try" in
13246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13247 *) ac_try_echo=$ac_try;;
13248esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013249eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13250$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013251 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000013253 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013254 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013255 ac_cv_sizeof_off_t=`cat conftestval`
13256else
Benjamin Petersona8332062009-09-11 22:36:27 +000013257 $as_echo "$as_me: program exited with status $ac_status" >&5
13258$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013259sed 's/^/| /' conftest.$ac_ext >&5
13260
Martin v. Löwis11437992002-04-12 09:54:03 +000013261( exit $ac_status )
13262ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013263fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013264rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013265rm -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 +000013266fi
13267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268
13269
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013270fi
13271
Benjamin Petersona8332062009-09-11 22:36:27 +000013272{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13273$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
13275cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013276#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013277_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013278
Michael W. Hudson54241132001-12-07 15:38:26 +000013279
Benjamin Petersona8332062009-09-11 22:36:27 +000013280{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13281$as_echo_n "checking whether to enable large file support... " >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013282if test "$have_long_long" = yes -a \
13283 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13284 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013285
Martin v. Löwis11437992002-04-12 09:54:03 +000013286cat >>confdefs.h <<\_ACEOF
13287#define HAVE_LARGEFILE_SUPPORT 1
13288_ACEOF
13289
Benjamin Petersona8332062009-09-11 22:36:27 +000013290 { $as_echo "$as_me:$LINENO: result: yes" >&5
13291$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013292else
Benjamin Petersona8332062009-09-11 22:36:27 +000013293 { $as_echo "$as_me:$LINENO: result: no" >&5
13294$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013295fi
13296
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013297# AC_CHECK_SIZEOF() doesn't include <time.h>.
Benjamin Petersona8332062009-09-11 22:36:27 +000013298{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5
13299$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013300if test "${ac_cv_sizeof_time_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000013301 $as_echo_n "(cached) " >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013302else
13303 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013304 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013305else
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013307/* confdefs.h. */
13308_ACEOF
13309cat confdefs.h >>conftest.$ac_ext
13310cat >>conftest.$ac_ext <<_ACEOF
13311/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013312#include <stdio.h>
13313#include <time.h>
13314main()
13315{
13316 FILE *f=fopen("conftestval", "w");
13317 if (!f) exit(1);
13318 fprintf(f, "%d\n", sizeof(time_t));
13319 exit(0);
13320}
Martin v. Löwis11437992002-04-12 09:54:03 +000013321_ACEOF
13322rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323if { (ac_try="$ac_link"
13324case "(($ac_try" in
13325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13326 *) ac_try_echo=$ac_try;;
13327esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013328eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13329$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013331 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000013332 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013333 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334 { (case "(($ac_try" in
13335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13336 *) ac_try_echo=$ac_try;;
13337esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013338eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13339$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013341 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000013342 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013343 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013344 ac_cv_sizeof_time_t=`cat conftestval`
13345else
Benjamin Petersona8332062009-09-11 22:36:27 +000013346 $as_echo "$as_me: program exited with status $ac_status" >&5
13347$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013348sed 's/^/| /' conftest.$ac_ext >&5
13349
Martin v. Löwis11437992002-04-12 09:54:03 +000013350( exit $ac_status )
13351ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013352fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013353rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013354rm -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 +000013355fi
13356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357
13358
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013359fi
13360
Benjamin Petersona8332062009-09-11 22:36:27 +000013361{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13362$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013363
13364cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013365#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013366_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013367
Michael W. Hudson54241132001-12-07 15:38:26 +000013368
13369
Trent Mick635f6fb2000-08-23 21:33:05 +000013370# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013371ac_save_cc="$CC"
13372if test "$ac_cv_kpthread" = "yes"
13373then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013374elif test "$ac_cv_kthread" = "yes"
13375then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013376elif test "$ac_cv_pthread" = "yes"
13377then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013378fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013379{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5
13380$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013381have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013382cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013383/* confdefs.h. */
13384_ACEOF
13385cat confdefs.h >>conftest.$ac_ext
13386cat >>conftest.$ac_ext <<_ACEOF
13387/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013388#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013389int
13390main ()
13391{
Guido van Rossum12580492000-09-24 16:47:19 +000013392pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 ;
13394 return 0;
13395}
13396_ACEOF
13397rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398if { (ac_try="$ac_compile"
13399case "(($ac_try" in
13400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13401 *) ac_try_echo=$ac_try;;
13402esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013403eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13404$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013407 grep -v '^ *+' conftest.er1 >conftest.err
13408 rm -f conftest.er1
13409 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000013410 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013411 (exit $ac_status); } && {
13412 test -z "$ac_c_werror_flag" ||
13413 test ! -s conftest.err
13414 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013415 have_pthread_t=yes
13416else
Benjamin Petersona8332062009-09-11 22:36:27 +000013417 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013418sed 's/^/| /' conftest.$ac_ext >&5
13419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420
Trent Mick635f6fb2000-08-23 21:33:05 +000013421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422
13423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000013424{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13425$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013426if test "$have_pthread_t" = yes ; then
13427 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Benjamin Petersona8332062009-09-11 22:36:27 +000013428 { $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5
13429$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000013431 $as_echo_n "(cached) " >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013432else
13433 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013434 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013435else
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013437/* confdefs.h. */
13438_ACEOF
13439cat confdefs.h >>conftest.$ac_ext
13440cat >>conftest.$ac_ext <<_ACEOF
13441/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013442#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013443#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013444 main()
13445 {
13446 FILE *f=fopen("conftestval", "w");
13447 if (!f) exit(1);
13448 fprintf(f, "%d\n", sizeof(pthread_t));
13449 exit(0);
13450 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013451_ACEOF
13452rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013453if { (ac_try="$ac_link"
13454case "(($ac_try" in
13455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13456 *) ac_try_echo=$ac_try;;
13457esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013458eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13459$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013460 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013461 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000013462 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013464 { (case "(($ac_try" in
13465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13466 *) ac_try_echo=$ac_try;;
13467esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013468eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13469$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013470 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000013472 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013473 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013474 ac_cv_sizeof_pthread_t=`cat conftestval`
13475else
Benjamin Petersona8332062009-09-11 22:36:27 +000013476 $as_echo "$as_me: program exited with status $ac_status" >&5
13477$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013478sed 's/^/| /' conftest.$ac_ext >&5
13479
Martin v. Löwis11437992002-04-12 09:54:03 +000013480( exit $ac_status )
13481ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013482fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013483rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013484rm -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 +000013485fi
13486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013487
13488
Trent Mick635f6fb2000-08-23 21:33:05 +000013489fi
13490
Benjamin Petersona8332062009-09-11 22:36:27 +000013491 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13492$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013493
13494cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013495#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013496_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013497
13498fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013499CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013500
Michael W. Hudson54241132001-12-07 15:38:26 +000013501
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013502
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013503
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013504case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013505 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013506 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13507 ;;
13508 Darwin/*)
13509 OTHER_LIBTOOL_OPT=""
13510 ;;
13511esac
13512
13513
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013514ARCH_RUN_32BIT=""
13515
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013516case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013517 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013518 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13519 if test "${enable_universalsdk}"; then
13520 :
13521 else
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013522 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013523 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013524 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013525 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013526 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013527 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13528 if test ${gcc_version} '<' 4.0
13529 then
13530 LIBTOOL_CRUFT="-lcc_dynamic"
13531 else
13532 LIBTOOL_CRUFT=""
13533 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013534 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013535 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013536else
13537 cat >conftest.$ac_ext <<_ACEOF
13538/* confdefs.h. */
13539_ACEOF
13540cat confdefs.h >>conftest.$ac_ext
13541cat >>conftest.$ac_ext <<_ACEOF
13542/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013543
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013544 #include <unistd.h>
13545 int main(int argc, char*argv[])
13546 {
13547 if (sizeof(long) == 4) {
13548 return 0;
13549 } else {
13550 return 1;
13551 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013552 }
13553
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013554_ACEOF
13555rm -f conftest$ac_exeext
13556if { (ac_try="$ac_link"
13557case "(($ac_try" in
13558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13559 *) ac_try_echo=$ac_try;;
13560esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013561eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13562$as_echo "$ac_try_echo") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013563 (eval "$ac_link") 2>&5
13564 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000013565 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013566 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13567 { (case "(($ac_try" in
13568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13569 *) ac_try_echo=$ac_try;;
13570esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013571eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13572$as_echo "$ac_try_echo") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013573 (eval "$ac_try") 2>&5
13574 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000013575 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013576 (exit $ac_status); }; }; then
13577 ac_osx_32bit=yes
13578else
Benjamin Petersona8332062009-09-11 22:36:27 +000013579 $as_echo "$as_me: program exited with status $ac_status" >&5
13580$as_echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013581sed 's/^/| /' conftest.$ac_ext >&5
13582
13583( exit $ac_status )
13584ac_osx_32bit=no
13585fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013586rm -rf conftest.dSYM
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13588fi
13589
13590
13591
13592 if test "${ac_osx_32bit}" = "yes"; then
13593 case `arch` in
13594 i386)
13595 MACOSX_DEFAULT_ARCH="i386"
13596 ;;
13597 ppc)
13598 MACOSX_DEFAULT_ARCH="ppc"
13599 ;;
13600 *)
Benjamin Petersona8332062009-09-11 22:36:27 +000013601 { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13602$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013603 { (exit 1); exit 1; }; }
13604 ;;
13605 esac
13606 else
13607 case `arch` in
13608 i386)
13609 MACOSX_DEFAULT_ARCH="x86_64"
13610 ;;
13611 ppc)
13612 MACOSX_DEFAULT_ARCH="ppc64"
13613 ;;
13614 *)
Benjamin Petersona8332062009-09-11 22:36:27 +000013615 { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13616$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013617 { (exit 1); exit 1; }; }
13618 ;;
13619 esac
13620
13621 #ARCH_RUN_32BIT="true"
13622 fi
13623
13624 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013625 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013626 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013627esac
13628
Benjamin Petersona8332062009-09-11 22:36:27 +000013629{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5
13630$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013631if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013632then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013633 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013634 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013635 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013636
Martin v. Löwis11437992002-04-12 09:54:03 +000013637cat >>confdefs.h <<\_ACEOF
13638#define WITH_NEXT_FRAMEWORK 1
13639_ACEOF
13640
Benjamin Petersona8332062009-09-11 22:36:27 +000013641 { $as_echo "$as_me:$LINENO: result: yes" >&5
13642$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013643 if test $enable_shared = "yes"
13644 then
Benjamin Petersona8332062009-09-11 22:36:27 +000013645 { { $as_echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13646$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 +000013647 { (exit 1); exit 1; }; }
13648 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013649else
Benjamin Petersona8332062009-09-11 22:36:27 +000013650 { $as_echo "$as_me:$LINENO: result: no" >&5
13651$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013652fi
13653
Benjamin Petersona8332062009-09-11 22:36:27 +000013654{ $as_echo "$as_me:$LINENO: checking for dyld" >&5
13655$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013656case $ac_sys_system/$ac_sys_release in
13657 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013658
Martin v. Löwis11437992002-04-12 09:54:03 +000013659cat >>confdefs.h <<\_ACEOF
13660#define WITH_DYLD 1
13661_ACEOF
13662
Benjamin Petersona8332062009-09-11 22:36:27 +000013663 { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5
13664$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013665 ;;
13666 *)
Benjamin Petersona8332062009-09-11 22:36:27 +000013667 { $as_echo "$as_me:$LINENO: result: no" >&5
13668$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013669 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013670esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013671
Guido van Rossum0a516c91994-09-12 10:58:40 +000013672# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013673
Michael W. Hudson54241132001-12-07 15:38:26 +000013674
13675
13676
13677
Guido van Rossum0a516c91994-09-12 10:58:40 +000013678# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013679# -- usually .so, .sl on HP-UX, .dll on Cygwin
Benjamin Petersona8332062009-09-11 22:36:27 +000013680{ $as_echo "$as_me:$LINENO: checking SO" >&5
13681$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013682if test -z "$SO"
13683then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013684 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013685 hp*|HP*)
13686 case `uname -m` in
13687 ia64) SO=.so;;
13688 *) SO=.sl;;
13689 esac
13690 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013691 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013692 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013693 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013694else
13695 # this might also be a termcap variable, see #610332
13696 echo
13697 echo '====================================================================='
13698 echo '+ +'
13699 echo '+ WARNING: You have set SO in your environment. +'
13700 echo '+ Do you really mean to change the extension for shared libraries? +'
13701 echo '+ Continuing in 10 seconds to let you to ponder. +'
13702 echo '+ +'
13703 echo '====================================================================='
13704 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013705fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013706{ $as_echo "$as_me:$LINENO: result: $SO" >&5
13707$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013708
Georg Brandlb1441c72009-01-03 22:33:39 +000013709
Thomas Wouters477c8d52006-05-27 19:21:47 +000013710cat >>confdefs.h <<_ACEOF
13711#define SHLIB_EXT "$SO"
13712_ACEOF
13713
Guido van Rossum0a516c91994-09-12 10:58:40 +000013714# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013715# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013716# (Shared libraries in this instance are shared modules to be loaded into
13717# Python, as opposed to building Python itself as a shared library.)
Benjamin Petersona8332062009-09-11 22:36:27 +000013718{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5
13719$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013720if test -z "$LDSHARED"
13721then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013722 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013723 AIX*)
13724 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013725 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013726 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013727 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013728 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013730 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013731 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013732 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013733 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013734 hp*|HP*)
13735 if test "$GCC" = "yes"
13736 then LDSHARED='$(CC) -shared'
13737 else LDSHARED='ld -b';
13738 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013739 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013740 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013741 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13742 if test "$enable_framework" ; then
13743 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013744 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13745 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013746 else
13747 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013748 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013749 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013750 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013751 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13752 if test "$enable_framework" ; then
13753 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013754 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13755 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013756 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013757 # No framework, use the Python app as bundle-loader
13758 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013759 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013760 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013761 Darwin/*)
13762 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13763 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013764
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013765 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013766 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013767 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013768 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013769 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013770 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13771 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013772 else
13773 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13774 if test "$enable_framework" ; then
13775 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013776 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13777 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013778 else
13779 # No framework, use the Python app as bundle-loader
13780 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13781 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13782 fi
13783 fi
13784 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013785 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013786 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013787 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013788 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013789 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013790 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013791 else
13792 LDSHARED="ld -Bshareable ${LDFLAGS}"
13793 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013794 OpenBSD*)
13795 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13796 then
13797 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13798 else
13799 case `uname -r` in
13800 [01].* | 2.[0-7] | 2.[0-7].*)
13801 LDSHARED="ld -Bshareable ${LDFLAGS}"
13802 ;;
13803 *)
13804 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13805 ;;
13806 esac
13807 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013808 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013809 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013810 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013811 then LDSHARED='$(CC) -shared'
13812 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013813 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013814 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013815 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013816 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013817 *) LDSHARED="ld";;
13818 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013819fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013820{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5
13821$as_echo "$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013822BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013823# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013824# library (module) -- this is only needed for a few systems
Benjamin Petersona8332062009-09-11 22:36:27 +000013825{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5
13826$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013827if test -z "$CCSHARED"
13828then
Guido van Rossum07397971997-04-29 21:49:50 +000013829 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013830 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013831 then CCSHARED="-fPIC";
13832 elif test `uname -p` = sparc;
13833 then CCSHARED="-xcode=pic32";
13834 else CCSHARED="-Kpic";
13835 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013836 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013837 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013838 else CCSHARED="+z";
13839 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013840 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013841 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013842 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013843 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013844 if test "$GCC" = "yes"
13845 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013846 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013847 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013848 SCO_SV*)
13849 if test "$GCC" = "yes"
13850 then CCSHARED="-fPIC"
13851 else CCSHARED="-Kpic -belf"
13852 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013853 IRIX*/6*) case $CC in
13854 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013855 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013856 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013857 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013858 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013859fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013860{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5
13861$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013862# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013863# the python executable -- this is only needed for a few systems
Benjamin Petersona8332062009-09-11 22:36:27 +000013864{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13865$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013866if test -z "$LINKFORSHARED"
13867then
Guido van Rossum07397971997-04-29 21:49:50 +000013868 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013869 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013870 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013871 LINKFORSHARED="-Wl,-E -Wl,+s";;
13872# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013873 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013874 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013875 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013877 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013878 if test "$enable_framework"
13879 then
Jack Jansenda49e192005-01-07 13:08:22 +000013880 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013881 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013882 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013883 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013884 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013885 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013886 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013887 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13888 then
13889 LINKFORSHARED="-Wl,--export-dynamic"
13890 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013891 SunOS/5*) case $CC in
13892 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013893 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013894 then
13895 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013896 fi;;
13897 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013898 CYGWIN*)
13899 if test $enable_shared = "no"
13900 then
13901 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13902 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013903 QNX*)
13904 # -Wl,-E causes the symbols to be added to the dynamic
13905 # symbol table so that they can be found when a module
13906 # is loaded. -N 2048K causes the stack size to be set
13907 # to 2048 kilobytes so that the stack doesn't overflow
13908 # when running test_compile.py.
13909 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013910 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013911fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013912{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13913$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013914
Michael W. Hudson54241132001-12-07 15:38:26 +000013915
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013916
Benjamin Petersona8332062009-09-11 22:36:27 +000013917{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13918$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013919if test ! "$LIBRARY" = "$LDLIBRARY"
13920then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013921 case $ac_sys_system in
13922 CYGWIN*)
13923 # Cygwin needs CCSHARED when building extension DLLs
13924 # but not when building the interpreter DLL.
13925 CFLAGSFORSHARED='';;
13926 *)
13927 CFLAGSFORSHARED='$(CCSHARED)'
13928 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013929fi
Benjamin Petersona8332062009-09-11 22:36:27 +000013930{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13931$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013932
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013933# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13934# library (with --enable-shared).
13935# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013936# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13937# if it is not required, since it creates a dependency of the shared library
13938# to LIBS. This, in turn, means that applications linking the shared libpython
13939# don't need to link LIBS explicitly. The default should be only changed
13940# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013941
Benjamin Petersona8332062009-09-11 22:36:27 +000013942{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5
13943$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013944case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013945 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013946 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013947esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013948{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5
13949$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013950
13951
Guido van Rossum627b2d71993-12-24 10:39:16 +000013952# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013953
Benjamin Petersona8332062009-09-11 22:36:27 +000013954{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13955$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013956if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000013957 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013958else
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013960LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013961cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013962/* confdefs.h. */
13963_ACEOF
13964cat confdefs.h >>conftest.$ac_ext
13965cat >>conftest.$ac_ext <<_ACEOF
13966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968/* Override any GCC internal prototype to avoid an error.
13969 Use char because int might match the return type of a GCC
13970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013971#ifdef __cplusplus
13972extern "C"
13973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013974char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013975int
13976main ()
13977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ;
13980 return 0;
13981}
13982_ACEOF
13983rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984if { (ac_try="$ac_link"
13985case "(($ac_try" in
13986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13987 *) ac_try_echo=$ac_try;;
13988esac
Benjamin Petersona8332062009-09-11 22:36:27 +000013989eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13990$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013993 grep -v '^ *+' conftest.er1 >conftest.err
13994 rm -f conftest.er1
13995 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000013996 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013997 (exit $ac_status); } && {
13998 test -z "$ac_c_werror_flag" ||
13999 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000014000 } && test -s conftest$ac_exeext && {
14001 test "$cross_compiling" = yes ||
14002 $as_test_x conftest$ac_exeext
14003 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014004 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014005else
Benjamin Petersona8332062009-09-11 22:36:27 +000014006 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014007sed 's/^/| /' conftest.$ac_ext >&5
14008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014009 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014011
Benjamin Petersona8332062009-09-11 22:36:27 +000014012rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014013rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014015LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014016fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014017{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14018$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14019if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014020 cat >>confdefs.h <<_ACEOF
14021#define HAVE_LIBDL 1
14022_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014023
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014024 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014025
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014026fi
14027 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014028
Benjamin Petersona8332062009-09-11 22:36:27 +000014029{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14030$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014031if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014032 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014033else
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014035LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014036cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014037/* confdefs.h. */
14038_ACEOF
14039cat confdefs.h >>conftest.$ac_ext
14040cat >>conftest.$ac_ext <<_ACEOF
14041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014043/* Override any GCC internal prototype to avoid an error.
14044 Use char because int might match the return type of a GCC
14045 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014046#ifdef __cplusplus
14047extern "C"
14048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014049char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014050int
14051main ()
14052{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014053return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 ;
14055 return 0;
14056}
14057_ACEOF
14058rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059if { (ac_try="$ac_link"
14060case "(($ac_try" in
14061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14062 *) ac_try_echo=$ac_try;;
14063esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014064eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14065$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014068 grep -v '^ *+' conftest.er1 >conftest.err
14069 rm -f conftest.er1
14070 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000014071 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072 (exit $ac_status); } && {
14073 test -z "$ac_c_werror_flag" ||
14074 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000014075 } && test -s conftest$ac_exeext && {
14076 test "$cross_compiling" = yes ||
14077 $as_test_x conftest$ac_exeext
14078 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014080else
Benjamin Petersona8332062009-09-11 22:36:27 +000014081 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014082sed 's/^/| /' conftest.$ac_ext >&5
14083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086
Benjamin Petersona8332062009-09-11 22:36:27 +000014087rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014090LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014091fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014092{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14093$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14094if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 cat >>confdefs.h <<_ACEOF
14096#define HAVE_LIBDLD 1
14097_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014098
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014099 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014100
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014101fi
14102 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014103
Georg Brandlb1441c72009-01-03 22:33:39 +000014104# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014105if test "$with_threads" = "yes" -o -z "$with_threads"; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014106 { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14107$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014108if test "${ac_cv_search_sem_init+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014109 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014110else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014111 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014113/* confdefs.h. */
14114_ACEOF
14115cat confdefs.h >>conftest.$ac_ext
14116cat >>conftest.$ac_ext <<_ACEOF
14117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014119/* Override any GCC internal prototype to avoid an error.
14120 Use char because int might match the return type of a GCC
14121 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014122#ifdef __cplusplus
14123extern "C"
14124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014125char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014126int
14127main ()
14128{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014130 ;
14131 return 0;
14132}
14133_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134for ac_lib in '' pthread rt posix4; do
14135 if test -z "$ac_lib"; then
14136 ac_res="none required"
14137 else
14138 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014139 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140 fi
14141 rm -f conftest.$ac_objext conftest$ac_exeext
14142if { (ac_try="$ac_link"
14143case "(($ac_try" in
14144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14145 *) ac_try_echo=$ac_try;;
14146esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014147eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14148$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014150 ac_status=$?
14151 grep -v '^ *+' conftest.er1 >conftest.err
14152 rm -f conftest.er1
14153 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000014154 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155 (exit $ac_status); } && {
14156 test -z "$ac_c_werror_flag" ||
14157 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000014158 } && test -s conftest$ac_exeext && {
14159 test "$cross_compiling" = yes ||
14160 $as_test_x conftest$ac_exeext
14161 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014162 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000014163else
Benjamin Petersona8332062009-09-11 22:36:27 +000014164 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014165sed 's/^/| /' conftest.$ac_ext >&5
14166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167
Thomas Wouters477c8d52006-05-27 19:21:47 +000014168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014169
Benjamin Petersona8332062009-09-11 22:36:27 +000014170rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14172 conftest$ac_exeext
14173 if test "${ac_cv_search_sem_init+set}" = set; then
14174 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176done
14177if test "${ac_cv_search_sem_init+set}" = set; then
14178 :
14179else
14180 ac_cv_search_sem_init=no
14181fi
14182rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014183LIBS=$ac_func_search_save_LIBS
14184fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014185{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
14186$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187ac_res=$ac_cv_search_sem_init
14188if test "$ac_res" != no; then
14189 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014190
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014191fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000014192 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000014193 # posix4 on Solaris 2.6
14194 # pthread (first!) on Linux
14195fi
14196
Martin v. Löwis19d17342003-06-14 21:03:05 +000014197# check if we need libintl for locale functions
Benjamin Petersona8332062009-09-11 22:36:27 +000014198{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
14199$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000014200if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014201 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000014202else
14203 ac_check_lib_save_LIBS=$LIBS
14204LIBS="-lintl $LIBS"
14205cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014206/* confdefs.h. */
14207_ACEOF
14208cat confdefs.h >>conftest.$ac_ext
14209cat >>conftest.$ac_ext <<_ACEOF
14210/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212/* Override any GCC internal prototype to avoid an error.
14213 Use char because int might match the return type of a GCC
14214 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014215#ifdef __cplusplus
14216extern "C"
14217#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000014218char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014219int
14220main ()
14221{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014222return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014223 ;
14224 return 0;
14225}
14226_ACEOF
14227rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014228if { (ac_try="$ac_link"
14229case "(($ac_try" in
14230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14231 *) ac_try_echo=$ac_try;;
14232esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014233eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14234$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000014236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014237 grep -v '^ *+' conftest.er1 >conftest.err
14238 rm -f conftest.er1
14239 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000014240 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241 (exit $ac_status); } && {
14242 test -z "$ac_c_werror_flag" ||
14243 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000014244 } && test -s conftest$ac_exeext && {
14245 test "$cross_compiling" = yes ||
14246 $as_test_x conftest$ac_exeext
14247 }; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014248 ac_cv_lib_intl_textdomain=yes
14249else
Benjamin Petersona8332062009-09-11 22:36:27 +000014250 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014251sed 's/^/| /' conftest.$ac_ext >&5
14252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255
Benjamin Petersona8332062009-09-11 22:36:27 +000014256rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014258 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014259LIBS=$ac_check_lib_save_LIBS
14260fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014261{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14262$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
14263if test "x$ac_cv_lib_intl_textdomain" = x""yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014264
14265cat >>confdefs.h <<\_ACEOF
14266#define WITH_LIBINTL 1
14267_ACEOF
14268
Brett Cannonc6d936e2009-06-07 20:09:53 +000014269 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014270fi
14271
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014272
14273# checks for system dependent C++ extensions support
14274case "$ac_sys_system" in
Benjamin Petersona8332062009-09-11 22:36:27 +000014275 AIX*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14276$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014278/* confdefs.h. */
14279_ACEOF
14280cat confdefs.h >>conftest.$ac_ext
14281cat >>conftest.$ac_ext <<_ACEOF
14282/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014283#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014284int
14285main ()
14286{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014287loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014288 ;
14289 return 0;
14290}
14291_ACEOF
14292rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293if { (ac_try="$ac_link"
14294case "(($ac_try" in
14295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14296 *) ac_try_echo=$ac_try;;
14297esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014298eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14299$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014302 grep -v '^ *+' conftest.er1 >conftest.err
14303 rm -f conftest.er1
14304 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000014305 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306 (exit $ac_status); } && {
14307 test -z "$ac_c_werror_flag" ||
14308 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000014309 } && test -s conftest$ac_exeext && {
14310 test "$cross_compiling" = yes ||
14311 $as_test_x conftest$ac_exeext
14312 }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014313
Martin v. Löwis11437992002-04-12 09:54:03 +000014314cat >>confdefs.h <<\_ACEOF
14315#define AIX_GENUINE_CPLUSPLUS 1
14316_ACEOF
14317
Benjamin Petersona8332062009-09-11 22:36:27 +000014318 { $as_echo "$as_me:$LINENO: result: yes" >&5
14319$as_echo "yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014320else
Benjamin Petersona8332062009-09-11 22:36:27 +000014321 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014322sed 's/^/| /' conftest.$ac_ext >&5
14323
Benjamin Petersona8332062009-09-11 22:36:27 +000014324 { $as_echo "$as_me:$LINENO: result: no" >&5
14325$as_echo "no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327
Benjamin Petersona8332062009-09-11 22:36:27 +000014328rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014330 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014331 *) ;;
14332esac
14333
Guido van Rossum70c7f481998-03-26 18:44:10 +000014334# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Benjamin Petersona8332062009-09-11 22:36:27 +000014335{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14336$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014337if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014338 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014339else
Martin v. Löwis11437992002-04-12 09:54:03 +000014340 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014341LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014342cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014343/* confdefs.h. */
14344_ACEOF
14345cat confdefs.h >>conftest.$ac_ext
14346cat >>conftest.$ac_ext <<_ACEOF
14347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349/* Override any GCC internal prototype to avoid an error.
14350 Use char because int might match the return type of a GCC
14351 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014352#ifdef __cplusplus
14353extern "C"
14354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014355char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014356int
14357main ()
14358{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014360 ;
14361 return 0;
14362}
14363_ACEOF
14364rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365if { (ac_try="$ac_link"
14366case "(($ac_try" in
14367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14368 *) ac_try_echo=$ac_try;;
14369esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014370eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14371$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014374 grep -v '^ *+' conftest.er1 >conftest.err
14375 rm -f conftest.er1
14376 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000014377 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378 (exit $ac_status); } && {
14379 test -z "$ac_c_werror_flag" ||
14380 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000014381 } && test -s conftest$ac_exeext && {
14382 test "$cross_compiling" = yes ||
14383 $as_test_x conftest$ac_exeext
14384 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014386else
Benjamin Petersona8332062009-09-11 22:36:27 +000014387 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014388sed 's/^/| /' conftest.$ac_ext >&5
14389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014390 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014392
Benjamin Petersona8332062009-09-11 22:36:27 +000014393rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014395 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014396LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014397fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014398{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14399$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
14400if test "x$ac_cv_lib_nsl_t_open" = x""yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014401 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014402fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014403 # SVR4
Benjamin Petersona8332062009-09-11 22:36:27 +000014404{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14405$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014406if test "${ac_cv_lib_socket_socket+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014407 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014408else
Martin v. Löwis11437992002-04-12 09:54:03 +000014409 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014410LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014411cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014412/* confdefs.h. */
14413_ACEOF
14414cat confdefs.h >>conftest.$ac_ext
14415cat >>conftest.$ac_ext <<_ACEOF
14416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014418/* Override any GCC internal prototype to avoid an error.
14419 Use char because int might match the return type of a GCC
14420 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014421#ifdef __cplusplus
14422extern "C"
14423#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014424char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014425int
14426main ()
14427{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 ;
14430 return 0;
14431}
14432_ACEOF
14433rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434if { (ac_try="$ac_link"
14435case "(($ac_try" in
14436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14437 *) ac_try_echo=$ac_try;;
14438esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014439eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14440$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014443 grep -v '^ *+' conftest.er1 >conftest.err
14444 rm -f conftest.er1
14445 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000014446 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447 (exit $ac_status); } && {
14448 test -z "$ac_c_werror_flag" ||
14449 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000014450 } && test -s conftest$ac_exeext && {
14451 test "$cross_compiling" = yes ||
14452 $as_test_x conftest$ac_exeext
14453 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014454 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014455else
Benjamin Petersona8332062009-09-11 22:36:27 +000014456 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014457sed 's/^/| /' conftest.$ac_ext >&5
14458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461
Benjamin Petersona8332062009-09-11 22:36:27 +000014462rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014463rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014465LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014466fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014467{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14468$as_echo "$ac_cv_lib_socket_socket" >&6; }
14469if test "x$ac_cv_lib_socket_socket" = x""yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014470 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014471fi
14472 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014473
Benjamin Petersona8332062009-09-11 22:36:27 +000014474{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5
14475$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014478if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479 withval=$with_libs;
Benjamin Petersona8332062009-09-11 22:36:27 +000014480{ $as_echo "$as_me:$LINENO: result: $withval" >&5
14481$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014482LIBS="$withval $LIBS"
14483
14484else
Benjamin Petersona8332062009-09-11 22:36:27 +000014485 { $as_echo "$as_me:$LINENO: result: no" >&5
14486$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487fi
14488
Guido van Rossum7f43da71994-08-01 12:15:30 +000014489
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014490# Check for use of the system libffi library
Benjamin Petersona8332062009-09-11 22:36:27 +000014491{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14492$as_echo_n "checking for --with-system-ffi... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014495if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496 withval=$with_system_ffi;
14497fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014498
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014499
Benjamin Petersona8332062009-09-11 22:36:27 +000014500{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14501$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014502
Matthias Klose55708cc2009-04-30 08:06:49 +000014503# Check for --with-dbmliborder
Benjamin Petersona8332062009-09-11 22:36:27 +000014504{ $as_echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14505$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014506
14507# Check whether --with-dbmliborder was given.
14508if test "${with_dbmliborder+set}" = set; then
14509 withval=$with_dbmliborder;
14510if test x$with_dbmliborder = xyes
14511then
Benjamin Petersona8332062009-09-11 22:36:27 +000014512{ { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14513$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014514 { (exit 1); exit 1; }; }
14515else
14516 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14517 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14518 then
Benjamin Petersona8332062009-09-11 22:36:27 +000014519 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14520$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014521 { (exit 1); exit 1; }; }
14522 fi
14523 done
14524fi
14525fi
14526
Benjamin Petersona8332062009-09-11 22:36:27 +000014527{ $as_echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14528$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014529
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014530# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014531
14532
Benjamin Petersona8332062009-09-11 22:36:27 +000014533{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14534$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014537if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538 withval=$with_signal_module;
14539fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014540
14541
14542if test -z "$with_signal_module"
14543then with_signal_module="yes"
14544fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014545{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5
14546$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014547
14548if test "${with_signal_module}" = "yes"; then
14549 USE_SIGNAL_MODULE=""
14550 SIGNAL_OBJS=""
14551else
14552 USE_SIGNAL_MODULE="#"
14553 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14554fi
14555
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014556# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014557
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014558USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014559
Benjamin Petersona8332062009-09-11 22:36:27 +000014560{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14561$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014562
Guido van Rossumec2f0731997-01-22 20:54:01 +000014563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014565if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014566 withval=$with_dec_threads;
Benjamin Petersona8332062009-09-11 22:36:27 +000014567{ $as_echo "$as_me:$LINENO: result: $withval" >&5
14568$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014569LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014570if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014571 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014572fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014573else
Benjamin Petersona8332062009-09-11 22:36:27 +000014574 { $as_echo "$as_me:$LINENO: result: no" >&5
14575$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576fi
14577
Martin v. Löwis11437992002-04-12 09:54:03 +000014578
14579# Templates for things AC_DEFINEd more than once.
14580# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014581
14582
Martin v. Löwis11437992002-04-12 09:54:03 +000014583
14584
14585
14586
14587
Benjamin Petersona8332062009-09-11 22:36:27 +000014588{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5
14589$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014592if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593 withval=$with_threads;
14594fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014595
14596
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014597# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014600if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014601 withval=$with_thread; with_threads=$with_thread
14602fi
14603
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014604
14605if test -z "$with_threads"
14606then with_threads="yes"
14607fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014608{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5
14609$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014610
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014611
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014612if test "$with_threads" = "no"
14613then
14614 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014615elif test "$ac_cv_pthread_is_default" = yes
14616then
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014618#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014619_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014620
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014621 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014622 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014623#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014624_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014625
14626 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014627 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014628elif test "$ac_cv_kpthread" = "yes"
14629then
14630 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014631 if test "$ac_cv_cxx_thread" = "yes"; then
14632 CXX="$CXX -Kpthread"
14633 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014634 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014635#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014636_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014637
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014638 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014639 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014640elif test "$ac_cv_kthread" = "yes"
14641then
14642 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014643 if test "$ac_cv_cxx_thread" = "yes"; then
14644 CXX="$CXX -Kthread"
14645 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014646 cat >>confdefs.h <<\_ACEOF
14647#define WITH_THREAD 1
14648_ACEOF
14649
14650 posix_threads=yes
14651 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014652elif test "$ac_cv_pthread" = "yes"
14653then
14654 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014655 if test "$ac_cv_cxx_thread" = "yes"; then
14656 CXX="$CXX -pthread"
14657 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014658 cat >>confdefs.h <<\_ACEOF
14659#define WITH_THREAD 1
14660_ACEOF
14661
14662 posix_threads=yes
14663 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014664else
14665 if test ! -z "$with_threads" -a -d "$with_threads"
14666 then LDFLAGS="$LDFLAGS -L$with_threads"
14667 fi
14668 if test ! -z "$withval" -a -d "$withval"
14669 then LDFLAGS="$LDFLAGS -L$withval"
14670 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014671
14672 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014673 # define _POSIX_THREADS in unistd.h. Some apparently don't
14674 # (e.g. gnu pth with pthread emulation)
Benjamin Petersona8332062009-09-11 22:36:27 +000014675 { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14676$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014678/* confdefs.h. */
14679_ACEOF
14680cat confdefs.h >>conftest.$ac_ext
14681cat >>conftest.$ac_ext <<_ACEOF
14682/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014683
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014684#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014685#ifdef _POSIX_THREADS
14686yes
14687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014688
14689_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014690if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014691 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014692 unistd_defines_pthreads=yes
14693else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014694 unistd_defines_pthreads=no
14695fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014696rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014697
Benjamin Petersona8332062009-09-11 22:36:27 +000014698 { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14699$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014700
Martin v. Löwis11437992002-04-12 09:54:03 +000014701 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014702#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014703_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014704
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014706 { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
14707$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014708if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014709 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014710fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014711{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14712$as_echo "$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014713else
Martin v. Löwis11437992002-04-12 09:54:03 +000014714 # Is the header compilable?
Benjamin Petersona8332062009-09-11 22:36:27 +000014715{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14716$as_echo_n "checking cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014717cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014718/* confdefs.h. */
14719_ACEOF
14720cat confdefs.h >>conftest.$ac_ext
14721cat >>conftest.$ac_ext <<_ACEOF
14722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014723$ac_includes_default
14724#include <cthreads.h>
14725_ACEOF
14726rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014727if { (ac_try="$ac_compile"
14728case "(($ac_try" in
14729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14730 *) ac_try_echo=$ac_try;;
14731esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014732eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14733$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014736 grep -v '^ *+' conftest.er1 >conftest.err
14737 rm -f conftest.er1
14738 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000014739 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014740 (exit $ac_status); } && {
14741 test -z "$ac_c_werror_flag" ||
14742 test ! -s conftest.err
14743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014744 ac_header_compiler=yes
14745else
Benjamin Petersona8332062009-09-11 22:36:27 +000014746 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014747sed 's/^/| /' conftest.$ac_ext >&5
14748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014749 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751
14752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000014753{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14754$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014755
14756# Is the header present?
Benjamin Petersona8332062009-09-11 22:36:27 +000014757{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14758$as_echo_n "checking cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014759cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014760/* confdefs.h. */
14761_ACEOF
14762cat confdefs.h >>conftest.$ac_ext
14763cat >>conftest.$ac_ext <<_ACEOF
14764/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014765#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014766_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767if { (ac_try="$ac_cpp conftest.$ac_ext"
14768case "(($ac_try" in
14769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14770 *) ac_try_echo=$ac_try;;
14771esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014772eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14773$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014776 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014777 rm -f conftest.er1
14778 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000014779 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780 (exit $ac_status); } >/dev/null && {
14781 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14782 test ! -s conftest.err
14783 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 ac_header_preproc=yes
14785else
Benjamin Petersona8332062009-09-11 22:36:27 +000014786 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014787sed 's/^/| /' conftest.$ac_ext >&5
14788
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791
Martin v. Löwis11437992002-04-12 09:54:03 +000014792rm -f conftest.err conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000014793{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14794$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
14796# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014797case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14798 yes:no: )
Benjamin Petersona8332062009-09-11 22:36:27 +000014799 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14800$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14801 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14802$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014803 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014804 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014805 no:yes:* )
Benjamin Petersona8332062009-09-11 22:36:27 +000014806 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14807$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14808 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14809$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14810 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14811$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14812 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14813$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14814 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14815$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14816 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14817$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014819## -------------------------------------- ##
14820## Report this to http://bugs.python.org/ ##
14821## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014822_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014824 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014825esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014826{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
14827$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014828if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014829 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014830else
14831 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014832fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014833{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14834$as_echo "$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014835
14836fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014837if test "x$ac_cv_header_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014838 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014839#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014840_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014841
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014843#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014844_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014845
Martin v. Löwis11437992002-04-12 09:54:03 +000014846
14847cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014848#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014849_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014850
14851 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014852 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014853else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014854
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014856 { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14857$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014858if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014859 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014860fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014861{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14862$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014863else
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 # Is the header compilable?
Benjamin Petersona8332062009-09-11 22:36:27 +000014865{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14866$as_echo_n "checking mach/cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014868/* confdefs.h. */
14869_ACEOF
14870cat confdefs.h >>conftest.$ac_ext
14871cat >>conftest.$ac_ext <<_ACEOF
14872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014873$ac_includes_default
14874#include <mach/cthreads.h>
14875_ACEOF
14876rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014877if { (ac_try="$ac_compile"
14878case "(($ac_try" in
14879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14880 *) ac_try_echo=$ac_try;;
14881esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014882eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14883$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014886 grep -v '^ *+' conftest.er1 >conftest.err
14887 rm -f conftest.er1
14888 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000014889 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890 (exit $ac_status); } && {
14891 test -z "$ac_c_werror_flag" ||
14892 test ! -s conftest.err
14893 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 ac_header_compiler=yes
14895else
Benjamin Petersona8332062009-09-11 22:36:27 +000014896 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014897sed 's/^/| /' conftest.$ac_ext >&5
14898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901
14902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000014903{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14904$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014905
14906# Is the header present?
Benjamin Petersona8332062009-09-11 22:36:27 +000014907{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14908$as_echo_n "checking mach/cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014910/* confdefs.h. */
14911_ACEOF
14912cat confdefs.h >>conftest.$ac_ext
14913cat >>conftest.$ac_ext <<_ACEOF
14914/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014915#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014916_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917if { (ac_try="$ac_cpp conftest.$ac_ext"
14918case "(($ac_try" in
14919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14920 *) ac_try_echo=$ac_try;;
14921esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014922eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14923$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014925 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014926 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 rm -f conftest.er1
14928 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000014929 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930 (exit $ac_status); } >/dev/null && {
14931 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14932 test ! -s conftest.err
14933 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014934 ac_header_preproc=yes
14935else
Benjamin Petersona8332062009-09-11 22:36:27 +000014936 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014937sed 's/^/| /' conftest.$ac_ext >&5
14938
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941
Martin v. Löwis11437992002-04-12 09:54:03 +000014942rm -f conftest.err conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000014943{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14944$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014945
14946# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014947case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14948 yes:no: )
Benjamin Petersona8332062009-09-11 22:36:27 +000014949 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14950$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14951 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14952$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014953 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014954 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014955 no:yes:* )
Benjamin Petersona8332062009-09-11 22:36:27 +000014956 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14957$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14958 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14959$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14960 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14961$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14962 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14963$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14964 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14965$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14966 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14967$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014969## -------------------------------------- ##
14970## Report this to http://bugs.python.org/ ##
14971## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014972_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014974 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014975esac
Benjamin Petersona8332062009-09-11 22:36:27 +000014976{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14977$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014978if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000014979 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014980else
14981 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014982fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014983{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14984$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014985
14986fi
Benjamin Petersona8332062009-09-11 22:36:27 +000014987if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014989#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014990_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014991
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014993#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014994_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014995
Martin v. Löwis11437992002-04-12 09:54:03 +000014996
14997cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014998#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014999_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015000
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015001 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015002else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015003
Benjamin Petersona8332062009-09-11 22:36:27 +000015004 { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5
15005$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015008if test "${with_pth+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015009 withval=$with_pth; { $as_echo "$as_me:$LINENO: result: $withval" >&5
15010$as_echo "$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015011 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015012#define WITH_THREAD 1
15013_ACEOF
15014
15015
15016cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015017#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015018_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015019
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015020 LIBS="-lpth $LIBS"
15021 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015022else
Benjamin Petersona8332062009-09-11 22:36:27 +000015023 { $as_echo "$as_me:$LINENO: result: no" >&5
15024$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015025
15026 # Just looking for pthread_create in libpthread is not enough:
15027 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15028 # So we really have to include pthread.h, and then link.
15029 _libs=$LIBS
15030 LIBS="$LIBS -lpthread"
Benjamin Petersona8332062009-09-11 22:36:27 +000015031 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15032$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015034/* confdefs.h. */
15035_ACEOF
15036cat confdefs.h >>conftest.$ac_ext
15037cat >>conftest.$ac_ext <<_ACEOF
15038/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015039#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015040
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015041void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015042int
15043main ()
15044{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015045
15046pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 ;
15048 return 0;
15049}
15050_ACEOF
15051rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052if { (ac_try="$ac_link"
15053case "(($ac_try" in
15054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15055 *) ac_try_echo=$ac_try;;
15056esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015057eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15058$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015061 grep -v '^ *+' conftest.er1 >conftest.err
15062 rm -f conftest.er1
15063 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015064 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065 (exit $ac_status); } && {
15066 test -z "$ac_c_werror_flag" ||
15067 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000015068 } && test -s conftest$ac_exeext && {
15069 test "$cross_compiling" = yes ||
15070 $as_test_x conftest$ac_exeext
15071 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015072
Benjamin Petersona8332062009-09-11 22:36:27 +000015073 { $as_echo "$as_me:$LINENO: result: yes" >&5
15074$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015076#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015077_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015078
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015079 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015080 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015081else
Benjamin Petersona8332062009-09-11 22:36:27 +000015082 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015083sed 's/^/| /' conftest.$ac_ext >&5
15084
Martin v. Löwis11437992002-04-12 09:54:03 +000015085
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015086 LIBS=$_libs
Benjamin Petersona8332062009-09-11 22:36:27 +000015087 { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5
15088$as_echo_n "checking for pthread_detach... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015089if test "${ac_cv_func_pthread_detach+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015090 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015091else
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015093/* confdefs.h. */
15094_ACEOF
15095cat confdefs.h >>conftest.$ac_ext
15096cat >>conftest.$ac_ext <<_ACEOF
15097/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015098/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15099 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15100#define pthread_detach innocuous_pthread_detach
15101
Guido van Rossumad678af1998-10-02 14:42:15 +000015102/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015103 which can conflict with char pthread_detach (); below.
15104 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015105 <limits.h> exists even on freestanding compilers. */
15106
15107#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015108# include <limits.h>
15109#else
15110# include <assert.h>
15111#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015112
15113#undef pthread_detach
15114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115/* Override any GCC internal prototype to avoid an error.
15116 Use char because int might match the return type of a GCC
15117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015118#ifdef __cplusplus
15119extern "C"
15120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015121char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015122/* The GNU C library defines this for functions which it implements
15123 to always fail with ENOSYS. Some functions are actually named
15124 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015126choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015127#endif
15128
Skip Montanaro6dead952003-09-25 14:50:04 +000015129int
15130main ()
15131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 ;
15134 return 0;
15135}
15136_ACEOF
15137rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138if { (ac_try="$ac_link"
15139case "(($ac_try" in
15140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15141 *) ac_try_echo=$ac_try;;
15142esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015143eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15144$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015147 grep -v '^ *+' conftest.er1 >conftest.err
15148 rm -f conftest.er1
15149 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015150 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151 (exit $ac_status); } && {
15152 test -z "$ac_c_werror_flag" ||
15153 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000015154 } && test -s conftest$ac_exeext && {
15155 test "$cross_compiling" = yes ||
15156 $as_test_x conftest$ac_exeext
15157 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015158 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015159else
Benjamin Petersona8332062009-09-11 22:36:27 +000015160 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015161sed 's/^/| /' conftest.$ac_ext >&5
15162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165
Benjamin Petersona8332062009-09-11 22:36:27 +000015166rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015168 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015169fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015170{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15171$as_echo "$ac_cv_func_pthread_detach" >&6; }
15172if test "x$ac_cv_func_pthread_detach" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015174#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015175_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015176
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015177 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015178 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015179else
Guido van Rossumad678af1998-10-02 14:42:15 +000015180
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015181 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015182 { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15183$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015184if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015185 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015186fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015187{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15188$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015189else
15190 # Is the header compilable?
Benjamin Petersona8332062009-09-11 22:36:27 +000015191{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
15192$as_echo_n "checking atheos/threads.h usability... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015193cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015194/* confdefs.h. */
15195_ACEOF
15196cat confdefs.h >>conftest.$ac_ext
15197cat >>conftest.$ac_ext <<_ACEOF
15198/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015199$ac_includes_default
15200#include <atheos/threads.h>
15201_ACEOF
15202rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203if { (ac_try="$ac_compile"
15204case "(($ac_try" in
15205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15206 *) ac_try_echo=$ac_try;;
15207esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015208eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15209$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015212 grep -v '^ *+' conftest.er1 >conftest.err
15213 rm -f conftest.er1
15214 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015215 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216 (exit $ac_status); } && {
15217 test -z "$ac_c_werror_flag" ||
15218 test ! -s conftest.err
15219 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015220 ac_header_compiler=yes
15221else
Benjamin Petersona8332062009-09-11 22:36:27 +000015222 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015223sed 's/^/| /' conftest.$ac_ext >&5
15224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227
15228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000015229{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15230$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015231
15232# Is the header present?
Benjamin Petersona8332062009-09-11 22:36:27 +000015233{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
15234$as_echo_n "checking atheos/threads.h presence... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015236/* confdefs.h. */
15237_ACEOF
15238cat confdefs.h >>conftest.$ac_ext
15239cat >>conftest.$ac_ext <<_ACEOF
15240/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015241#include <atheos/threads.h>
15242_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015243if { (ac_try="$ac_cpp conftest.$ac_ext"
15244case "(($ac_try" in
15245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15246 *) ac_try_echo=$ac_try;;
15247esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015248eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15249$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015251 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015252 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015253 rm -f conftest.er1
15254 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015255 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015256 (exit $ac_status); } >/dev/null && {
15257 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15258 test ! -s conftest.err
15259 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015260 ac_header_preproc=yes
15261else
Benjamin Petersona8332062009-09-11 22:36:27 +000015262 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015263sed 's/^/| /' conftest.$ac_ext >&5
15264
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015265 ac_header_preproc=no
15266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015267
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015268rm -f conftest.err conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000015269{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15270$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015271
15272# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015273case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15274 yes:no: )
Benjamin Petersona8332062009-09-11 22:36:27 +000015275 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15276$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15277 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15278$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015279 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015280 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015281 no:yes:* )
Benjamin Petersona8332062009-09-11 22:36:27 +000015282 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15283$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15284 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15285$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15286 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15287$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15288 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15289$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15290 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15291$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15292 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15293$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015295## -------------------------------------- ##
15296## Report this to http://bugs.python.org/ ##
15297## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015298_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015300 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015301esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015302{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15303$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015304if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015305 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015306else
15307 ac_cv_header_atheos_threads_h=$ac_header_preproc
15308fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015309{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15310$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015311
15312fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015313if test "x$ac_cv_header_atheos_threads_h" = x""yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015314 cat >>confdefs.h <<\_ACEOF
15315#define WITH_THREAD 1
15316_ACEOF
15317
15318
15319cat >>confdefs.h <<\_ACEOF
15320#define ATHEOS_THREADS 1
15321_ACEOF
15322
15323 THREADOBJ="Python/thread.o"
15324else
15325
Benjamin Petersona8332062009-09-11 22:36:27 +000015326 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15327$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015328if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015329 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015330else
Martin v. Löwis11437992002-04-12 09:54:03 +000015331 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015332LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015333cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015334/* confdefs.h. */
15335_ACEOF
15336cat confdefs.h >>conftest.$ac_ext
15337cat >>conftest.$ac_ext <<_ACEOF
15338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015340/* Override any GCC internal prototype to avoid an error.
15341 Use char because int might match the return type of a GCC
15342 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015343#ifdef __cplusplus
15344extern "C"
15345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015346char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015347int
15348main ()
15349{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 ;
15352 return 0;
15353}
15354_ACEOF
15355rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356if { (ac_try="$ac_link"
15357case "(($ac_try" in
15358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15359 *) ac_try_echo=$ac_try;;
15360esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015361eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15362$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015363 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015365 grep -v '^ *+' conftest.er1 >conftest.err
15366 rm -f conftest.er1
15367 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015368 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369 (exit $ac_status); } && {
15370 test -z "$ac_c_werror_flag" ||
15371 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000015372 } && test -s conftest$ac_exeext && {
15373 test "$cross_compiling" = yes ||
15374 $as_test_x conftest$ac_exeext
15375 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015376 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015377else
Benjamin Petersona8332062009-09-11 22:36:27 +000015378 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015379sed 's/^/| /' conftest.$ac_ext >&5
15380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015383
Benjamin Petersona8332062009-09-11 22:36:27 +000015384rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015385rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015387LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015388fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015389{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15390$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
15391if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015393#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015394_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015395
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015396 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015397 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015398 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015399else
Greg Steinadf63d62000-07-05 10:38:09 +000015400
Benjamin Petersona8332062009-09-11 22:36:27 +000015401 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15402$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015403if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015404 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015405else
Martin v. Löwis11437992002-04-12 09:54:03 +000015406 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015407LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015408cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015409/* confdefs.h. */
15410_ACEOF
15411cat confdefs.h >>conftest.$ac_ext
15412cat >>conftest.$ac_ext <<_ACEOF
15413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015415/* Override any GCC internal prototype to avoid an error.
15416 Use char because int might match the return type of a GCC
15417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015418#ifdef __cplusplus
15419extern "C"
15420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015421char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015422int
15423main ()
15424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015425return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015426 ;
15427 return 0;
15428}
15429_ACEOF
15430rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015431if { (ac_try="$ac_link"
15432case "(($ac_try" in
15433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15434 *) ac_try_echo=$ac_try;;
15435esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015436eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15437$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015438 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015440 grep -v '^ *+' conftest.er1 >conftest.err
15441 rm -f conftest.er1
15442 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015443 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015444 (exit $ac_status); } && {
15445 test -z "$ac_c_werror_flag" ||
15446 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000015447 } && test -s conftest$ac_exeext && {
15448 test "$cross_compiling" = yes ||
15449 $as_test_x conftest$ac_exeext
15450 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015451 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015452else
Benjamin Petersona8332062009-09-11 22:36:27 +000015453 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015454sed 's/^/| /' conftest.$ac_ext >&5
15455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015456 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015458
Benjamin Petersona8332062009-09-11 22:36:27 +000015459rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015462LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015463fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015464{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15465$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
15466if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015467 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015468#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015469_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015470
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015471 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015472 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015473 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015474else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015475
Benjamin Petersona8332062009-09-11 22:36:27 +000015476 { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15477$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015478if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015479 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015480else
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015482LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015484/* confdefs.h. */
15485_ACEOF
15486cat confdefs.h >>conftest.$ac_ext
15487cat >>conftest.$ac_ext <<_ACEOF
15488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015490/* Override any GCC internal prototype to avoid an error.
15491 Use char because int might match the return type of a GCC
15492 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015493#ifdef __cplusplus
15494extern "C"
15495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015496char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015497int
15498main ()
15499{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015501 ;
15502 return 0;
15503}
15504_ACEOF
15505rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015506if { (ac_try="$ac_link"
15507case "(($ac_try" in
15508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15509 *) ac_try_echo=$ac_try;;
15510esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015511eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15512$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015513 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015515 grep -v '^ *+' conftest.er1 >conftest.err
15516 rm -f conftest.er1
15517 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015518 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015519 (exit $ac_status); } && {
15520 test -z "$ac_c_werror_flag" ||
15521 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000015522 } && test -s conftest$ac_exeext && {
15523 test "$cross_compiling" = yes ||
15524 $as_test_x conftest$ac_exeext
15525 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015526 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015527else
Benjamin Petersona8332062009-09-11 22:36:27 +000015528 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015529sed 's/^/| /' conftest.$ac_ext >&5
15530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533
Benjamin Petersona8332062009-09-11 22:36:27 +000015534rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015537LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015538fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015539{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15540$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
15541if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015542 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015543#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015544_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015545
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015546 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015547 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015548 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015549else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015550
Benjamin Petersona8332062009-09-11 22:36:27 +000015551 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15552$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015553if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015554 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015555else
Martin v. Löwis11437992002-04-12 09:54:03 +000015556 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015557LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015559/* confdefs.h. */
15560_ACEOF
15561cat confdefs.h >>conftest.$ac_ext
15562cat >>conftest.$ac_ext <<_ACEOF
15563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565/* Override any GCC internal prototype to avoid an error.
15566 Use char because int might match the return type of a GCC
15567 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015568#ifdef __cplusplus
15569extern "C"
15570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015571char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015572int
15573main ()
15574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 ;
15577 return 0;
15578}
15579_ACEOF
15580rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581if { (ac_try="$ac_link"
15582case "(($ac_try" in
15583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15584 *) ac_try_echo=$ac_try;;
15585esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015586eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15587$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015588 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015590 grep -v '^ *+' conftest.er1 >conftest.err
15591 rm -f conftest.er1
15592 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015593 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594 (exit $ac_status); } && {
15595 test -z "$ac_c_werror_flag" ||
15596 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000015597 } && test -s conftest$ac_exeext && {
15598 test "$cross_compiling" = yes ||
15599 $as_test_x conftest$ac_exeext
15600 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015602else
Benjamin Petersona8332062009-09-11 22:36:27 +000015603 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015604sed 's/^/| /' conftest.$ac_ext >&5
15605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015606 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015608
Benjamin Petersona8332062009-09-11 22:36:27 +000015609rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015612LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015613fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015614{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15615$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
15616if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015617 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015618#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015619_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015620
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015621 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015622 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015623 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015624else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015625
Martin v. Löwis130fb172001-07-19 11:00:41 +000015626 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015627fi
15628
Guido van Rossum627b2d71993-12-24 10:39:16 +000015629
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015630fi
15631
Guido van Rossum0be3e491997-05-22 20:33:33 +000015632fi
15633
Guido van Rossum49545951997-12-02 19:28:29 +000015634fi
15635
Guido van Rossumb93a8621998-05-07 13:27:32 +000015636fi
15637
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015638
Michael W. Hudson54241132001-12-07 15:38:26 +000015639fi
15640
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642
Benjamin Petersona8332062009-09-11 22:36:27 +000015643rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015644rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015645 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015646fi
15647
Martin v. Löwis11437992002-04-12 09:54:03 +000015648fi
15649
15650
15651fi
15652
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015653
Michael W. Hudson54241132001-12-07 15:38:26 +000015654
Benjamin Petersona8332062009-09-11 22:36:27 +000015655 { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15656$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015657if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015658 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015659else
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015661LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015663/* confdefs.h. */
15664_ACEOF
15665cat confdefs.h >>conftest.$ac_ext
15666cat >>conftest.$ac_ext <<_ACEOF
15667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669/* Override any GCC internal prototype to avoid an error.
15670 Use char because int might match the return type of a GCC
15671 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015672#ifdef __cplusplus
15673extern "C"
15674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015675char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015676int
15677main ()
15678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015679return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 ;
15681 return 0;
15682}
15683_ACEOF
15684rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015685if { (ac_try="$ac_link"
15686case "(($ac_try" in
15687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15688 *) ac_try_echo=$ac_try;;
15689esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015690eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15691$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015692 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015694 grep -v '^ *+' conftest.er1 >conftest.err
15695 rm -f conftest.er1
15696 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015697 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015698 (exit $ac_status); } && {
15699 test -z "$ac_c_werror_flag" ||
15700 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000015701 } && test -s conftest$ac_exeext && {
15702 test "$cross_compiling" = yes ||
15703 $as_test_x conftest$ac_exeext
15704 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015705 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015706else
Benjamin Petersona8332062009-09-11 22:36:27 +000015707 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015708sed 's/^/| /' conftest.$ac_ext >&5
15709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712
Benjamin Petersona8332062009-09-11 22:36:27 +000015713rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015715 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015716LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015717fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015718{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15719$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
15720if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015721 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015722#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015723_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015724
Martin v. Löwis130fb172001-07-19 11:00:41 +000015725 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015726 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015727 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015728fi
15729
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015730
Neal Norwitza978ab02002-11-02 16:58:05 +000015731 if test "$posix_threads" != "yes"; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015732 { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15733$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015734if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015735 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015736else
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015738LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015740/* confdefs.h. */
15741_ACEOF
15742cat confdefs.h >>conftest.$ac_ext
15743cat >>conftest.$ac_ext <<_ACEOF
15744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015746/* Override any GCC internal prototype to avoid an error.
15747 Use char because int might match the return type of a GCC
15748 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015749#ifdef __cplusplus
15750extern "C"
15751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015752char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015753int
15754main ()
15755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ;
15758 return 0;
15759}
15760_ACEOF
15761rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762if { (ac_try="$ac_link"
15763case "(($ac_try" in
15764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15765 *) ac_try_echo=$ac_try;;
15766esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015767eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15768$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015771 grep -v '^ *+' conftest.er1 >conftest.err
15772 rm -f conftest.er1
15773 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015774 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775 (exit $ac_status); } && {
15776 test -z "$ac_c_werror_flag" ||
15777 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000015778 } && test -s conftest$ac_exeext && {
15779 test "$cross_compiling" = yes ||
15780 $as_test_x conftest$ac_exeext
15781 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015783else
Benjamin Petersona8332062009-09-11 22:36:27 +000015784 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015785sed 's/^/| /' conftest.$ac_ext >&5
15786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789
Benjamin Petersona8332062009-09-11 22:36:27 +000015790rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015793LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015794fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015795{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15796$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
15797if test "x$ac_cv_lib_thread_thr_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015799#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015800_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015801
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015802 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015803 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015804 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015805fi
15806
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015807 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015808
Martin v. Löwis130fb172001-07-19 11:00:41 +000015809 if test "$USE_THREAD_MODULE" != "#"
15810 then
15811 # If the above checks didn't disable threads, (at least) OSF1
15812 # needs this '-threads' argument during linking.
15813 case $ac_sys_system in
15814 OSF1) LDLAST=-threads;;
15815 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015816 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015817fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015818
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015819if test "$posix_threads" = "yes"; then
15820 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015821
15822cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015823#define _POSIX_THREADS 1
15824_ACEOF
15825
15826 fi
15827
15828 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15829 case $ac_sys_system/$ac_sys_release in
15830 SunOS/5.6)
15831cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015832#define HAVE_PTHREAD_DESTRUCTOR 1
15833_ACEOF
15834
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015835 ;;
15836 SunOS/5.8)
15837cat >>confdefs.h <<\_ACEOF
15838#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15839_ACEOF
15840
15841 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015842 AIX/5)
15843cat >>confdefs.h <<\_ACEOF
15844#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15845_ACEOF
15846
15847 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015848 esac
15849
Benjamin Petersona8332062009-09-11 22:36:27 +000015850 { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15851$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015852 if test "${ac_cv_pthread_system_supported+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015853 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015854else
15855 if test "$cross_compiling" = yes; then
15856 ac_cv_pthread_system_supported=no
15857else
15858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015859/* confdefs.h. */
15860_ACEOF
15861cat confdefs.h >>conftest.$ac_ext
15862cat >>conftest.$ac_ext <<_ACEOF
15863/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015864#include <pthread.h>
15865 void *foo(void *parm) {
15866 return NULL;
15867 }
15868 main() {
15869 pthread_attr_t attr;
15870 pthread_t id;
15871 if (pthread_attr_init(&attr)) exit(-1);
15872 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15873 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15874 exit(0);
15875 }
15876_ACEOF
15877rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015878if { (ac_try="$ac_link"
15879case "(($ac_try" in
15880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15881 *) ac_try_echo=$ac_try;;
15882esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015883eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15884$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015885 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015886 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000015887 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889 { (case "(($ac_try" in
15890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15891 *) ac_try_echo=$ac_try;;
15892esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015893eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15894$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015895 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015896 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000015897 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015898 (exit $ac_status); }; }; then
15899 ac_cv_pthread_system_supported=yes
15900else
Benjamin Petersona8332062009-09-11 22:36:27 +000015901 $as_echo "$as_me: program exited with status $ac_status" >&5
15902$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015903sed 's/^/| /' conftest.$ac_ext >&5
15904
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015905( exit $ac_status )
15906ac_cv_pthread_system_supported=no
15907fi
Benjamin Petersona8332062009-09-11 22:36:27 +000015908rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909rm -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 +000015910fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015912
15913
Guido van Rossum627b2d71993-12-24 10:39:16 +000015914fi
15915
Benjamin Petersona8332062009-09-11 22:36:27 +000015916 { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15917$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015918 if test "$ac_cv_pthread_system_supported" = "yes"; then
15919
15920cat >>confdefs.h <<\_ACEOF
15921#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15922_ACEOF
15923
15924 fi
15925
15926for ac_func in pthread_sigmask
15927do
Benjamin Petersona8332062009-09-11 22:36:27 +000015928as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15929{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
15930$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015931if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000015932 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015933else
15934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015935/* confdefs.h. */
15936_ACEOF
15937cat confdefs.h >>conftest.$ac_ext
15938cat >>conftest.$ac_ext <<_ACEOF
15939/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015940/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15941 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15942#define $ac_func innocuous_$ac_func
15943
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015944/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015945 which can conflict with char $ac_func (); below.
15946 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015947 <limits.h> exists even on freestanding compilers. */
15948
15949#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015950# include <limits.h>
15951#else
15952# include <assert.h>
15953#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015954
15955#undef $ac_func
15956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957/* Override any GCC internal prototype to avoid an error.
15958 Use char because int might match the return type of a GCC
15959 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015960#ifdef __cplusplus
15961extern "C"
15962#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015963char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015964/* The GNU C library defines this for functions which it implements
15965 to always fail with ENOSYS. Some functions are actually named
15966 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015968choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015969#endif
15970
Skip Montanaro6dead952003-09-25 14:50:04 +000015971int
15972main ()
15973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015975 ;
15976 return 0;
15977}
15978_ACEOF
15979rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015980if { (ac_try="$ac_link"
15981case "(($ac_try" in
15982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15983 *) ac_try_echo=$ac_try;;
15984esac
Benjamin Petersona8332062009-09-11 22:36:27 +000015985eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15986$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015987 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015989 grep -v '^ *+' conftest.er1 >conftest.err
15990 rm -f conftest.er1
15991 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000015992 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015993 (exit $ac_status); } && {
15994 test -z "$ac_c_werror_flag" ||
15995 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000015996 } && test -s conftest$ac_exeext && {
15997 test "$cross_compiling" = yes ||
15998 $as_test_x conftest$ac_exeext
15999 }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016000 eval "$as_ac_var=yes"
16001else
Benjamin Petersona8332062009-09-11 22:36:27 +000016002 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016003sed 's/^/| /' conftest.$ac_ext >&5
16004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016005 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016007
Benjamin Petersona8332062009-09-11 22:36:27 +000016008rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016011fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016012ac_res=`eval 'as_val=${'$as_ac_var'}
16013 $as_echo "$as_val"'`
16014 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16015$as_echo "$ac_res" >&6; }
16016as_val=`eval 'as_val=${'$as_ac_var'}
16017 $as_echo "$as_val"'`
16018 if test "x$as_val" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016019 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000016020#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016021_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016022 case $ac_sys_system in
16023 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016024
Jason Tishlerfac083d2003-07-22 15:20:49 +000016025cat >>confdefs.h <<\_ACEOF
16026#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16027_ACEOF
16028
16029 ;;
16030 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016031fi
16032done
16033
16034fi
16035
16036
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016037# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016038
16039
Benjamin Petersona8332062009-09-11 22:36:27 +000016040{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16041$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016042# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016043if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016044 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016045 no)
Benjamin Petersona8332062009-09-11 22:36:27 +000016046 { $as_echo "$as_me:$LINENO: result: no" >&5
16047$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016048 ipv6=no
16049 ;;
Benjamin Petersona8332062009-09-11 22:36:27 +000016050 *) { $as_echo "$as_me:$LINENO: result: yes" >&5
16051$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016053#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016055
16056 ipv6=yes
16057 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016059else
Martin v. Löwis11437992002-04-12 09:54:03 +000016060
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016061 if test "$cross_compiling" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000016062 { $as_echo "$as_me:$LINENO: result: no" >&5
16063$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016064 ipv6=no
16065
16066else
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016068/* confdefs.h. */
16069_ACEOF
16070cat confdefs.h >>conftest.$ac_ext
16071cat >>conftest.$ac_ext <<_ACEOF
16072/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016073 /* AF_INET6 available check */
16074#include <sys/types.h>
16075#include <sys/socket.h>
16076main()
16077{
16078 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16079 exit(1);
16080 else
16081 exit(0);
16082}
16083
Martin v. Löwis11437992002-04-12 09:54:03 +000016084_ACEOF
16085rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016086if { (ac_try="$ac_link"
16087case "(($ac_try" in
16088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16089 *) ac_try_echo=$ac_try;;
16090esac
Benjamin Petersona8332062009-09-11 22:36:27 +000016091eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16092$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016093 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000016095 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016096 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097 { (case "(($ac_try" in
16098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16099 *) ac_try_echo=$ac_try;;
16100esac
Benjamin Petersona8332062009-09-11 22:36:27 +000016101eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16102$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016104 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000016105 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016106 (exit $ac_status); }; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000016107 { $as_echo "$as_me:$LINENO: result: yes" >&5
16108$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016109 ipv6=yes
16110else
Benjamin Petersona8332062009-09-11 22:36:27 +000016111 $as_echo "$as_me: program exited with status $ac_status" >&5
16112$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016113sed 's/^/| /' conftest.$ac_ext >&5
16114
Martin v. Löwis11437992002-04-12 09:54:03 +000016115( exit $ac_status )
Benjamin Petersona8332062009-09-11 22:36:27 +000016116{ $as_echo "$as_me:$LINENO: result: no" >&5
16117$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016118 ipv6=no
16119fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016120rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016121rm -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 +000016122fi
16123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016124
16125
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016126if test "$ipv6" = "yes"; then
Benjamin Petersona8332062009-09-11 22:36:27 +000016127 { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16128$as_echo_n "checking if RFC2553 API is available... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016130/* confdefs.h. */
16131_ACEOF
16132cat confdefs.h >>conftest.$ac_ext
16133cat >>conftest.$ac_ext <<_ACEOF
16134/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016135#include <sys/types.h>
16136#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016137int
16138main ()
16139{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016140struct sockaddr_in6 x;
16141x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016142 ;
16143 return 0;
16144}
16145_ACEOF
16146rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016147if { (ac_try="$ac_compile"
16148case "(($ac_try" in
16149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16150 *) ac_try_echo=$ac_try;;
16151esac
Benjamin Petersona8332062009-09-11 22:36:27 +000016152eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16153$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016156 grep -v '^ *+' conftest.er1 >conftest.err
16157 rm -f conftest.er1
16158 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000016159 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016160 (exit $ac_status); } && {
16161 test -z "$ac_c_werror_flag" ||
16162 test ! -s conftest.err
16163 } && test -s conftest.$ac_objext; then
Benjamin Petersona8332062009-09-11 22:36:27 +000016164 { $as_echo "$as_me:$LINENO: result: yes" >&5
16165$as_echo "yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016166 ipv6=yes
16167else
Benjamin Petersona8332062009-09-11 22:36:27 +000016168 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016169sed 's/^/| /' conftest.$ac_ext >&5
16170
Benjamin Petersona8332062009-09-11 22:36:27 +000016171 { $as_echo "$as_me:$LINENO: result: no" >&5
16172$as_echo "no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016173 ipv6=no
16174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016175
16176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016177fi
16178
16179if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016181#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016182_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016183
16184fi
16185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016186fi
16187
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016188
16189ipv6type=unknown
16190ipv6lib=none
16191ipv6trylibc=no
16192
16193if test "$ipv6" = "yes"; then
Benjamin Petersona8332062009-09-11 22:36:27 +000016194 { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16195$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016196 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16197 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016198 case $i in
16199 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016201/* confdefs.h. */
16202_ACEOF
16203cat confdefs.h >>conftest.$ac_ext
16204cat >>conftest.$ac_ext <<_ACEOF
16205/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016206
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016207#include <netinet/in.h>
16208#ifdef IPV6_INRIA_VERSION
16209yes
16210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016211_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016213 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016214 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016215fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016216rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016217
16218 ;;
16219 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016221/* confdefs.h. */
16222_ACEOF
16223cat confdefs.h >>conftest.$ac_ext
16224cat >>conftest.$ac_ext <<_ACEOF
16225/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016226
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016227#include <netinet/in.h>
16228#ifdef __KAME__
16229yes
16230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016231_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016233 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016234 ipv6type=$i;
16235 ipv6lib=inet6
16236 ipv6libdir=/usr/local/v6/lib
16237 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016238fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016239rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016240
16241 ;;
16242 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016244/* confdefs.h. */
16245_ACEOF
16246cat confdefs.h >>conftest.$ac_ext
16247cat >>conftest.$ac_ext <<_ACEOF
16248/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016249
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016250#include <features.h>
16251#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16252yes
16253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016254_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016256 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016257 ipv6type=$i;
16258 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016259fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016260rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016261
16262 ;;
16263 linux-inet6)
16264 if test -d /usr/inet6; then
16265 ipv6type=$i
16266 ipv6lib=inet6
16267 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016268 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016269 fi
16270 ;;
16271 solaris)
16272 if test -f /etc/netconfig; then
16273 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16274 ipv6type=$i
16275 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016276 fi
16277 fi
16278 ;;
16279 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016281/* confdefs.h. */
16282_ACEOF
16283cat confdefs.h >>conftest.$ac_ext
16284cat >>conftest.$ac_ext <<_ACEOF
16285/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016286
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016287#include <sys/param.h>
16288#ifdef _TOSHIBA_INET6
16289yes
16290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016291_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016293 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016294 ipv6type=$i;
16295 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016296 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016297fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016298rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016299
16300 ;;
16301 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016303/* confdefs.h. */
16304_ACEOF
16305cat confdefs.h >>conftest.$ac_ext
16306cat >>conftest.$ac_ext <<_ACEOF
16307/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016308
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016309#include </usr/local/v6/include/sys/v6config.h>
16310#ifdef __V6D__
16311yes
16312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016313_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016315 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016316 ipv6type=$i;
16317 ipv6lib=v6;
16318 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016319 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016320fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016321rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016322
16323 ;;
16324 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016326/* confdefs.h. */
16327_ACEOF
16328cat confdefs.h >>conftest.$ac_ext
16329cat >>conftest.$ac_ext <<_ACEOF
16330/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016331
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016332#include <sys/param.h>
16333#ifdef _ZETA_MINAMI_INET6
16334yes
16335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016336_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016338 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016339 ipv6type=$i;
16340 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016341 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016342fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016343rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016344
16345 ;;
16346 esac
16347 if test "$ipv6type" != "unknown"; then
16348 break
16349 fi
16350 done
Benjamin Petersona8332062009-09-11 22:36:27 +000016351 { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5
16352$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016353fi
16354
16355if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16356 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16357 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16358 echo "using lib$ipv6lib"
16359 else
16360 if test $ipv6trylibc = "yes"; then
16361 echo "using libc"
16362 else
16363 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16364 echo "You need to fetch lib$ipv6lib.a from appropriate"
16365 echo 'ipv6 kit and compile beforehand.'
16366 exit 1
16367 fi
16368 fi
16369fi
16370
Benjamin Petersona8332062009-09-11 22:36:27 +000016371{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16372$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016373cat >conftest.$ac_ext <<_ACEOF
16374/* confdefs.h. */
16375_ACEOF
16376cat confdefs.h >>conftest.$ac_ext
16377cat >>conftest.$ac_ext <<_ACEOF
16378/* end confdefs.h. */
16379#include <Carbon/Carbon.h>
16380int
16381main ()
16382{
16383FSIORefNum fRef = 0
16384 ;
16385 return 0;
16386}
16387_ACEOF
16388rm -f conftest.$ac_objext
16389if { (ac_try="$ac_compile"
16390case "(($ac_try" in
16391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16392 *) ac_try_echo=$ac_try;;
16393esac
Benjamin Petersona8332062009-09-11 22:36:27 +000016394eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16395$as_echo "$ac_try_echo") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016396 (eval "$ac_compile") 2>conftest.er1
16397 ac_status=$?
16398 grep -v '^ *+' conftest.er1 >conftest.err
16399 rm -f conftest.er1
16400 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000016401 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016402 (exit $ac_status); } && {
16403 test -z "$ac_c_werror_flag" ||
16404 test ! -s conftest.err
16405 } && test -s conftest.$ac_objext; then
16406
16407cat >>confdefs.h <<\_ACEOF
16408#define HAVE_OSX105_SDK 1
16409_ACEOF
16410
Benjamin Petersona8332062009-09-11 22:36:27 +000016411 { $as_echo "$as_me:$LINENO: result: yes" >&5
16412$as_echo "yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016413else
Benjamin Petersona8332062009-09-11 22:36:27 +000016414 $as_echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016415sed 's/^/| /' conftest.$ac_ext >&5
16416
Benjamin Petersona8332062009-09-11 22:36:27 +000016417 { $as_echo "$as_me:$LINENO: result: no" >&5
16418$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016419
16420fi
16421
16422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16423
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016424# Check for --with-doc-strings
Benjamin Petersona8332062009-09-11 22:36:27 +000016425{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16426$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016428# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016429if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430 withval=$with_doc_strings;
16431fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016432
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016433
16434if test -z "$with_doc_strings"
16435then with_doc_strings="yes"
16436fi
16437if test "$with_doc_strings" != "no"
16438then
16439
16440cat >>confdefs.h <<\_ACEOF
16441#define WITH_DOC_STRINGS 1
16442_ACEOF
16443
16444fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016445{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16446$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016447
Neil Schemenauera35c6882001-02-27 04:45:05 +000016448# Check for Python-specific malloc support
Benjamin Petersona8332062009-09-11 22:36:27 +000016449{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5
16450$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016453if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016455if test "$withval" != no
16456then
16457
16458cat >>confdefs.h <<\_ACEOF
16459#define WITH_TSC 1
16460_ACEOF
16461
Benjamin Petersona8332062009-09-11 22:36:27 +000016462 { $as_echo "$as_me:$LINENO: result: yes" >&5
16463$as_echo "yes" >&6; }
16464else { $as_echo "$as_me:$LINENO: result: no" >&5
16465$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016466fi
16467else
Benjamin Petersona8332062009-09-11 22:36:27 +000016468 { $as_echo "$as_me:$LINENO: result: no" >&5
16469$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016470fi
16471
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016472
16473# Check for Python-specific malloc support
Benjamin Petersona8332062009-09-11 22:36:27 +000016474{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16475$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016477# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016478if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479 withval=$with_pymalloc;
16480fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016481
Neil Schemenauera35c6882001-02-27 04:45:05 +000016482
Neil Schemenauer16c22972002-03-22 15:34:49 +000016483if test -z "$with_pymalloc"
16484then with_pymalloc="yes"
16485fi
16486if test "$with_pymalloc" != "no"
16487then
Martin v. Löwis11437992002-04-12 09:54:03 +000016488
16489cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016490#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016491_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016492
16493fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016494{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16495$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016496
Barry Warsawef82cd72000-06-30 16:21:01 +000016497# Check for --with-wctype-functions
Benjamin Petersona8332062009-09-11 22:36:27 +000016498{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16499$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016501# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016502if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016503 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016504if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016505then
16506
16507cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016508#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016509_ACEOF
16510
Benjamin Petersona8332062009-09-11 22:36:27 +000016511 { $as_echo "$as_me:$LINENO: result: yes" >&5
16512$as_echo "yes" >&6; }
16513else { $as_echo "$as_me:$LINENO: result: no" >&5
16514$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016515fi
16516else
Benjamin Petersona8332062009-09-11 22:36:27 +000016517 { $as_echo "$as_me:$LINENO: result: no" >&5
16518$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016519fi
16520
Barry Warsawef82cd72000-06-30 16:21:01 +000016521
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016522# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016523
Guido van Rossum98935bf2001-09-05 19:13:16 +000016524DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016525
Guido van Rossume97ee181999-12-20 21:27:22 +000016526# the dlopen() function means we might want to use dynload_shlib.o. some
16527# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016528
Thomas Wouters3a584202000-08-05 23:28:51 +000016529for ac_func in dlopen
16530do
Benjamin Petersona8332062009-09-11 22:36:27 +000016531as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16532{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16533$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000016535 $as_echo_n "(cached) " >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016536else
Martin v. Löwis11437992002-04-12 09:54:03 +000016537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016538/* confdefs.h. */
16539_ACEOF
16540cat confdefs.h >>conftest.$ac_ext
16541cat >>conftest.$ac_ext <<_ACEOF
16542/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016543/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16544 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16545#define $ac_func innocuous_$ac_func
16546
Guido van Rossume97ee181999-12-20 21:27:22 +000016547/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016548 which can conflict with char $ac_func (); below.
16549 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016550 <limits.h> exists even on freestanding compilers. */
16551
16552#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016553# include <limits.h>
16554#else
16555# include <assert.h>
16556#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016557
16558#undef $ac_func
16559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560/* Override any GCC internal prototype to avoid an error.
16561 Use char because int might match the return type of a GCC
16562 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016563#ifdef __cplusplus
16564extern "C"
16565#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016566char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016567/* The GNU C library defines this for functions which it implements
16568 to always fail with ENOSYS. Some functions are actually named
16569 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016570#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016571choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016572#endif
16573
Skip Montanaro6dead952003-09-25 14:50:04 +000016574int
16575main ()
16576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016577return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 ;
16579 return 0;
16580}
16581_ACEOF
16582rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583if { (ac_try="$ac_link"
16584case "(($ac_try" in
16585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16586 *) ac_try_echo=$ac_try;;
16587esac
Benjamin Petersona8332062009-09-11 22:36:27 +000016588eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16589$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016592 grep -v '^ *+' conftest.er1 >conftest.err
16593 rm -f conftest.er1
16594 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000016595 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016596 (exit $ac_status); } && {
16597 test -z "$ac_c_werror_flag" ||
16598 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000016599 } && test -s conftest$ac_exeext && {
16600 test "$cross_compiling" = yes ||
16601 $as_test_x conftest$ac_exeext
16602 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016604else
Benjamin Petersona8332062009-09-11 22:36:27 +000016605 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016606sed 's/^/| /' conftest.$ac_ext >&5
16607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610
Benjamin Petersona8332062009-09-11 22:36:27 +000016611rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016612rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016613 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016614fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016615ac_res=`eval 'as_val=${'$as_ac_var'}
16616 $as_echo "$as_val"'`
16617 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16618$as_echo "$ac_res" >&6; }
16619as_val=`eval 'as_val=${'$as_ac_var'}
16620 $as_echo "$as_val"'`
16621 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016622 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000016623#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016624_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016625
Guido van Rossume97ee181999-12-20 21:27:22 +000016626fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016627done
Guido van Rossume97ee181999-12-20 21:27:22 +000016628
Michael W. Hudson54241132001-12-07 15:38:26 +000016629
Guido van Rossume97ee181999-12-20 21:27:22 +000016630# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16631# loading of modules.
16632
Benjamin Petersona8332062009-09-11 22:36:27 +000016633{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16634$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016635if test -z "$DYNLOADFILE"
16636then
16637 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016638 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16639 if test "$ac_cv_func_dlopen" = yes
16640 then DYNLOADFILE="dynload_shlib.o"
16641 else DYNLOADFILE="dynload_aix.o"
16642 fi
16643 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016644 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016645 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16646 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016647 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016648 *)
16649 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16650 # out any dynamic loading
16651 if test "$ac_cv_func_dlopen" = yes
16652 then DYNLOADFILE="dynload_shlib.o"
16653 else DYNLOADFILE="dynload_stub.o"
16654 fi
16655 ;;
16656 esac
16657fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016658{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16659$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016660if test "$DYNLOADFILE" != "dynload_stub.o"
16661then
Martin v. Löwis11437992002-04-12 09:54:03 +000016662
16663cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016664#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016665_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016666
16667fi
16668
Neil Schemenauer4e425612001-06-19 15:44:15 +000016669# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16670
Michael W. Hudson54241132001-12-07 15:38:26 +000016671
Benjamin Petersona8332062009-09-11 22:36:27 +000016672{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16673$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016674if test -z "$MACHDEP_OBJS"
16675then
Jack Jansene578a632001-08-15 01:27:14 +000016676 MACHDEP_OBJS=$extra_machdep_objs
16677else
16678 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016679fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016680{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16681$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016682
Guido van Rossum627b2d71993-12-24 10:39:16 +000016683# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
Martin v. Löwisd6320502004-08-12 13:45:08 +000016755
Martin v. Löwisc3001752005-01-23 09:27:24 +000016756
16757
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016758
16759
Thomas Wouterscf297e42007-02-23 15:07:44 +000016760
16761
Gregory P. Smith25523d22007-09-03 16:44:55 +000016762
Christian Heimes4e30a842007-11-30 22:12:06 +000016763
Martin v. Löwis92fab752008-03-08 10:40:41 +000016764
Martin v. Löwis823725e2008-03-24 13:39:54 +000016765
16766
Benjamin Peterson965ce872009-04-05 21:24:58 +000016767
16768
16769
16770
Martin v. Löwis011e8422009-05-05 04:43:17 +000016771
Martin v. Löwis113a0852009-05-29 17:25:39 +000016772
Martin v. Löwis823725e2008-03-24 13:39:54 +000016773for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16774 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016775 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016776 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016777 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016778 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016779 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016780 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16781 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016782 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016783 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016784 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016785 truncate uname unsetenv utimes waitpid wait3 wait4 \
16786 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016787do
Benjamin Petersona8332062009-09-11 22:36:27 +000016788as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16789{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16790$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016791if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000016792 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016793else
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016795/* confdefs.h. */
16796_ACEOF
16797cat confdefs.h >>conftest.$ac_ext
16798cat >>conftest.$ac_ext <<_ACEOF
16799/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016800/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16801 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16802#define $ac_func innocuous_$ac_func
16803
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016804/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016805 which can conflict with char $ac_func (); below.
16806 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016807 <limits.h> exists even on freestanding compilers. */
16808
16809#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016810# include <limits.h>
16811#else
16812# include <assert.h>
16813#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016814
16815#undef $ac_func
16816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817/* Override any GCC internal prototype to avoid an error.
16818 Use char because int might match the return type of a GCC
16819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016820#ifdef __cplusplus
16821extern "C"
16822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016823char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016824/* The GNU C library defines this for functions which it implements
16825 to always fail with ENOSYS. Some functions are actually named
16826 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016828choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016829#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016830
Skip Montanaro6dead952003-09-25 14:50:04 +000016831int
16832main ()
16833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016834return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016835 ;
16836 return 0;
16837}
16838_ACEOF
16839rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840if { (ac_try="$ac_link"
16841case "(($ac_try" in
16842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16843 *) ac_try_echo=$ac_try;;
16844esac
Benjamin Petersona8332062009-09-11 22:36:27 +000016845eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16846$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016849 grep -v '^ *+' conftest.er1 >conftest.err
16850 rm -f conftest.er1
16851 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000016852 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853 (exit $ac_status); } && {
16854 test -z "$ac_c_werror_flag" ||
16855 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000016856 } && test -s conftest$ac_exeext && {
16857 test "$cross_compiling" = yes ||
16858 $as_test_x conftest$ac_exeext
16859 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016860 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016861else
Benjamin Petersona8332062009-09-11 22:36:27 +000016862 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016863sed 's/^/| /' conftest.$ac_ext >&5
16864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016867
Benjamin Petersona8332062009-09-11 22:36:27 +000016868rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016870 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016871fi
Benjamin Petersona8332062009-09-11 22:36:27 +000016872ac_res=`eval 'as_val=${'$as_ac_var'}
16873 $as_echo "$as_val"'`
16874 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16875$as_echo "$ac_res" >&6; }
16876as_val=`eval 'as_val=${'$as_ac_var'}
16877 $as_echo "$as_val"'`
16878 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016879 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000016880#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016881_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016882
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016883fi
16884done
16885
Michael W. Hudson54241132001-12-07 15:38:26 +000016886
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016887# For some functions, having a definition is not sufficient, since
16888# we want to take their address.
Benjamin Petersona8332062009-09-11 22:36:27 +000016889{ $as_echo "$as_me:$LINENO: checking for chroot" >&5
16890$as_echo_n "checking for chroot... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016892/* confdefs.h. */
16893_ACEOF
16894cat confdefs.h >>conftest.$ac_ext
16895cat >>conftest.$ac_ext <<_ACEOF
16896/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016897#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016898int
16899main ()
16900{
16901void *x=chroot
16902 ;
16903 return 0;
16904}
16905_ACEOF
16906rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907if { (ac_try="$ac_compile"
16908case "(($ac_try" in
16909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16910 *) ac_try_echo=$ac_try;;
16911esac
Benjamin Petersona8332062009-09-11 22:36:27 +000016912eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16913$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016916 grep -v '^ *+' conftest.er1 >conftest.err
16917 rm -f conftest.er1
16918 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000016919 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920 (exit $ac_status); } && {
16921 test -z "$ac_c_werror_flag" ||
16922 test ! -s conftest.err
16923 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016924
16925cat >>confdefs.h <<\_ACEOF
16926#define HAVE_CHROOT 1
16927_ACEOF
16928
Benjamin Petersona8332062009-09-11 22:36:27 +000016929 { $as_echo "$as_me:$LINENO: result: yes" >&5
16930$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016931else
Benjamin Petersona8332062009-09-11 22:36:27 +000016932 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016933sed 's/^/| /' conftest.$ac_ext >&5
16934
Benjamin Petersona8332062009-09-11 22:36:27 +000016935 { $as_echo "$as_me:$LINENO: result: no" >&5
16936$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016937
16938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016939
16940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000016941{ $as_echo "$as_me:$LINENO: checking for link" >&5
16942$as_echo_n "checking for link... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016943cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016944/* confdefs.h. */
16945_ACEOF
16946cat confdefs.h >>conftest.$ac_ext
16947cat >>conftest.$ac_ext <<_ACEOF
16948/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016949#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016950int
16951main ()
16952{
16953void *x=link
16954 ;
16955 return 0;
16956}
16957_ACEOF
16958rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016959if { (ac_try="$ac_compile"
16960case "(($ac_try" in
16961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16962 *) ac_try_echo=$ac_try;;
16963esac
Benjamin Petersona8332062009-09-11 22:36:27 +000016964eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16965$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016968 grep -v '^ *+' conftest.er1 >conftest.err
16969 rm -f conftest.er1
16970 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000016971 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016972 (exit $ac_status); } && {
16973 test -z "$ac_c_werror_flag" ||
16974 test ! -s conftest.err
16975 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016976
16977cat >>confdefs.h <<\_ACEOF
16978#define HAVE_LINK 1
16979_ACEOF
16980
Benjamin Petersona8332062009-09-11 22:36:27 +000016981 { $as_echo "$as_me:$LINENO: result: yes" >&5
16982$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016983else
Benjamin Petersona8332062009-09-11 22:36:27 +000016984 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016985sed 's/^/| /' conftest.$ac_ext >&5
16986
Benjamin Petersona8332062009-09-11 22:36:27 +000016987 { $as_echo "$as_me:$LINENO: result: no" >&5
16988$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016989
16990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991
16992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000016993{ $as_echo "$as_me:$LINENO: checking for symlink" >&5
16994$as_echo_n "checking for symlink... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016996/* confdefs.h. */
16997_ACEOF
16998cat confdefs.h >>conftest.$ac_ext
16999cat >>conftest.$ac_ext <<_ACEOF
17000/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017001#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017002int
17003main ()
17004{
17005void *x=symlink
17006 ;
17007 return 0;
17008}
17009_ACEOF
17010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011if { (ac_try="$ac_compile"
17012case "(($ac_try" in
17013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17014 *) ac_try_echo=$ac_try;;
17015esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017016eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17017$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017020 grep -v '^ *+' conftest.er1 >conftest.err
17021 rm -f conftest.er1
17022 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017023 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017024 (exit $ac_status); } && {
17025 test -z "$ac_c_werror_flag" ||
17026 test ! -s conftest.err
17027 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017028
17029cat >>confdefs.h <<\_ACEOF
17030#define HAVE_SYMLINK 1
17031_ACEOF
17032
Benjamin Petersona8332062009-09-11 22:36:27 +000017033 { $as_echo "$as_me:$LINENO: result: yes" >&5
17034$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017035else
Benjamin Petersona8332062009-09-11 22:36:27 +000017036 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017037sed 's/^/| /' conftest.$ac_ext >&5
17038
Benjamin Petersona8332062009-09-11 22:36:27 +000017039 { $as_echo "$as_me:$LINENO: result: no" >&5
17040$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017041
17042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043
17044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000017045{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5
17046$as_echo_n "checking for fchdir... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017047cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017048/* confdefs.h. */
17049_ACEOF
17050cat confdefs.h >>conftest.$ac_ext
17051cat >>conftest.$ac_ext <<_ACEOF
17052/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017053#include <unistd.h>
17054int
17055main ()
17056{
17057void *x=fchdir
17058 ;
17059 return 0;
17060}
17061_ACEOF
17062rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017063if { (ac_try="$ac_compile"
17064case "(($ac_try" in
17065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17066 *) ac_try_echo=$ac_try;;
17067esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017068eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17069$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017072 grep -v '^ *+' conftest.er1 >conftest.err
17073 rm -f conftest.er1
17074 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017075 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017076 (exit $ac_status); } && {
17077 test -z "$ac_c_werror_flag" ||
17078 test ! -s conftest.err
17079 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017080
17081cat >>confdefs.h <<\_ACEOF
17082#define HAVE_FCHDIR 1
17083_ACEOF
17084
Benjamin Petersona8332062009-09-11 22:36:27 +000017085 { $as_echo "$as_me:$LINENO: result: yes" >&5
17086$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017087else
Benjamin Petersona8332062009-09-11 22:36:27 +000017088 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017089sed 's/^/| /' conftest.$ac_ext >&5
17090
Benjamin Petersona8332062009-09-11 22:36:27 +000017091 { $as_echo "$as_me:$LINENO: result: no" >&5
17092$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017093
17094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095
17096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000017097{ $as_echo "$as_me:$LINENO: checking for fsync" >&5
17098$as_echo_n "checking for fsync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017099cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017100/* confdefs.h. */
17101_ACEOF
17102cat confdefs.h >>conftest.$ac_ext
17103cat >>conftest.$ac_ext <<_ACEOF
17104/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017105#include <unistd.h>
17106int
17107main ()
17108{
17109void *x=fsync
17110 ;
17111 return 0;
17112}
17113_ACEOF
17114rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115if { (ac_try="$ac_compile"
17116case "(($ac_try" in
17117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17118 *) ac_try_echo=$ac_try;;
17119esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017120eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17121$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017124 grep -v '^ *+' conftest.er1 >conftest.err
17125 rm -f conftest.er1
17126 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017127 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017128 (exit $ac_status); } && {
17129 test -z "$ac_c_werror_flag" ||
17130 test ! -s conftest.err
17131 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017132
17133cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017134#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017135_ACEOF
17136
Benjamin Petersona8332062009-09-11 22:36:27 +000017137 { $as_echo "$as_me:$LINENO: result: yes" >&5
17138$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017139else
Benjamin Petersona8332062009-09-11 22:36:27 +000017140 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017141sed 's/^/| /' conftest.$ac_ext >&5
17142
Benjamin Petersona8332062009-09-11 22:36:27 +000017143 { $as_echo "$as_me:$LINENO: result: no" >&5
17144$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017145
17146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017147
17148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000017149{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5
17150$as_echo_n "checking for fdatasync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017151cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017152/* confdefs.h. */
17153_ACEOF
17154cat confdefs.h >>conftest.$ac_ext
17155cat >>conftest.$ac_ext <<_ACEOF
17156/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017157#include <unistd.h>
17158int
17159main ()
17160{
17161void *x=fdatasync
17162 ;
17163 return 0;
17164}
17165_ACEOF
17166rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017167if { (ac_try="$ac_compile"
17168case "(($ac_try" in
17169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17170 *) ac_try_echo=$ac_try;;
17171esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017172eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17173$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017176 grep -v '^ *+' conftest.er1 >conftest.err
17177 rm -f conftest.er1
17178 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017179 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180 (exit $ac_status); } && {
17181 test -z "$ac_c_werror_flag" ||
17182 test ! -s conftest.err
17183 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017184
17185cat >>confdefs.h <<\_ACEOF
17186#define HAVE_FDATASYNC 1
17187_ACEOF
17188
Benjamin Petersona8332062009-09-11 22:36:27 +000017189 { $as_echo "$as_me:$LINENO: result: yes" >&5
17190$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017191else
Benjamin Petersona8332062009-09-11 22:36:27 +000017192 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017193sed 's/^/| /' conftest.$ac_ext >&5
17194
Benjamin Petersona8332062009-09-11 22:36:27 +000017195 { $as_echo "$as_me:$LINENO: result: no" >&5
17196$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017197
17198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017199
17200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000017201{ $as_echo "$as_me:$LINENO: checking for epoll" >&5
17202$as_echo_n "checking for epoll... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017203cat >conftest.$ac_ext <<_ACEOF
17204/* confdefs.h. */
17205_ACEOF
17206cat confdefs.h >>conftest.$ac_ext
17207cat >>conftest.$ac_ext <<_ACEOF
17208/* end confdefs.h. */
17209#include <sys/epoll.h>
17210int
17211main ()
17212{
17213void *x=epoll_create
17214 ;
17215 return 0;
17216}
17217_ACEOF
17218rm -f conftest.$ac_objext
17219if { (ac_try="$ac_compile"
17220case "(($ac_try" in
17221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17222 *) ac_try_echo=$ac_try;;
17223esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017224eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17225$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017226 (eval "$ac_compile") 2>conftest.er1
17227 ac_status=$?
17228 grep -v '^ *+' conftest.er1 >conftest.err
17229 rm -f conftest.er1
17230 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017231 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017232 (exit $ac_status); } && {
17233 test -z "$ac_c_werror_flag" ||
17234 test ! -s conftest.err
17235 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017236
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017237cat >>confdefs.h <<\_ACEOF
17238#define HAVE_EPOLL 1
17239_ACEOF
17240
Benjamin Petersona8332062009-09-11 22:36:27 +000017241 { $as_echo "$as_me:$LINENO: result: yes" >&5
17242$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017243else
Benjamin Petersona8332062009-09-11 22:36:27 +000017244 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017245sed 's/^/| /' conftest.$ac_ext >&5
17246
Benjamin Petersona8332062009-09-11 22:36:27 +000017247 { $as_echo "$as_me:$LINENO: result: no" >&5
17248$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017249
17250fi
17251
17252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000017253{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5
17254$as_echo_n "checking for kqueue... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017255cat >conftest.$ac_ext <<_ACEOF
17256/* confdefs.h. */
17257_ACEOF
17258cat confdefs.h >>conftest.$ac_ext
17259cat >>conftest.$ac_ext <<_ACEOF
17260/* end confdefs.h. */
17261
17262#include <sys/types.h>
17263#include <sys/event.h>
17264
17265int
17266main ()
17267{
17268int x=kqueue()
17269 ;
17270 return 0;
17271}
17272_ACEOF
17273rm -f conftest.$ac_objext
17274if { (ac_try="$ac_compile"
17275case "(($ac_try" in
17276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17277 *) ac_try_echo=$ac_try;;
17278esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017279eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17280$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017281 (eval "$ac_compile") 2>conftest.er1
17282 ac_status=$?
17283 grep -v '^ *+' conftest.er1 >conftest.err
17284 rm -f conftest.er1
17285 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017286 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017287 (exit $ac_status); } && {
17288 test -z "$ac_c_werror_flag" ||
17289 test ! -s conftest.err
17290 } && test -s conftest.$ac_objext; then
17291
17292cat >>confdefs.h <<\_ACEOF
17293#define HAVE_KQUEUE 1
17294_ACEOF
17295
Benjamin Petersona8332062009-09-11 22:36:27 +000017296 { $as_echo "$as_me:$LINENO: result: yes" >&5
17297$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017298else
Benjamin Petersona8332062009-09-11 22:36:27 +000017299 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017300sed 's/^/| /' conftest.$ac_ext >&5
17301
Benjamin Petersona8332062009-09-11 22:36:27 +000017302 { $as_echo "$as_me:$LINENO: result: no" >&5
17303$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017304
17305fi
17306
17307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017308# On some systems (eg. FreeBSD 5), we would find a definition of the
17309# functions ctermid_r, setgroups in the library, but no prototype
17310# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17311# address to avoid compiler warnings and potential miscompilations
17312# because of the missing prototypes.
17313
Benjamin Petersona8332062009-09-11 22:36:27 +000017314{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5
17315$as_echo_n "checking for ctermid_r... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017316cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017317/* confdefs.h. */
17318_ACEOF
17319cat confdefs.h >>conftest.$ac_ext
17320cat >>conftest.$ac_ext <<_ACEOF
17321/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017322
17323#include "confdefs.h"
17324#include <stdio.h>
17325
Martin v. Löwisd5843682002-11-21 20:41:28 +000017326int
17327main ()
17328{
17329void* p = ctermid_r
17330 ;
17331 return 0;
17332}
17333_ACEOF
17334rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335if { (ac_try="$ac_compile"
17336case "(($ac_try" in
17337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17338 *) ac_try_echo=$ac_try;;
17339esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017340eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17341$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017342 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017344 grep -v '^ *+' conftest.er1 >conftest.err
17345 rm -f conftest.er1
17346 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017347 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348 (exit $ac_status); } && {
17349 test -z "$ac_c_werror_flag" ||
17350 test ! -s conftest.err
17351 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017352
17353cat >>confdefs.h <<\_ACEOF
17354#define HAVE_CTERMID_R 1
17355_ACEOF
17356
Benjamin Petersona8332062009-09-11 22:36:27 +000017357 { $as_echo "$as_me:$LINENO: result: yes" >&5
17358$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017359else
Benjamin Petersona8332062009-09-11 22:36:27 +000017360 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017361sed 's/^/| /' conftest.$ac_ext >&5
17362
Benjamin Petersona8332062009-09-11 22:36:27 +000017363 { $as_echo "$as_me:$LINENO: result: no" >&5
17364$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017365
17366fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17369
Benjamin Petersona8332062009-09-11 22:36:27 +000017370{ $as_echo "$as_me:$LINENO: checking for flock" >&5
17371$as_echo_n "checking for flock... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017373/* confdefs.h. */
17374_ACEOF
17375cat confdefs.h >>conftest.$ac_ext
17376cat >>conftest.$ac_ext <<_ACEOF
17377/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017378
17379#include "confdefs.h"
17380#include <sys/file.h>
17381
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017382int
17383main ()
17384{
17385void* p = flock
17386 ;
17387 return 0;
17388}
17389_ACEOF
17390rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391if { (ac_try="$ac_compile"
17392case "(($ac_try" in
17393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17394 *) ac_try_echo=$ac_try;;
17395esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017396eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17397$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017400 grep -v '^ *+' conftest.er1 >conftest.err
17401 rm -f conftest.er1
17402 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017403 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 (exit $ac_status); } && {
17405 test -z "$ac_c_werror_flag" ||
17406 test ! -s conftest.err
17407 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017408
17409cat >>confdefs.h <<\_ACEOF
17410#define HAVE_FLOCK 1
17411_ACEOF
17412
Benjamin Petersona8332062009-09-11 22:36:27 +000017413 { $as_echo "$as_me:$LINENO: result: yes" >&5
17414$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017415else
Benjamin Petersona8332062009-09-11 22:36:27 +000017416 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017417sed 's/^/| /' conftest.$ac_ext >&5
17418
Benjamin Petersona8332062009-09-11 22:36:27 +000017419 { $as_echo "$as_me:$LINENO: result: no" >&5
17420$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017421
17422fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17425
Benjamin Petersona8332062009-09-11 22:36:27 +000017426{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5
17427$as_echo_n "checking for getpagesize... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017428cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017429/* confdefs.h. */
17430_ACEOF
17431cat confdefs.h >>conftest.$ac_ext
17432cat >>conftest.$ac_ext <<_ACEOF
17433/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017434
17435#include "confdefs.h"
17436#include <unistd.h>
17437
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017438int
17439main ()
17440{
17441void* p = getpagesize
17442 ;
17443 return 0;
17444}
17445_ACEOF
17446rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017447if { (ac_try="$ac_compile"
17448case "(($ac_try" in
17449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17450 *) ac_try_echo=$ac_try;;
17451esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017452eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17453$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017456 grep -v '^ *+' conftest.er1 >conftest.err
17457 rm -f conftest.er1
17458 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017459 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460 (exit $ac_status); } && {
17461 test -z "$ac_c_werror_flag" ||
17462 test ! -s conftest.err
17463 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017464
17465cat >>confdefs.h <<\_ACEOF
17466#define HAVE_GETPAGESIZE 1
17467_ACEOF
17468
Benjamin Petersona8332062009-09-11 22:36:27 +000017469 { $as_echo "$as_me:$LINENO: result: yes" >&5
17470$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017471else
Benjamin Petersona8332062009-09-11 22:36:27 +000017472 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017473sed 's/^/| /' conftest.$ac_ext >&5
17474
Benjamin Petersona8332062009-09-11 22:36:27 +000017475 { $as_echo "$as_me:$LINENO: result: no" >&5
17476$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017477
17478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479
17480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017481
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017482for ac_prog in true
17483do
17484 # Extract the first word of "$ac_prog", so it can be a program name with args.
17485set dummy $ac_prog; ac_word=$2
Benjamin Petersona8332062009-09-11 22:36:27 +000017486{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
17487$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017488if test "${ac_cv_prog_TRUE+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000017489 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017490else
17491 if test -n "$TRUE"; then
17492 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17493else
17494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17495for as_dir in $PATH
17496do
17497 IFS=$as_save_IFS
17498 test -z "$as_dir" && as_dir=.
17499 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017500 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 +000017501 ac_cv_prog_TRUE="$ac_prog"
Benjamin Petersona8332062009-09-11 22:36:27 +000017502 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017503 break 2
17504 fi
17505done
17506done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017508
17509fi
17510fi
17511TRUE=$ac_cv_prog_TRUE
17512if test -n "$TRUE"; then
Benjamin Petersona8332062009-09-11 22:36:27 +000017513 { $as_echo "$as_me:$LINENO: result: $TRUE" >&5
17514$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017515else
Benjamin Petersona8332062009-09-11 22:36:27 +000017516 { $as_echo "$as_me:$LINENO: result: no" >&5
17517$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017518fi
17519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017521 test -n "$TRUE" && break
17522done
17523test -n "$TRUE" || TRUE="/bin/true"
17524
17525
Benjamin Petersona8332062009-09-11 22:36:27 +000017526{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17527$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017528if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000017529 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017530else
17531 ac_check_lib_save_LIBS=$LIBS
17532LIBS="-lc $LIBS"
17533cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017534/* confdefs.h. */
17535_ACEOF
17536cat confdefs.h >>conftest.$ac_ext
17537cat >>conftest.$ac_ext <<_ACEOF
17538/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540/* Override any GCC internal prototype to avoid an error.
17541 Use char because int might match the return type of a GCC
17542 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017543#ifdef __cplusplus
17544extern "C"
17545#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017546char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017547int
17548main ()
17549{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017551 ;
17552 return 0;
17553}
17554_ACEOF
17555rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556if { (ac_try="$ac_link"
17557case "(($ac_try" in
17558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17559 *) ac_try_echo=$ac_try;;
17560esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017561eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17562$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017565 grep -v '^ *+' conftest.er1 >conftest.err
17566 rm -f conftest.er1
17567 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017568 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569 (exit $ac_status); } && {
17570 test -z "$ac_c_werror_flag" ||
17571 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000017572 } && test -s conftest$ac_exeext && {
17573 test "$cross_compiling" = yes ||
17574 $as_test_x conftest$ac_exeext
17575 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017576 ac_cv_lib_c_inet_aton=yes
17577else
Benjamin Petersona8332062009-09-11 22:36:27 +000017578 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017579sed 's/^/| /' conftest.$ac_ext >&5
17580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583
Benjamin Petersona8332062009-09-11 22:36:27 +000017584rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017586 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017587LIBS=$ac_check_lib_save_LIBS
17588fi
Benjamin Petersona8332062009-09-11 22:36:27 +000017589{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17590$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
17591if test "x$ac_cv_lib_c_inet_aton" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017592 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017593else
17594
Benjamin Petersona8332062009-09-11 22:36:27 +000017595{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17596$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017597if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000017598 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017599else
17600 ac_check_lib_save_LIBS=$LIBS
17601LIBS="-lresolv $LIBS"
17602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017603/* confdefs.h. */
17604_ACEOF
17605cat confdefs.h >>conftest.$ac_ext
17606cat >>conftest.$ac_ext <<_ACEOF
17607/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609/* Override any GCC internal prototype to avoid an error.
17610 Use char because int might match the return type of a GCC
17611 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017612#ifdef __cplusplus
17613extern "C"
17614#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017615char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017616int
17617main ()
17618{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017620 ;
17621 return 0;
17622}
17623_ACEOF
17624rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625if { (ac_try="$ac_link"
17626case "(($ac_try" in
17627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17628 *) ac_try_echo=$ac_try;;
17629esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017630eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17631$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017634 grep -v '^ *+' conftest.er1 >conftest.err
17635 rm -f conftest.er1
17636 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017637 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638 (exit $ac_status); } && {
17639 test -z "$ac_c_werror_flag" ||
17640 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000017641 } && test -s conftest$ac_exeext && {
17642 test "$cross_compiling" = yes ||
17643 $as_test_x conftest$ac_exeext
17644 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017645 ac_cv_lib_resolv_inet_aton=yes
17646else
Benjamin Petersona8332062009-09-11 22:36:27 +000017647 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017648sed 's/^/| /' conftest.$ac_ext >&5
17649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652
Benjamin Petersona8332062009-09-11 22:36:27 +000017653rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017655 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017656LIBS=$ac_check_lib_save_LIBS
17657fi
Benjamin Petersona8332062009-09-11 22:36:27 +000017658{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17659$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
17660if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017661 cat >>confdefs.h <<_ACEOF
17662#define HAVE_LIBRESOLV 1
17663_ACEOF
17664
17665 LIBS="-lresolv $LIBS"
17666
17667fi
17668
17669
17670fi
17671
17672
Christian Heimesd0764e22007-12-04 15:00:33 +000017673# On Tru64, chflags seems to be present, but calling it will
17674# exit Python
Benjamin Petersona8332062009-09-11 22:36:27 +000017675{ $as_echo "$as_me:$LINENO: checking for chflags" >&5
17676$as_echo_n "checking for chflags... " >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017677if test "$cross_compiling" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000017678 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
17679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17680{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017681See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017682$as_echo "$as_me: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017683See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000017684 { (exit 1); exit 1; }; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017685else
17686 cat >conftest.$ac_ext <<_ACEOF
17687/* confdefs.h. */
17688_ACEOF
17689cat confdefs.h >>conftest.$ac_ext
17690cat >>conftest.$ac_ext <<_ACEOF
17691/* end confdefs.h. */
17692
17693#include <sys/stat.h>
17694#include <unistd.h>
17695int main(int argc, char*argv[])
17696{
17697 if(chflags(argv[0], 0) != 0)
17698 return 1;
17699 return 0;
17700}
17701
17702_ACEOF
17703rm -f conftest$ac_exeext
17704if { (ac_try="$ac_link"
17705case "(($ac_try" in
17706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17707 *) ac_try_echo=$ac_try;;
17708esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017709eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17710$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017711 (eval "$ac_link") 2>&5
17712 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000017713 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017714 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17715 { (case "(($ac_try" in
17716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17717 *) ac_try_echo=$ac_try;;
17718esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017719eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17720$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017721 (eval "$ac_try") 2>&5
17722 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000017723 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017724 (exit $ac_status); }; }; then
17725
17726cat >>confdefs.h <<\_ACEOF
17727#define HAVE_CHFLAGS 1
17728_ACEOF
17729
Benjamin Petersona8332062009-09-11 22:36:27 +000017730 { $as_echo "$as_me:$LINENO: result: yes" >&5
17731$as_echo "yes" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017732else
Benjamin Petersona8332062009-09-11 22:36:27 +000017733 $as_echo "$as_me: program exited with status $ac_status" >&5
17734$as_echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017735sed 's/^/| /' conftest.$ac_ext >&5
17736
17737( exit $ac_status )
Benjamin Petersona8332062009-09-11 22:36:27 +000017738{ $as_echo "$as_me:$LINENO: result: no" >&5
17739$as_echo "no" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017740
17741fi
Benjamin Petersona8332062009-09-11 22:36:27 +000017742rm -rf conftest.dSYM
Christian Heimesd0764e22007-12-04 15:00:33 +000017743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17744fi
17745
17746
17747
Benjamin Petersona8332062009-09-11 22:36:27 +000017748{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5
17749$as_echo_n "checking for lchflags... " >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017750if test "$cross_compiling" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000017751 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
17752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17753{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017754See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017755$as_echo "$as_me: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017756See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000017757 { (exit 1); exit 1; }; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017758else
17759 cat >conftest.$ac_ext <<_ACEOF
17760/* confdefs.h. */
17761_ACEOF
17762cat confdefs.h >>conftest.$ac_ext
17763cat >>conftest.$ac_ext <<_ACEOF
17764/* end confdefs.h. */
17765
17766#include <sys/stat.h>
17767#include <unistd.h>
17768int main(int argc, char*argv[])
17769{
17770 if(lchflags(argv[0], 0) != 0)
17771 return 1;
17772 return 0;
17773}
17774
17775_ACEOF
17776rm -f conftest$ac_exeext
17777if { (ac_try="$ac_link"
17778case "(($ac_try" in
17779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17780 *) ac_try_echo=$ac_try;;
17781esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017782eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17783$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017784 (eval "$ac_link") 2>&5
17785 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000017786 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017787 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17788 { (case "(($ac_try" in
17789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17790 *) ac_try_echo=$ac_try;;
17791esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017792eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17793$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017794 (eval "$ac_try") 2>&5
17795 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000017796 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017797 (exit $ac_status); }; }; then
17798
17799cat >>confdefs.h <<\_ACEOF
17800#define HAVE_LCHFLAGS 1
17801_ACEOF
17802
Benjamin Petersona8332062009-09-11 22:36:27 +000017803 { $as_echo "$as_me:$LINENO: result: yes" >&5
17804$as_echo "yes" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017805else
Benjamin Petersona8332062009-09-11 22:36:27 +000017806 $as_echo "$as_me: program exited with status $ac_status" >&5
17807$as_echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017808sed 's/^/| /' conftest.$ac_ext >&5
17809
17810( exit $ac_status )
Benjamin Petersona8332062009-09-11 22:36:27 +000017811{ $as_echo "$as_me:$LINENO: result: no" >&5
17812$as_echo "no" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017813
17814fi
Benjamin Petersona8332062009-09-11 22:36:27 +000017815rm -rf conftest.dSYM
Christian Heimesd0764e22007-12-04 15:00:33 +000017816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17817fi
17818
17819
17820
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017821case $ac_sys_system/$ac_sys_release in
17822Darwin/*)
17823 _CUR_CFLAGS="${CFLAGS}"
17824 _CUR_LDFLAGS="${LDFLAGS}"
17825 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17826 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17827 ;;
17828esac
17829
Benjamin Petersona8332062009-09-11 22:36:27 +000017830{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17831$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017832if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000017833 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017834else
17835 ac_check_lib_save_LIBS=$LIBS
17836LIBS="-lz $LIBS"
17837cat >conftest.$ac_ext <<_ACEOF
17838/* confdefs.h. */
17839_ACEOF
17840cat confdefs.h >>conftest.$ac_ext
17841cat >>conftest.$ac_ext <<_ACEOF
17842/* end confdefs.h. */
17843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844/* Override any GCC internal prototype to avoid an error.
17845 Use char because int might match the return type of a GCC
17846 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017847#ifdef __cplusplus
17848extern "C"
17849#endif
17850char inflateCopy ();
17851int
17852main ()
17853{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017855 ;
17856 return 0;
17857}
17858_ACEOF
17859rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860if { (ac_try="$ac_link"
17861case "(($ac_try" in
17862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17863 *) ac_try_echo=$ac_try;;
17864esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017865eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17866$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017868 ac_status=$?
17869 grep -v '^ *+' conftest.er1 >conftest.err
17870 rm -f conftest.er1
17871 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017872 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873 (exit $ac_status); } && {
17874 test -z "$ac_c_werror_flag" ||
17875 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000017876 } && test -s conftest$ac_exeext && {
17877 test "$cross_compiling" = yes ||
17878 $as_test_x conftest$ac_exeext
17879 }; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017880 ac_cv_lib_z_inflateCopy=yes
17881else
Benjamin Petersona8332062009-09-11 22:36:27 +000017882 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017883sed 's/^/| /' conftest.$ac_ext >&5
17884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017885 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017887
Benjamin Petersona8332062009-09-11 22:36:27 +000017888rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017889rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017890 conftest$ac_exeext conftest.$ac_ext
17891LIBS=$ac_check_lib_save_LIBS
17892fi
Benjamin Petersona8332062009-09-11 22:36:27 +000017893{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17894$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
17895if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017896
17897cat >>confdefs.h <<\_ACEOF
17898#define HAVE_ZLIB_COPY 1
17899_ACEOF
17900
17901fi
17902
17903
17904case $ac_sys_system/$ac_sys_release in
17905Darwin/*)
17906 CFLAGS="${_CUR_CFLAGS}"
17907 LDFLAGS="${_CUR_LDFLAGS}"
17908 ;;
17909esac
17910
Benjamin Petersona8332062009-09-11 22:36:27 +000017911{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5
17912$as_echo_n "checking for hstrerror... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017913cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017914/* confdefs.h. */
17915_ACEOF
17916cat confdefs.h >>conftest.$ac_ext
17917cat >>conftest.$ac_ext <<_ACEOF
17918/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017919
17920#include "confdefs.h"
17921#include <netdb.h>
17922
Martin v. Löwise9416172003-05-03 10:12:45 +000017923int
17924main ()
17925{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017926void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017927 ;
17928 return 0;
17929}
17930_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017931rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017932if { (ac_try="$ac_link"
17933case "(($ac_try" in
17934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17935 *) ac_try_echo=$ac_try;;
17936esac
Benjamin Petersona8332062009-09-11 22:36:27 +000017937eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17938$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017939 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017941 grep -v '^ *+' conftest.er1 >conftest.err
17942 rm -f conftest.er1
17943 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000017944 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945 (exit $ac_status); } && {
17946 test -z "$ac_c_werror_flag" ||
17947 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000017948 } && test -s conftest$ac_exeext && {
17949 test "$cross_compiling" = yes ||
17950 $as_test_x conftest$ac_exeext
17951 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017952
17953cat >>confdefs.h <<\_ACEOF
17954#define HAVE_HSTRERROR 1
17955_ACEOF
17956
Benjamin Petersona8332062009-09-11 22:36:27 +000017957 { $as_echo "$as_me:$LINENO: result: yes" >&5
17958$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017959else
Benjamin Petersona8332062009-09-11 22:36:27 +000017960 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017961sed 's/^/| /' conftest.$ac_ext >&5
17962
Benjamin Petersona8332062009-09-11 22:36:27 +000017963 { $as_echo "$as_me:$LINENO: result: no" >&5
17964$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017965
17966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967
Benjamin Petersona8332062009-09-11 22:36:27 +000017968rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017971
Benjamin Petersona8332062009-09-11 22:36:27 +000017972{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5
17973$as_echo_n "checking for inet_aton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017975/* confdefs.h. */
17976_ACEOF
17977cat confdefs.h >>conftest.$ac_ext
17978cat >>conftest.$ac_ext <<_ACEOF
17979/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017980
17981#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017982#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017983#include <sys/socket.h>
17984#include <netinet/in.h>
17985#include <arpa/inet.h>
17986
Martin v. Löwise9416172003-05-03 10:12:45 +000017987int
17988main ()
17989{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017990void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017991 ;
17992 return 0;
17993}
17994_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017995rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017996if { (ac_try="$ac_link"
17997case "(($ac_try" in
17998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17999 *) ac_try_echo=$ac_try;;
18000esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018001eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18002$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018005 grep -v '^ *+' conftest.er1 >conftest.err
18006 rm -f conftest.er1
18007 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018008 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009 (exit $ac_status); } && {
18010 test -z "$ac_c_werror_flag" ||
18011 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000018012 } && test -s conftest$ac_exeext && {
18013 test "$cross_compiling" = yes ||
18014 $as_test_x conftest$ac_exeext
18015 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018016
18017cat >>confdefs.h <<\_ACEOF
18018#define HAVE_INET_ATON 1
18019_ACEOF
18020
Benjamin Petersona8332062009-09-11 22:36:27 +000018021 { $as_echo "$as_me:$LINENO: result: yes" >&5
18022$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018023else
Benjamin Petersona8332062009-09-11 22:36:27 +000018024 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018025sed 's/^/| /' conftest.$ac_ext >&5
18026
Benjamin Petersona8332062009-09-11 22:36:27 +000018027 { $as_echo "$as_me:$LINENO: result: no" >&5
18028$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018029
18030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018031
Benjamin Petersona8332062009-09-11 22:36:27 +000018032rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018035
Benjamin Petersona8332062009-09-11 22:36:27 +000018036{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5
18037$as_echo_n "checking for inet_pton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018039/* confdefs.h. */
18040_ACEOF
18041cat confdefs.h >>conftest.$ac_ext
18042cat >>conftest.$ac_ext <<_ACEOF
18043/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018044
18045#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018046#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018047#include <sys/socket.h>
18048#include <netinet/in.h>
18049#include <arpa/inet.h>
18050
Martin v. Löwise9416172003-05-03 10:12:45 +000018051int
18052main ()
18053{
18054void* p = inet_pton
18055 ;
18056 return 0;
18057}
18058_ACEOF
18059rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060if { (ac_try="$ac_compile"
18061case "(($ac_try" in
18062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18063 *) ac_try_echo=$ac_try;;
18064esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018065eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18066$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018069 grep -v '^ *+' conftest.er1 >conftest.err
18070 rm -f conftest.er1
18071 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018072 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073 (exit $ac_status); } && {
18074 test -z "$ac_c_werror_flag" ||
18075 test ! -s conftest.err
18076 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018077
18078cat >>confdefs.h <<\_ACEOF
18079#define HAVE_INET_PTON 1
18080_ACEOF
18081
Benjamin Petersona8332062009-09-11 22:36:27 +000018082 { $as_echo "$as_me:$LINENO: result: yes" >&5
18083$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018084else
Benjamin Petersona8332062009-09-11 22:36:27 +000018085 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018086sed 's/^/| /' conftest.$ac_ext >&5
18087
Benjamin Petersona8332062009-09-11 22:36:27 +000018088 { $as_echo "$as_me:$LINENO: result: no" >&5
18089$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018090
18091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018092
18093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018094
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018095# On some systems, setgroups is in unistd.h, on others, in grp.h
Benjamin Petersona8332062009-09-11 22:36:27 +000018096{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5
18097$as_echo_n "checking for setgroups... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018099/* confdefs.h. */
18100_ACEOF
18101cat confdefs.h >>conftest.$ac_ext
18102cat >>conftest.$ac_ext <<_ACEOF
18103/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018104
18105#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018106#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018107#ifdef HAVE_GRP_H
18108#include <grp.h>
18109#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018110
Martin v. Löwisd5843682002-11-21 20:41:28 +000018111int
18112main ()
18113{
18114void* p = setgroups
18115 ;
18116 return 0;
18117}
18118_ACEOF
18119rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120if { (ac_try="$ac_compile"
18121case "(($ac_try" in
18122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18123 *) ac_try_echo=$ac_try;;
18124esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018125eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18126$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018129 grep -v '^ *+' conftest.er1 >conftest.err
18130 rm -f conftest.er1
18131 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018132 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018133 (exit $ac_status); } && {
18134 test -z "$ac_c_werror_flag" ||
18135 test ! -s conftest.err
18136 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018137
18138cat >>confdefs.h <<\_ACEOF
18139#define HAVE_SETGROUPS 1
18140_ACEOF
18141
Benjamin Petersona8332062009-09-11 22:36:27 +000018142 { $as_echo "$as_me:$LINENO: result: yes" >&5
18143$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018144else
Benjamin Petersona8332062009-09-11 22:36:27 +000018145 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018146sed 's/^/| /' conftest.$ac_ext >&5
18147
Benjamin Petersona8332062009-09-11 22:36:27 +000018148 { $as_echo "$as_me:$LINENO: result: no" >&5
18149$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018150
18151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152
18153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018154
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018155# check for openpty and forkpty
18156
Martin v. Löwis11437992002-04-12 09:54:03 +000018157
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018158for ac_func in openpty
18159do
Benjamin Petersona8332062009-09-11 22:36:27 +000018160as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18161{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18162$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018163if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000018164 $as_echo_n "(cached) " >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018165else
Martin v. Löwis11437992002-04-12 09:54:03 +000018166 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018167/* confdefs.h. */
18168_ACEOF
18169cat confdefs.h >>conftest.$ac_ext
18170cat >>conftest.$ac_ext <<_ACEOF
18171/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018172/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18173 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18174#define $ac_func innocuous_$ac_func
18175
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018176/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018177 which can conflict with char $ac_func (); below.
18178 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018179 <limits.h> exists even on freestanding compilers. */
18180
18181#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018182# include <limits.h>
18183#else
18184# include <assert.h>
18185#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018186
18187#undef $ac_func
18188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189/* Override any GCC internal prototype to avoid an error.
18190 Use char because int might match the return type of a GCC
18191 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018192#ifdef __cplusplus
18193extern "C"
18194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018195char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018196/* The GNU C library defines this for functions which it implements
18197 to always fail with ENOSYS. Some functions are actually named
18198 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018199#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018200choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018201#endif
18202
Skip Montanaro6dead952003-09-25 14:50:04 +000018203int
18204main ()
18205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018206return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018207 ;
18208 return 0;
18209}
18210_ACEOF
18211rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018212if { (ac_try="$ac_link"
18213case "(($ac_try" in
18214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18215 *) ac_try_echo=$ac_try;;
18216esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018217eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18218$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018219 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018221 grep -v '^ *+' conftest.er1 >conftest.err
18222 rm -f conftest.er1
18223 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018224 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018225 (exit $ac_status); } && {
18226 test -z "$ac_c_werror_flag" ||
18227 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000018228 } && test -s conftest$ac_exeext && {
18229 test "$cross_compiling" = yes ||
18230 $as_test_x conftest$ac_exeext
18231 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018232 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018233else
Benjamin Petersona8332062009-09-11 22:36:27 +000018234 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018235sed 's/^/| /' conftest.$ac_ext >&5
18236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018237 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018239
Benjamin Petersona8332062009-09-11 22:36:27 +000018240rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018241rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018242 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018243fi
Benjamin Petersona8332062009-09-11 22:36:27 +000018244ac_res=`eval 'as_val=${'$as_ac_var'}
18245 $as_echo "$as_val"'`
18246 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18247$as_echo "$ac_res" >&6; }
18248as_val=`eval 'as_val=${'$as_ac_var'}
18249 $as_echo "$as_val"'`
18250 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018251 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000018252#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018253_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018254
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018255else
Benjamin Petersona8332062009-09-11 22:36:27 +000018256 { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18257$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018258if test "${ac_cv_lib_util_openpty+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000018259 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018260else
Martin v. Löwis11437992002-04-12 09:54:03 +000018261 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018262LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018263cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018264/* confdefs.h. */
18265_ACEOF
18266cat confdefs.h >>conftest.$ac_ext
18267cat >>conftest.$ac_ext <<_ACEOF
18268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018270/* Override any GCC internal prototype to avoid an error.
18271 Use char because int might match the return type of a GCC
18272 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018273#ifdef __cplusplus
18274extern "C"
18275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018276char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018277int
18278main ()
18279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018281 ;
18282 return 0;
18283}
18284_ACEOF
18285rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018286if { (ac_try="$ac_link"
18287case "(($ac_try" in
18288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18289 *) ac_try_echo=$ac_try;;
18290esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018291eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18292$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018293 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018295 grep -v '^ *+' conftest.er1 >conftest.err
18296 rm -f conftest.er1
18297 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018298 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018299 (exit $ac_status); } && {
18300 test -z "$ac_c_werror_flag" ||
18301 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000018302 } && test -s conftest$ac_exeext && {
18303 test "$cross_compiling" = yes ||
18304 $as_test_x conftest$ac_exeext
18305 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018306 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018307else
Benjamin Petersona8332062009-09-11 22:36:27 +000018308 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018309sed 's/^/| /' conftest.$ac_ext >&5
18310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018313
Benjamin Petersona8332062009-09-11 22:36:27 +000018314rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018315rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018316 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018317LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018318fi
Benjamin Petersona8332062009-09-11 22:36:27 +000018319{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18320$as_echo "$ac_cv_lib_util_openpty" >&6; }
18321if test "x$ac_cv_lib_util_openpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018322 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018323#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018324_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018325 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018326else
Benjamin Petersona8332062009-09-11 22:36:27 +000018327 { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18328$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018329if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000018330 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018331else
18332 ac_check_lib_save_LIBS=$LIBS
18333LIBS="-lbsd $LIBS"
18334cat >conftest.$ac_ext <<_ACEOF
18335/* confdefs.h. */
18336_ACEOF
18337cat confdefs.h >>conftest.$ac_ext
18338cat >>conftest.$ac_ext <<_ACEOF
18339/* end confdefs.h. */
18340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018341/* Override any GCC internal prototype to avoid an error.
18342 Use char because int might match the return type of a GCC
18343 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018344#ifdef __cplusplus
18345extern "C"
18346#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018347char openpty ();
18348int
18349main ()
18350{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018351return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018352 ;
18353 return 0;
18354}
18355_ACEOF
18356rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018357if { (ac_try="$ac_link"
18358case "(($ac_try" in
18359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18360 *) ac_try_echo=$ac_try;;
18361esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018362eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18363$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018364 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018365 ac_status=$?
18366 grep -v '^ *+' conftest.er1 >conftest.err
18367 rm -f conftest.er1
18368 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018369 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018370 (exit $ac_status); } && {
18371 test -z "$ac_c_werror_flag" ||
18372 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000018373 } && test -s conftest$ac_exeext && {
18374 test "$cross_compiling" = yes ||
18375 $as_test_x conftest$ac_exeext
18376 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018377 ac_cv_lib_bsd_openpty=yes
18378else
Benjamin Petersona8332062009-09-11 22:36:27 +000018379 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018380sed 's/^/| /' conftest.$ac_ext >&5
18381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018382 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018384
Benjamin Petersona8332062009-09-11 22:36:27 +000018385rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018386rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018387 conftest$ac_exeext conftest.$ac_ext
18388LIBS=$ac_check_lib_save_LIBS
18389fi
Benjamin Petersona8332062009-09-11 22:36:27 +000018390{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18391$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
18392if test "x$ac_cv_lib_bsd_openpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018393 cat >>confdefs.h <<\_ACEOF
18394#define HAVE_OPENPTY 1
18395_ACEOF
18396 LIBS="$LIBS -lbsd"
18397fi
18398
18399
18400fi
18401
Fred Drake8cef4cf2000-06-28 16:40:38 +000018402
18403fi
18404done
18405
Martin v. Löwis11437992002-04-12 09:54:03 +000018406
Fred Drake8cef4cf2000-06-28 16:40:38 +000018407for ac_func in forkpty
18408do
Benjamin Petersona8332062009-09-11 22:36:27 +000018409as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18410{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18411$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018412if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000018413 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018414else
Martin v. Löwis11437992002-04-12 09:54:03 +000018415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018416/* confdefs.h. */
18417_ACEOF
18418cat confdefs.h >>conftest.$ac_ext
18419cat >>conftest.$ac_ext <<_ACEOF
18420/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018421/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18422 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18423#define $ac_func innocuous_$ac_func
18424
Fred Drake8cef4cf2000-06-28 16:40:38 +000018425/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018426 which can conflict with char $ac_func (); below.
18427 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018428 <limits.h> exists even on freestanding compilers. */
18429
18430#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018431# include <limits.h>
18432#else
18433# include <assert.h>
18434#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018435
18436#undef $ac_func
18437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018438/* Override any GCC internal prototype to avoid an error.
18439 Use char because int might match the return type of a GCC
18440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018441#ifdef __cplusplus
18442extern "C"
18443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018444char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018445/* The GNU C library defines this for functions which it implements
18446 to always fail with ENOSYS. Some functions are actually named
18447 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018448#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018449choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018450#endif
18451
Skip Montanaro6dead952003-09-25 14:50:04 +000018452int
18453main ()
18454{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018455return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018456 ;
18457 return 0;
18458}
18459_ACEOF
18460rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018461if { (ac_try="$ac_link"
18462case "(($ac_try" in
18463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18464 *) ac_try_echo=$ac_try;;
18465esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018466eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18467$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018468 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018470 grep -v '^ *+' conftest.er1 >conftest.err
18471 rm -f conftest.er1
18472 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018473 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018474 (exit $ac_status); } && {
18475 test -z "$ac_c_werror_flag" ||
18476 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000018477 } && test -s conftest$ac_exeext && {
18478 test "$cross_compiling" = yes ||
18479 $as_test_x conftest$ac_exeext
18480 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018481 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018482else
Benjamin Petersona8332062009-09-11 22:36:27 +000018483 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018484sed 's/^/| /' conftest.$ac_ext >&5
18485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018488
Benjamin Petersona8332062009-09-11 22:36:27 +000018489rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018491 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018492fi
Benjamin Petersona8332062009-09-11 22:36:27 +000018493ac_res=`eval 'as_val=${'$as_ac_var'}
18494 $as_echo "$as_val"'`
18495 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18496$as_echo "$ac_res" >&6; }
18497as_val=`eval 'as_val=${'$as_ac_var'}
18498 $as_echo "$as_val"'`
18499 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018500 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000018501#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018502_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018503
Fred Drake8cef4cf2000-06-28 16:40:38 +000018504else
Benjamin Petersona8332062009-09-11 22:36:27 +000018505 { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18506$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018507if test "${ac_cv_lib_util_forkpty+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000018508 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018509else
Martin v. Löwis11437992002-04-12 09:54:03 +000018510 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018511LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018512cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018513/* confdefs.h. */
18514_ACEOF
18515cat confdefs.h >>conftest.$ac_ext
18516cat >>conftest.$ac_ext <<_ACEOF
18517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018519/* Override any GCC internal prototype to avoid an error.
18520 Use char because int might match the return type of a GCC
18521 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018522#ifdef __cplusplus
18523extern "C"
18524#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018525char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018526int
18527main ()
18528{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018529return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018530 ;
18531 return 0;
18532}
18533_ACEOF
18534rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018535if { (ac_try="$ac_link"
18536case "(($ac_try" in
18537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18538 *) ac_try_echo=$ac_try;;
18539esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018540eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18541$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018544 grep -v '^ *+' conftest.er1 >conftest.err
18545 rm -f conftest.er1
18546 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018547 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018548 (exit $ac_status); } && {
18549 test -z "$ac_c_werror_flag" ||
18550 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000018551 } && test -s conftest$ac_exeext && {
18552 test "$cross_compiling" = yes ||
18553 $as_test_x conftest$ac_exeext
18554 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018555 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018556else
Benjamin Petersona8332062009-09-11 22:36:27 +000018557 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018558sed 's/^/| /' conftest.$ac_ext >&5
18559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562
Benjamin Petersona8332062009-09-11 22:36:27 +000018563rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018565 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018566LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018567fi
Benjamin Petersona8332062009-09-11 22:36:27 +000018568{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18569$as_echo "$ac_cv_lib_util_forkpty" >&6; }
18570if test "x$ac_cv_lib_util_forkpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018571 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018572#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018573_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018574 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018575else
Benjamin Petersona8332062009-09-11 22:36:27 +000018576 { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18577$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018578if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000018579 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018580else
18581 ac_check_lib_save_LIBS=$LIBS
18582LIBS="-lbsd $LIBS"
18583cat >conftest.$ac_ext <<_ACEOF
18584/* confdefs.h. */
18585_ACEOF
18586cat confdefs.h >>conftest.$ac_ext
18587cat >>conftest.$ac_ext <<_ACEOF
18588/* end confdefs.h. */
18589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018590/* Override any GCC internal prototype to avoid an error.
18591 Use char because int might match the return type of a GCC
18592 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018593#ifdef __cplusplus
18594extern "C"
18595#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018596char forkpty ();
18597int
18598main ()
18599{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018601 ;
18602 return 0;
18603}
18604_ACEOF
18605rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018606if { (ac_try="$ac_link"
18607case "(($ac_try" in
18608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18609 *) ac_try_echo=$ac_try;;
18610esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018611eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18612$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018613 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018614 ac_status=$?
18615 grep -v '^ *+' conftest.er1 >conftest.err
18616 rm -f conftest.er1
18617 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018618 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619 (exit $ac_status); } && {
18620 test -z "$ac_c_werror_flag" ||
18621 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000018622 } && test -s conftest$ac_exeext && {
18623 test "$cross_compiling" = yes ||
18624 $as_test_x conftest$ac_exeext
18625 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018626 ac_cv_lib_bsd_forkpty=yes
18627else
Benjamin Petersona8332062009-09-11 22:36:27 +000018628 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018629sed 's/^/| /' conftest.$ac_ext >&5
18630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018633
Benjamin Petersona8332062009-09-11 22:36:27 +000018634rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018636 conftest$ac_exeext conftest.$ac_ext
18637LIBS=$ac_check_lib_save_LIBS
18638fi
Benjamin Petersona8332062009-09-11 22:36:27 +000018639{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18640$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
18641if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018642 cat >>confdefs.h <<\_ACEOF
18643#define HAVE_FORKPTY 1
18644_ACEOF
18645 LIBS="$LIBS -lbsd"
18646fi
18647
18648
18649fi
18650
Fred Drake8cef4cf2000-06-28 16:40:38 +000018651
18652fi
18653done
18654
Jack Jansendd19cf82001-12-06 22:36:17 +000018655
Christian Heimesb186d002008-03-18 15:15:01 +000018656# Stuff for expat.
18657
18658for ac_func in memmove
18659do
Benjamin Petersona8332062009-09-11 22:36:27 +000018660as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18661{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18662$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018663if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000018664 $as_echo_n "(cached) " >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018665else
18666 cat >conftest.$ac_ext <<_ACEOF
18667/* confdefs.h. */
18668_ACEOF
18669cat confdefs.h >>conftest.$ac_ext
18670cat >>conftest.$ac_ext <<_ACEOF
18671/* end confdefs.h. */
18672/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18673 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18674#define $ac_func innocuous_$ac_func
18675
18676/* System header to define __stub macros and hopefully few prototypes,
18677 which can conflict with char $ac_func (); below.
18678 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18679 <limits.h> exists even on freestanding compilers. */
18680
18681#ifdef __STDC__
18682# include <limits.h>
18683#else
18684# include <assert.h>
18685#endif
18686
18687#undef $ac_func
18688
18689/* Override any GCC internal prototype to avoid an error.
18690 Use char because int might match the return type of a GCC
18691 builtin and then its argument prototype would still apply. */
18692#ifdef __cplusplus
18693extern "C"
18694#endif
18695char $ac_func ();
18696/* The GNU C library defines this for functions which it implements
18697 to always fail with ENOSYS. Some functions are actually named
18698 something starting with __ and the normal name is an alias. */
18699#if defined __stub_$ac_func || defined __stub___$ac_func
18700choke me
18701#endif
18702
18703int
18704main ()
18705{
18706return $ac_func ();
18707 ;
18708 return 0;
18709}
18710_ACEOF
18711rm -f conftest.$ac_objext conftest$ac_exeext
18712if { (ac_try="$ac_link"
18713case "(($ac_try" in
18714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18715 *) ac_try_echo=$ac_try;;
18716esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018717eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18718$as_echo "$ac_try_echo") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018719 (eval "$ac_link") 2>conftest.er1
18720 ac_status=$?
18721 grep -v '^ *+' conftest.er1 >conftest.err
18722 rm -f conftest.er1
18723 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018724 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018725 (exit $ac_status); } && {
18726 test -z "$ac_c_werror_flag" ||
18727 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000018728 } && test -s conftest$ac_exeext && {
18729 test "$cross_compiling" = yes ||
18730 $as_test_x conftest$ac_exeext
18731 }; then
Christian Heimesb186d002008-03-18 15:15:01 +000018732 eval "$as_ac_var=yes"
18733else
Benjamin Petersona8332062009-09-11 22:36:27 +000018734 $as_echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018735sed 's/^/| /' conftest.$ac_ext >&5
18736
18737 eval "$as_ac_var=no"
18738fi
18739
Benjamin Petersona8332062009-09-11 22:36:27 +000018740rm -rf conftest.dSYM
Christian Heimesb186d002008-03-18 15:15:01 +000018741rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18742 conftest$ac_exeext conftest.$ac_ext
18743fi
Benjamin Petersona8332062009-09-11 22:36:27 +000018744ac_res=`eval 'as_val=${'$as_ac_var'}
18745 $as_echo "$as_val"'`
18746 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18747$as_echo "$ac_res" >&6; }
18748as_val=`eval 'as_val=${'$as_ac_var'}
18749 $as_echo "$as_val"'`
18750 if test "x$as_val" = x""yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018751 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000018752#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018753_ACEOF
18754
18755fi
18756done
18757
18758
Michael W. Hudson54241132001-12-07 15:38:26 +000018759# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018760
18761
18762
18763
18764
18765
Fred Drake8cef4cf2000-06-28 16:40:38 +000018766for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18767do
Benjamin Petersona8332062009-09-11 22:36:27 +000018768as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18769{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18770$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018771if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000018772 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018773else
Martin v. Löwis11437992002-04-12 09:54:03 +000018774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018775/* confdefs.h. */
18776_ACEOF
18777cat confdefs.h >>conftest.$ac_ext
18778cat >>conftest.$ac_ext <<_ACEOF
18779/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018780/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18781 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18782#define $ac_func innocuous_$ac_func
18783
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018784/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018785 which can conflict with char $ac_func (); below.
18786 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018787 <limits.h> exists even on freestanding compilers. */
18788
18789#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018790# include <limits.h>
18791#else
18792# include <assert.h>
18793#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018794
18795#undef $ac_func
18796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018797/* Override any GCC internal prototype to avoid an error.
18798 Use char because int might match the return type of a GCC
18799 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018800#ifdef __cplusplus
18801extern "C"
18802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018803char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018804/* The GNU C library defines this for functions which it implements
18805 to always fail with ENOSYS. Some functions are actually named
18806 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018807#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018808choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018809#endif
18810
Skip Montanaro6dead952003-09-25 14:50:04 +000018811int
18812main ()
18813{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018814return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018815 ;
18816 return 0;
18817}
18818_ACEOF
18819rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018820if { (ac_try="$ac_link"
18821case "(($ac_try" in
18822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18823 *) ac_try_echo=$ac_try;;
18824esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018825eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18826$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018827 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018829 grep -v '^ *+' conftest.er1 >conftest.err
18830 rm -f conftest.er1
18831 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018832 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018833 (exit $ac_status); } && {
18834 test -z "$ac_c_werror_flag" ||
18835 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000018836 } && test -s conftest$ac_exeext && {
18837 test "$cross_compiling" = yes ||
18838 $as_test_x conftest$ac_exeext
18839 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018840 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018841else
Benjamin Petersona8332062009-09-11 22:36:27 +000018842 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018843sed 's/^/| /' conftest.$ac_ext >&5
18844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018845 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018847
Benjamin Petersona8332062009-09-11 22:36:27 +000018848rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018849rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018850 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018851fi
Benjamin Petersona8332062009-09-11 22:36:27 +000018852ac_res=`eval 'as_val=${'$as_ac_var'}
18853 $as_echo "$as_val"'`
18854 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18855$as_echo "$ac_res" >&6; }
18856as_val=`eval 'as_val=${'$as_ac_var'}
18857 $as_echo "$as_val"'`
18858 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018859 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000018860#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018861_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018862
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018863fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018864done
18865
Michael W. Hudson54241132001-12-07 15:38:26 +000018866
Martin v. Löwis11437992002-04-12 09:54:03 +000018867
18868
18869
Christian Heimesb186d002008-03-18 15:15:01 +000018870for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018871do
Benjamin Petersona8332062009-09-11 22:36:27 +000018872as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18873{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18874$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018875if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000018876 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018877else
Martin v. Löwis11437992002-04-12 09:54:03 +000018878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018879/* confdefs.h. */
18880_ACEOF
18881cat confdefs.h >>conftest.$ac_ext
18882cat >>conftest.$ac_ext <<_ACEOF
18883/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018884/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18885 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18886#define $ac_func innocuous_$ac_func
18887
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018888/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018889 which can conflict with char $ac_func (); below.
18890 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018891 <limits.h> exists even on freestanding compilers. */
18892
18893#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018894# include <limits.h>
18895#else
18896# include <assert.h>
18897#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018898
18899#undef $ac_func
18900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018901/* Override any GCC internal prototype to avoid an error.
18902 Use char because int might match the return type of a GCC
18903 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018904#ifdef __cplusplus
18905extern "C"
18906#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018907char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018908/* The GNU C library defines this for functions which it implements
18909 to always fail with ENOSYS. Some functions are actually named
18910 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018911#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018912choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018913#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018914
Skip Montanaro6dead952003-09-25 14:50:04 +000018915int
18916main ()
18917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018918return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018919 ;
18920 return 0;
18921}
18922_ACEOF
18923rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018924if { (ac_try="$ac_link"
18925case "(($ac_try" in
18926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18927 *) ac_try_echo=$ac_try;;
18928esac
Benjamin Petersona8332062009-09-11 22:36:27 +000018929eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18930$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018931 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018933 grep -v '^ *+' conftest.er1 >conftest.err
18934 rm -f conftest.er1
18935 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000018936 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018937 (exit $ac_status); } && {
18938 test -z "$ac_c_werror_flag" ||
18939 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000018940 } && test -s conftest$ac_exeext && {
18941 test "$cross_compiling" = yes ||
18942 $as_test_x conftest$ac_exeext
18943 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018944 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018945else
Benjamin Petersona8332062009-09-11 22:36:27 +000018946 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018947sed 's/^/| /' conftest.$ac_ext >&5
18948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018949 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018951
Benjamin Petersona8332062009-09-11 22:36:27 +000018952rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018953rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018955fi
Benjamin Petersona8332062009-09-11 22:36:27 +000018956ac_res=`eval 'as_val=${'$as_ac_var'}
18957 $as_echo "$as_val"'`
18958 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18959$as_echo "$ac_res" >&6; }
18960as_val=`eval 'as_val=${'$as_ac_var'}
18961 $as_echo "$as_val"'`
18962 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018963 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000018964#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018965_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018966
Martin v. Löwis1142de32002-03-29 16:28:31 +000018967else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018968 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018969 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018970 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18971 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018972esac
18973
Martin v. Löwis1142de32002-03-29 16:28:31 +000018974fi
18975done
18976
18977
Martin v. Löwis11437992002-04-12 09:54:03 +000018978
Martin v. Löwis1142de32002-03-29 16:28:31 +000018979for ac_func in getpgrp
18980do
Benjamin Petersona8332062009-09-11 22:36:27 +000018981as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18982{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18983$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018984if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000018985 $as_echo_n "(cached) " >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018986else
Martin v. Löwis11437992002-04-12 09:54:03 +000018987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018988/* confdefs.h. */
18989_ACEOF
18990cat confdefs.h >>conftest.$ac_ext
18991cat >>conftest.$ac_ext <<_ACEOF
18992/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018993/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18994 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18995#define $ac_func innocuous_$ac_func
18996
Martin v. Löwis1142de32002-03-29 16:28:31 +000018997/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018998 which can conflict with char $ac_func (); below.
18999 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019000 <limits.h> exists even on freestanding compilers. */
19001
19002#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019003# include <limits.h>
19004#else
19005# include <assert.h>
19006#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019007
19008#undef $ac_func
19009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019010/* Override any GCC internal prototype to avoid an error.
19011 Use char because int might match the return type of a GCC
19012 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019013#ifdef __cplusplus
19014extern "C"
19015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019016char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019017/* The GNU C library defines this for functions which it implements
19018 to always fail with ENOSYS. Some functions are actually named
19019 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019020#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019021choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019022#endif
19023
Skip Montanaro6dead952003-09-25 14:50:04 +000019024int
19025main ()
19026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019027return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019028 ;
19029 return 0;
19030}
19031_ACEOF
19032rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019033if { (ac_try="$ac_link"
19034case "(($ac_try" in
19035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19036 *) ac_try_echo=$ac_try;;
19037esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019038eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19039$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019040 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019042 grep -v '^ *+' conftest.er1 >conftest.err
19043 rm -f conftest.er1
19044 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019045 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019046 (exit $ac_status); } && {
19047 test -z "$ac_c_werror_flag" ||
19048 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000019049 } && test -s conftest$ac_exeext && {
19050 test "$cross_compiling" = yes ||
19051 $as_test_x conftest$ac_exeext
19052 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019053 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019054else
Benjamin Petersona8332062009-09-11 22:36:27 +000019055 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019056sed 's/^/| /' conftest.$ac_ext >&5
19057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019058 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019060
Benjamin Petersona8332062009-09-11 22:36:27 +000019061rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019063 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019064fi
Benjamin Petersona8332062009-09-11 22:36:27 +000019065ac_res=`eval 'as_val=${'$as_ac_var'}
19066 $as_echo "$as_val"'`
19067 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19068$as_echo "$ac_res" >&6; }
19069as_val=`eval 'as_val=${'$as_ac_var'}
19070 $as_echo "$as_val"'`
19071 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019072 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000019073#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019074_ACEOF
19075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019076/* confdefs.h. */
19077_ACEOF
19078cat confdefs.h >>conftest.$ac_ext
19079cat >>conftest.$ac_ext <<_ACEOF
19080/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019081#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019082int
19083main ()
19084{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019085getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019086 ;
19087 return 0;
19088}
19089_ACEOF
19090rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019091if { (ac_try="$ac_compile"
19092case "(($ac_try" in
19093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19094 *) ac_try_echo=$ac_try;;
19095esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019096eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19097$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019100 grep -v '^ *+' conftest.er1 >conftest.err
19101 rm -f conftest.er1
19102 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019103 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019104 (exit $ac_status); } && {
19105 test -z "$ac_c_werror_flag" ||
19106 test ! -s conftest.err
19107 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019108
19109cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019110#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019111_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019112
Martin v. Löwis11437992002-04-12 09:54:03 +000019113
Guido van Rossumf78abae1997-01-21 22:02:36 +000019114else
Benjamin Petersona8332062009-09-11 22:36:27 +000019115 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019116sed 's/^/| /' conftest.$ac_ext >&5
19117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019118
Guido van Rossum627b2d71993-12-24 10:39:16 +000019119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019120
19121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019122
Guido van Rossum627b2d71993-12-24 10:39:16 +000019123fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019124done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019125
Jack Jansen150753c2003-03-29 22:07:47 +000019126
19127for ac_func in setpgrp
19128do
Benjamin Petersona8332062009-09-11 22:36:27 +000019129as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19130{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19131$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019132if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000019133 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019134else
Martin v. Löwis11437992002-04-12 09:54:03 +000019135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019136/* confdefs.h. */
19137_ACEOF
19138cat confdefs.h >>conftest.$ac_ext
19139cat >>conftest.$ac_ext <<_ACEOF
19140/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019141/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19142 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19143#define $ac_func innocuous_$ac_func
19144
Jack Jansen150753c2003-03-29 22:07:47 +000019145/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019146 which can conflict with char $ac_func (); below.
19147 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019148 <limits.h> exists even on freestanding compilers. */
19149
19150#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019151# include <limits.h>
19152#else
19153# include <assert.h>
19154#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019155
19156#undef $ac_func
19157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019158/* Override any GCC internal prototype to avoid an error.
19159 Use char because int might match the return type of a GCC
19160 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019161#ifdef __cplusplus
19162extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019163#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019164char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019165/* The GNU C library defines this for functions which it implements
19166 to always fail with ENOSYS. Some functions are actually named
19167 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019168#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019169choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019170#endif
19171
Skip Montanaro6dead952003-09-25 14:50:04 +000019172int
19173main ()
19174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019175return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019176 ;
19177 return 0;
19178}
19179_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019180rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019181if { (ac_try="$ac_link"
19182case "(($ac_try" in
19183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19184 *) ac_try_echo=$ac_try;;
19185esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019186eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19187$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019188 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019190 grep -v '^ *+' conftest.er1 >conftest.err
19191 rm -f conftest.er1
19192 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019193 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019194 (exit $ac_status); } && {
19195 test -z "$ac_c_werror_flag" ||
19196 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000019197 } && test -s conftest$ac_exeext && {
19198 test "$cross_compiling" = yes ||
19199 $as_test_x conftest$ac_exeext
19200 }; then
Jack Jansen150753c2003-03-29 22:07:47 +000019201 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019202else
Benjamin Petersona8332062009-09-11 22:36:27 +000019203 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019204sed 's/^/| /' conftest.$ac_ext >&5
19205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019206 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019208
Benjamin Petersona8332062009-09-11 22:36:27 +000019209rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019210rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019211 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019212fi
Benjamin Petersona8332062009-09-11 22:36:27 +000019213ac_res=`eval 'as_val=${'$as_ac_var'}
19214 $as_echo "$as_val"'`
19215 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19216$as_echo "$ac_res" >&6; }
19217as_val=`eval 'as_val=${'$as_ac_var'}
19218 $as_echo "$as_val"'`
19219 if test "x$as_val" = x""yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019220 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000019221#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019222_ACEOF
19223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019224/* confdefs.h. */
19225_ACEOF
19226cat confdefs.h >>conftest.$ac_ext
19227cat >>conftest.$ac_ext <<_ACEOF
19228/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019229#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019230int
19231main ()
19232{
19233setpgrp(0,0);
19234 ;
19235 return 0;
19236}
19237_ACEOF
19238rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019239if { (ac_try="$ac_compile"
19240case "(($ac_try" in
19241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19242 *) ac_try_echo=$ac_try;;
19243esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019244eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19245$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019246 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019248 grep -v '^ *+' conftest.er1 >conftest.err
19249 rm -f conftest.er1
19250 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019251 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019252 (exit $ac_status); } && {
19253 test -z "$ac_c_werror_flag" ||
19254 test ! -s conftest.err
19255 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019256
19257cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019258#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019259_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019260
Jack Jansen150753c2003-03-29 22:07:47 +000019261
19262else
Benjamin Petersona8332062009-09-11 22:36:27 +000019263 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019264sed 's/^/| /' conftest.$ac_ext >&5
19265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019266
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019268
19269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019270
19271fi
19272done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019273
Martin v. Löwis11437992002-04-12 09:54:03 +000019274
Thomas Wouters3a584202000-08-05 23:28:51 +000019275for ac_func in gettimeofday
19276do
Benjamin Petersona8332062009-09-11 22:36:27 +000019277as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19278{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19279$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019280if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000019281 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019282else
Martin v. Löwis11437992002-04-12 09:54:03 +000019283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019284/* confdefs.h. */
19285_ACEOF
19286cat confdefs.h >>conftest.$ac_ext
19287cat >>conftest.$ac_ext <<_ACEOF
19288/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019289/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19290 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19291#define $ac_func innocuous_$ac_func
19292
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019293/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019294 which can conflict with char $ac_func (); below.
19295 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019296 <limits.h> exists even on freestanding compilers. */
19297
19298#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019299# include <limits.h>
19300#else
19301# include <assert.h>
19302#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019303
19304#undef $ac_func
19305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019306/* Override any GCC internal prototype to avoid an error.
19307 Use char because int might match the return type of a GCC
19308 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019309#ifdef __cplusplus
19310extern "C"
19311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019312char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019313/* The GNU C library defines this for functions which it implements
19314 to always fail with ENOSYS. Some functions are actually named
19315 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019316#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019317choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019318#endif
19319
Skip Montanaro6dead952003-09-25 14:50:04 +000019320int
19321main ()
19322{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019323return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 ;
19325 return 0;
19326}
19327_ACEOF
19328rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019329if { (ac_try="$ac_link"
19330case "(($ac_try" in
19331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19332 *) ac_try_echo=$ac_try;;
19333esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019334eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19335$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019336 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019338 grep -v '^ *+' conftest.er1 >conftest.err
19339 rm -f conftest.er1
19340 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019341 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019342 (exit $ac_status); } && {
19343 test -z "$ac_c_werror_flag" ||
19344 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000019345 } && test -s conftest$ac_exeext && {
19346 test "$cross_compiling" = yes ||
19347 $as_test_x conftest$ac_exeext
19348 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019349 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019350else
Benjamin Petersona8332062009-09-11 22:36:27 +000019351 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019352sed 's/^/| /' conftest.$ac_ext >&5
19353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019354 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019356
Benjamin Petersona8332062009-09-11 22:36:27 +000019357rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019359 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019360fi
Benjamin Petersona8332062009-09-11 22:36:27 +000019361ac_res=`eval 'as_val=${'$as_ac_var'}
19362 $as_echo "$as_val"'`
19363 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19364$as_echo "$ac_res" >&6; }
19365as_val=`eval 'as_val=${'$as_ac_var'}
19366 $as_echo "$as_val"'`
19367 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019368 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000019369#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019370_ACEOF
19371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019372/* confdefs.h. */
19373_ACEOF
19374cat confdefs.h >>conftest.$ac_ext
19375cat >>conftest.$ac_ext <<_ACEOF
19376/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019377#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019378int
19379main ()
19380{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019381gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019382 ;
19383 return 0;
19384}
19385_ACEOF
19386rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019387if { (ac_try="$ac_compile"
19388case "(($ac_try" in
19389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19390 *) ac_try_echo=$ac_try;;
19391esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019392eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19393$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019396 grep -v '^ *+' conftest.er1 >conftest.err
19397 rm -f conftest.er1
19398 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019399 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019400 (exit $ac_status); } && {
19401 test -z "$ac_c_werror_flag" ||
19402 test ! -s conftest.err
19403 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019404 :
19405else
Benjamin Petersona8332062009-09-11 22:36:27 +000019406 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019407sed 's/^/| /' conftest.$ac_ext >&5
19408
Martin v. Löwis11437992002-04-12 09:54:03 +000019409
19410cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019411#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019412_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019413
Martin v. Löwis11437992002-04-12 09:54:03 +000019414
Guido van Rossum627b2d71993-12-24 10:39:16 +000019415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019416
19417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019418
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019419fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019420done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019421
Michael W. Hudson54241132001-12-07 15:38:26 +000019422
Benjamin Petersona8332062009-09-11 22:36:27 +000019423{ $as_echo "$as_me:$LINENO: checking for major" >&5
19424$as_echo_n "checking for major... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019426/* confdefs.h. */
19427_ACEOF
19428cat confdefs.h >>conftest.$ac_ext
19429cat >>conftest.$ac_ext <<_ACEOF
19430/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019431
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019432#if defined(MAJOR_IN_MKDEV)
19433#include <sys/mkdev.h>
19434#elif defined(MAJOR_IN_SYSMACROS)
19435#include <sys/sysmacros.h>
19436#else
19437#include <sys/types.h>
19438#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019439
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019440int
19441main ()
19442{
19443
19444 makedev(major(0),minor(0));
19445
19446 ;
19447 return 0;
19448}
19449_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019450rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019451if { (ac_try="$ac_link"
19452case "(($ac_try" in
19453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19454 *) ac_try_echo=$ac_try;;
19455esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019456eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19457$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019458 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019460 grep -v '^ *+' conftest.er1 >conftest.err
19461 rm -f conftest.er1
19462 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019463 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019464 (exit $ac_status); } && {
19465 test -z "$ac_c_werror_flag" ||
19466 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000019467 } && test -s conftest$ac_exeext && {
19468 test "$cross_compiling" = yes ||
19469 $as_test_x conftest$ac_exeext
19470 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019471
19472
19473cat >>confdefs.h <<\_ACEOF
19474#define HAVE_DEVICE_MACROS 1
19475_ACEOF
19476
Benjamin Petersona8332062009-09-11 22:36:27 +000019477 { $as_echo "$as_me:$LINENO: result: yes" >&5
19478$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019479
19480else
Benjamin Petersona8332062009-09-11 22:36:27 +000019481 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019482sed 's/^/| /' conftest.$ac_ext >&5
19483
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019484
Benjamin Petersona8332062009-09-11 22:36:27 +000019485 { $as_echo "$as_me:$LINENO: result: no" >&5
19486$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019487
19488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019489
Benjamin Petersona8332062009-09-11 22:36:27 +000019490rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019491rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019492 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019493
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019494# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019495# for [no]getaddrinfo in netdb.h.
Benjamin Petersona8332062009-09-11 22:36:27 +000019496{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19497$as_echo_n "checking for getaddrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019498cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019499/* confdefs.h. */
19500_ACEOF
19501cat confdefs.h >>conftest.$ac_ext
19502cat >>conftest.$ac_ext <<_ACEOF
19503/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019504
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019505#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019506#include <sys/socket.h>
19507#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019508#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019509
Martin v. Löwis11437992002-04-12 09:54:03 +000019510int
19511main ()
19512{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019513
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019514getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019515
Martin v. Löwis11437992002-04-12 09:54:03 +000019516 ;
19517 return 0;
19518}
19519_ACEOF
19520rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019521if { (ac_try="$ac_link"
19522case "(($ac_try" in
19523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19524 *) ac_try_echo=$ac_try;;
19525esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019526eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19527$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019530 grep -v '^ *+' conftest.er1 >conftest.err
19531 rm -f conftest.er1
19532 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019533 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019534 (exit $ac_status); } && {
19535 test -z "$ac_c_werror_flag" ||
19536 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000019537 } && test -s conftest$ac_exeext && {
19538 test "$cross_compiling" = yes ||
19539 $as_test_x conftest$ac_exeext
19540 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019541
Benjamin Petersona8332062009-09-11 22:36:27 +000019542{ $as_echo "$as_me:$LINENO: result: yes" >&5
19543$as_echo "yes" >&6; }
19544{ $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19545$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019546if test "$cross_compiling" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000019547 { $as_echo "$as_me:$LINENO: result: buggy" >&5
19548$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019549buggygetaddrinfo=yes
19550else
Martin v. Löwis11437992002-04-12 09:54:03 +000019551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019552/* confdefs.h. */
19553_ACEOF
19554cat confdefs.h >>conftest.$ac_ext
19555cat >>conftest.$ac_ext <<_ACEOF
19556/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019557
19558#include <sys/types.h>
19559#include <netdb.h>
19560#include <string.h>
19561#include <sys/socket.h>
19562#include <netinet/in.h>
19563
19564main()
19565{
19566 int passive, gaierr, inet4 = 0, inet6 = 0;
19567 struct addrinfo hints, *ai, *aitop;
19568 char straddr[INET6_ADDRSTRLEN], strport[16];
19569
19570 for (passive = 0; passive <= 1; passive++) {
19571 memset(&hints, 0, sizeof(hints));
19572 hints.ai_family = AF_UNSPEC;
19573 hints.ai_flags = passive ? AI_PASSIVE : 0;
19574 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019575 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019576 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19577 (void)gai_strerror(gaierr);
19578 goto bad;
19579 }
19580 for (ai = aitop; ai; ai = ai->ai_next) {
19581 if (ai->ai_addr == NULL ||
19582 ai->ai_addrlen == 0 ||
19583 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19584 straddr, sizeof(straddr), strport, sizeof(strport),
19585 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19586 goto bad;
19587 }
19588 switch (ai->ai_family) {
19589 case AF_INET:
19590 if (strcmp(strport, "54321") != 0) {
19591 goto bad;
19592 }
19593 if (passive) {
19594 if (strcmp(straddr, "0.0.0.0") != 0) {
19595 goto bad;
19596 }
19597 } else {
19598 if (strcmp(straddr, "127.0.0.1") != 0) {
19599 goto bad;
19600 }
19601 }
19602 inet4++;
19603 break;
19604 case AF_INET6:
19605 if (strcmp(strport, "54321") != 0) {
19606 goto bad;
19607 }
19608 if (passive) {
19609 if (strcmp(straddr, "::") != 0) {
19610 goto bad;
19611 }
19612 } else {
19613 if (strcmp(straddr, "::1") != 0) {
19614 goto bad;
19615 }
19616 }
19617 inet6++;
19618 break;
19619 case AF_UNSPEC:
19620 goto bad;
19621 break;
19622 default:
19623 /* another family support? */
19624 break;
19625 }
19626 }
19627 }
19628
19629 if (!(inet4 == 0 || inet4 == 2))
19630 goto bad;
19631 if (!(inet6 == 0 || inet6 == 2))
19632 goto bad;
19633
19634 if (aitop)
19635 freeaddrinfo(aitop);
19636 exit(0);
19637
19638 bad:
19639 if (aitop)
19640 freeaddrinfo(aitop);
19641 exit(1);
19642}
19643
Martin v. Löwis11437992002-04-12 09:54:03 +000019644_ACEOF
19645rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019646if { (ac_try="$ac_link"
19647case "(($ac_try" in
19648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19649 *) ac_try_echo=$ac_try;;
19650esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019651eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19652$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019653 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019654 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000019655 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019656 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019657 { (case "(($ac_try" in
19658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19659 *) ac_try_echo=$ac_try;;
19660esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019661eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19662$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019663 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019664 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000019665 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019666 (exit $ac_status); }; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000019667 { $as_echo "$as_me:$LINENO: result: good" >&5
19668$as_echo "good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019669buggygetaddrinfo=no
19670else
Benjamin Petersona8332062009-09-11 22:36:27 +000019671 $as_echo "$as_me: program exited with status $ac_status" >&5
19672$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019673sed 's/^/| /' conftest.$ac_ext >&5
19674
Martin v. Löwis11437992002-04-12 09:54:03 +000019675( exit $ac_status )
Benjamin Petersona8332062009-09-11 22:36:27 +000019676{ $as_echo "$as_me:$LINENO: result: buggy" >&5
19677$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019678buggygetaddrinfo=yes
19679fi
Benjamin Petersona8332062009-09-11 22:36:27 +000019680rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019681rm -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 +000019682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019683
19684
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019685else
Benjamin Petersona8332062009-09-11 22:36:27 +000019686 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019687sed 's/^/| /' conftest.$ac_ext >&5
19688
Martin v. Löwis11437992002-04-12 09:54:03 +000019689
Benjamin Petersona8332062009-09-11 22:36:27 +000019690{ $as_echo "$as_me:$LINENO: result: no" >&5
19691$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019692buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019693
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019695
Benjamin Petersona8332062009-09-11 22:36:27 +000019696rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019697rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019698 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019699
19700if test "$buggygetaddrinfo" = "yes"; then
19701 if test "$ipv6" = "yes"; then
19702 echo 'Fatal: You must get working getaddrinfo() function.'
19703 echo ' or you can specify "--disable-ipv6"'.
19704 exit 1
19705 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019706else
Martin v. Löwis11437992002-04-12 09:54:03 +000019707
19708cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019709#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019710_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019711
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019712fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019713
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019714for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019715do
Benjamin Petersona8332062009-09-11 22:36:27 +000019716as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19717{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19718$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019719if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000019720 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019721else
Martin v. Löwis11437992002-04-12 09:54:03 +000019722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019723/* confdefs.h. */
19724_ACEOF
19725cat confdefs.h >>conftest.$ac_ext
19726cat >>conftest.$ac_ext <<_ACEOF
19727/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019728/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19729 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19730#define $ac_func innocuous_$ac_func
19731
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019732/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019733 which can conflict with char $ac_func (); below.
19734 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019735 <limits.h> exists even on freestanding compilers. */
19736
19737#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019738# include <limits.h>
19739#else
19740# include <assert.h>
19741#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019742
19743#undef $ac_func
19744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019745/* Override any GCC internal prototype to avoid an error.
19746 Use char because int might match the return type of a GCC
19747 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019748#ifdef __cplusplus
19749extern "C"
19750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019751char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019752/* The GNU C library defines this for functions which it implements
19753 to always fail with ENOSYS. Some functions are actually named
19754 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019755#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019756choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019757#endif
19758
Skip Montanaro6dead952003-09-25 14:50:04 +000019759int
19760main ()
19761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019762return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019763 ;
19764 return 0;
19765}
19766_ACEOF
19767rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019768if { (ac_try="$ac_link"
19769case "(($ac_try" in
19770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19771 *) ac_try_echo=$ac_try;;
19772esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019773eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19774$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019775 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019777 grep -v '^ *+' conftest.er1 >conftest.err
19778 rm -f conftest.er1
19779 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019780 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019781 (exit $ac_status); } && {
19782 test -z "$ac_c_werror_flag" ||
19783 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000019784 } && test -s conftest$ac_exeext && {
19785 test "$cross_compiling" = yes ||
19786 $as_test_x conftest$ac_exeext
19787 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019788 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019789else
Benjamin Petersona8332062009-09-11 22:36:27 +000019790 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019791sed 's/^/| /' conftest.$ac_ext >&5
19792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019793 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019795
Benjamin Petersona8332062009-09-11 22:36:27 +000019796rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019798 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019799fi
Benjamin Petersona8332062009-09-11 22:36:27 +000019800ac_res=`eval 'as_val=${'$as_ac_var'}
19801 $as_echo "$as_val"'`
19802 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19803$as_echo "$ac_res" >&6; }
19804as_val=`eval 'as_val=${'$as_ac_var'}
19805 $as_echo "$as_val"'`
19806 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019807 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000019808#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019809_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019810
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019811fi
19812done
19813
Michael W. Hudson54241132001-12-07 15:38:26 +000019814
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019815# checks for structures
Benjamin Petersona8332062009-09-11 22:36:27 +000019816{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19817$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 +000019818if test "${ac_cv_header_time+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000019819 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019820else
Martin v. Löwis11437992002-04-12 09:54:03 +000019821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019822/* confdefs.h. */
19823_ACEOF
19824cat confdefs.h >>conftest.$ac_ext
19825cat >>conftest.$ac_ext <<_ACEOF
19826/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019827#include <sys/types.h>
19828#include <sys/time.h>
19829#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019830
Martin v. Löwis11437992002-04-12 09:54:03 +000019831int
19832main ()
19833{
19834if ((struct tm *) 0)
19835return 0;
19836 ;
19837 return 0;
19838}
19839_ACEOF
19840rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019841if { (ac_try="$ac_compile"
19842case "(($ac_try" in
19843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19844 *) ac_try_echo=$ac_try;;
19845esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019846eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19847$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019850 grep -v '^ *+' conftest.er1 >conftest.err
19851 rm -f conftest.er1
19852 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019853 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019854 (exit $ac_status); } && {
19855 test -z "$ac_c_werror_flag" ||
19856 test ! -s conftest.err
19857 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019858 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019859else
Benjamin Petersona8332062009-09-11 22:36:27 +000019860 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019861sed 's/^/| /' conftest.$ac_ext >&5
19862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019863 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019865
19866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019867fi
Benjamin Petersona8332062009-09-11 22:36:27 +000019868{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19869$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019870if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019871
19872cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019873#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019874_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019875
19876fi
19877
Benjamin Petersona8332062009-09-11 22:36:27 +000019878{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19879$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 +000019880if test "${ac_cv_struct_tm+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000019881 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019882else
Martin v. Löwis11437992002-04-12 09:54:03 +000019883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019884/* confdefs.h. */
19885_ACEOF
19886cat confdefs.h >>conftest.$ac_ext
19887cat >>conftest.$ac_ext <<_ACEOF
19888/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019889#include <sys/types.h>
19890#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019891
Martin v. Löwis11437992002-04-12 09:54:03 +000019892int
19893main ()
19894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019895struct tm tm;
19896 int *p = &tm.tm_sec;
Benjamin Petersona8332062009-09-11 22:36:27 +000019897 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019898 ;
19899 return 0;
19900}
19901_ACEOF
19902rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019903if { (ac_try="$ac_compile"
19904case "(($ac_try" in
19905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19906 *) ac_try_echo=$ac_try;;
19907esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019908eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19909$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019912 grep -v '^ *+' conftest.er1 >conftest.err
19913 rm -f conftest.er1
19914 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019915 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019916 (exit $ac_status); } && {
19917 test -z "$ac_c_werror_flag" ||
19918 test ! -s conftest.err
19919 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019920 ac_cv_struct_tm=time.h
19921else
Benjamin Petersona8332062009-09-11 22:36:27 +000019922 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019923sed 's/^/| /' conftest.$ac_ext >&5
19924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019925 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019927
19928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019929fi
Benjamin Petersona8332062009-09-11 22:36:27 +000019930{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19931$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019932if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019933
19934cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019935#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019936_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019937
19938fi
19939
Benjamin Petersona8332062009-09-11 22:36:27 +000019940{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19941$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019942if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000019943 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019944else
Martin v. Löwis11437992002-04-12 09:54:03 +000019945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019946/* confdefs.h. */
19947_ACEOF
19948cat confdefs.h >>conftest.$ac_ext
19949cat >>conftest.$ac_ext <<_ACEOF
19950/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019951#include <sys/types.h>
19952#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019953
19954
Martin v. Löwis11437992002-04-12 09:54:03 +000019955int
19956main ()
19957{
19958static struct tm ac_aggr;
19959if (ac_aggr.tm_zone)
19960return 0;
19961 ;
19962 return 0;
19963}
19964_ACEOF
19965rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019966if { (ac_try="$ac_compile"
19967case "(($ac_try" in
19968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19969 *) ac_try_echo=$ac_try;;
19970esac
Benjamin Petersona8332062009-09-11 22:36:27 +000019971eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19972$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019975 grep -v '^ *+' conftest.er1 >conftest.err
19976 rm -f conftest.er1
19977 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000019978 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019979 (exit $ac_status); } && {
19980 test -z "$ac_c_werror_flag" ||
19981 test ! -s conftest.err
19982 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019983 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019984else
Benjamin Petersona8332062009-09-11 22:36:27 +000019985 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019986sed 's/^/| /' conftest.$ac_ext >&5
19987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019989/* confdefs.h. */
19990_ACEOF
19991cat confdefs.h >>conftest.$ac_ext
19992cat >>conftest.$ac_ext <<_ACEOF
19993/* end confdefs.h. */
19994#include <sys/types.h>
19995#include <$ac_cv_struct_tm>
19996
19997
19998int
19999main ()
20000{
20001static struct tm ac_aggr;
20002if (sizeof ac_aggr.tm_zone)
20003return 0;
20004 ;
20005 return 0;
20006}
20007_ACEOF
20008rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020009if { (ac_try="$ac_compile"
20010case "(($ac_try" in
20011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20012 *) ac_try_echo=$ac_try;;
20013esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020014eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20015$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020016 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020018 grep -v '^ *+' conftest.er1 >conftest.err
20019 rm -f conftest.er1
20020 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020021 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020022 (exit $ac_status); } && {
20023 test -z "$ac_c_werror_flag" ||
20024 test ! -s conftest.err
20025 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020026 ac_cv_member_struct_tm_tm_zone=yes
20027else
Benjamin Petersona8332062009-09-11 22:36:27 +000020028 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020029sed 's/^/| /' conftest.$ac_ext >&5
20030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020031 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020033
20034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020036
20037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020038fi
Benjamin Petersona8332062009-09-11 22:36:27 +000020039{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20040$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
20041if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020042
20043cat >>confdefs.h <<_ACEOF
20044#define HAVE_STRUCT_TM_TM_ZONE 1
20045_ACEOF
20046
20047
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020048fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020049
Martin v. Löwis11437992002-04-12 09:54:03 +000020050if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20051
20052cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020053#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020054_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020055
20056else
Benjamin Petersona8332062009-09-11 22:36:27 +000020057 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20058$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020059if test "${ac_cv_have_decl_tzname+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000020060 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020061else
20062 cat >conftest.$ac_ext <<_ACEOF
20063/* confdefs.h. */
20064_ACEOF
20065cat confdefs.h >>conftest.$ac_ext
20066cat >>conftest.$ac_ext <<_ACEOF
20067/* end confdefs.h. */
20068#include <time.h>
20069
20070int
20071main ()
20072{
20073#ifndef tzname
20074 (void) tzname;
20075#endif
20076
20077 ;
20078 return 0;
20079}
20080_ACEOF
20081rm -f conftest.$ac_objext
20082if { (ac_try="$ac_compile"
20083case "(($ac_try" in
20084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20085 *) ac_try_echo=$ac_try;;
20086esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020087eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20088$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020089 (eval "$ac_compile") 2>conftest.er1
20090 ac_status=$?
20091 grep -v '^ *+' conftest.er1 >conftest.err
20092 rm -f conftest.er1
20093 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020094 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020095 (exit $ac_status); } && {
20096 test -z "$ac_c_werror_flag" ||
20097 test ! -s conftest.err
20098 } && test -s conftest.$ac_objext; then
20099 ac_cv_have_decl_tzname=yes
20100else
Benjamin Petersona8332062009-09-11 22:36:27 +000020101 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020102sed 's/^/| /' conftest.$ac_ext >&5
20103
20104 ac_cv_have_decl_tzname=no
20105fi
20106
20107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20108fi
Benjamin Petersona8332062009-09-11 22:36:27 +000020109{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20110$as_echo "$ac_cv_have_decl_tzname" >&6; }
20111if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020112
20113cat >>confdefs.h <<_ACEOF
20114#define HAVE_DECL_TZNAME 1
20115_ACEOF
20116
20117
20118else
20119 cat >>confdefs.h <<_ACEOF
20120#define HAVE_DECL_TZNAME 0
20121_ACEOF
20122
20123
20124fi
20125
20126
Benjamin Petersona8332062009-09-11 22:36:27 +000020127 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
20128$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020129if test "${ac_cv_var_tzname+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000020130 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020131else
Martin v. Löwis11437992002-04-12 09:54:03 +000020132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020133/* confdefs.h. */
20134_ACEOF
20135cat confdefs.h >>conftest.$ac_ext
20136cat >>conftest.$ac_ext <<_ACEOF
20137/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020138#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020139#if !HAVE_DECL_TZNAME
20140extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020142
Martin v. Löwis11437992002-04-12 09:54:03 +000020143int
20144main ()
20145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020146return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020147 ;
20148 return 0;
20149}
20150_ACEOF
20151rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020152if { (ac_try="$ac_link"
20153case "(($ac_try" in
20154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20155 *) ac_try_echo=$ac_try;;
20156esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020157eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20158$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020159 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020161 grep -v '^ *+' conftest.er1 >conftest.err
20162 rm -f conftest.er1
20163 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020164 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020165 (exit $ac_status); } && {
20166 test -z "$ac_c_werror_flag" ||
20167 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000020168 } && test -s conftest$ac_exeext && {
20169 test "$cross_compiling" = yes ||
20170 $as_test_x conftest$ac_exeext
20171 }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020172 ac_cv_var_tzname=yes
20173else
Benjamin Petersona8332062009-09-11 22:36:27 +000020174 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020175sed 's/^/| /' conftest.$ac_ext >&5
20176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020177 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020179
Benjamin Petersona8332062009-09-11 22:36:27 +000020180rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020181rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020182 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020183fi
Benjamin Petersona8332062009-09-11 22:36:27 +000020184{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20185$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020186 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020187
20188cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020189#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020190_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020191
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020192 fi
20193fi
20194
Benjamin Petersona8332062009-09-11 22:36:27 +000020195{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20196$as_echo_n "checking for struct stat.st_rdev... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020197if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000020198 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020199else
20200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020201/* confdefs.h. */
20202_ACEOF
20203cat confdefs.h >>conftest.$ac_ext
20204cat >>conftest.$ac_ext <<_ACEOF
20205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020206$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020207int
20208main ()
20209{
20210static struct stat ac_aggr;
20211if (ac_aggr.st_rdev)
20212return 0;
20213 ;
20214 return 0;
20215}
20216_ACEOF
20217rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020218if { (ac_try="$ac_compile"
20219case "(($ac_try" in
20220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20221 *) ac_try_echo=$ac_try;;
20222esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020223eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20224$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020227 grep -v '^ *+' conftest.er1 >conftest.err
20228 rm -f conftest.er1
20229 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020230 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020231 (exit $ac_status); } && {
20232 test -z "$ac_c_werror_flag" ||
20233 test ! -s conftest.err
20234 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020235 ac_cv_member_struct_stat_st_rdev=yes
20236else
Benjamin Petersona8332062009-09-11 22:36:27 +000020237 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020238sed 's/^/| /' conftest.$ac_ext >&5
20239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020241/* confdefs.h. */
20242_ACEOF
20243cat confdefs.h >>conftest.$ac_ext
20244cat >>conftest.$ac_ext <<_ACEOF
20245/* end confdefs.h. */
20246$ac_includes_default
20247int
20248main ()
20249{
20250static struct stat ac_aggr;
20251if (sizeof ac_aggr.st_rdev)
20252return 0;
20253 ;
20254 return 0;
20255}
20256_ACEOF
20257rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020258if { (ac_try="$ac_compile"
20259case "(($ac_try" in
20260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20261 *) ac_try_echo=$ac_try;;
20262esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020263eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20264$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020265 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020267 grep -v '^ *+' conftest.er1 >conftest.err
20268 rm -f conftest.er1
20269 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020270 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020271 (exit $ac_status); } && {
20272 test -z "$ac_c_werror_flag" ||
20273 test ! -s conftest.err
20274 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020275 ac_cv_member_struct_stat_st_rdev=yes
20276else
Benjamin Petersona8332062009-09-11 22:36:27 +000020277 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020278sed 's/^/| /' conftest.$ac_ext >&5
20279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020280 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020282
20283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020285
20286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020287fi
Benjamin Petersona8332062009-09-11 22:36:27 +000020288{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20289$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
20290if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020291
20292cat >>confdefs.h <<_ACEOF
20293#define HAVE_STRUCT_STAT_ST_RDEV 1
20294_ACEOF
20295
20296
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020297fi
20298
Benjamin Petersona8332062009-09-11 22:36:27 +000020299{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20300$as_echo_n "checking for struct stat.st_blksize... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020301if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000020302 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020303else
Martin v. Löwis11437992002-04-12 09:54:03 +000020304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020305/* confdefs.h. */
20306_ACEOF
20307cat confdefs.h >>conftest.$ac_ext
20308cat >>conftest.$ac_ext <<_ACEOF
20309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020310$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020311int
20312main ()
20313{
20314static struct stat ac_aggr;
20315if (ac_aggr.st_blksize)
20316return 0;
20317 ;
20318 return 0;
20319}
20320_ACEOF
20321rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020322if { (ac_try="$ac_compile"
20323case "(($ac_try" in
20324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20325 *) ac_try_echo=$ac_try;;
20326esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020327eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20328$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020331 grep -v '^ *+' conftest.er1 >conftest.err
20332 rm -f conftest.er1
20333 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020334 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020335 (exit $ac_status); } && {
20336 test -z "$ac_c_werror_flag" ||
20337 test ! -s conftest.err
20338 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020339 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020340else
Benjamin Petersona8332062009-09-11 22:36:27 +000020341 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020342sed 's/^/| /' conftest.$ac_ext >&5
20343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020345/* confdefs.h. */
20346_ACEOF
20347cat confdefs.h >>conftest.$ac_ext
20348cat >>conftest.$ac_ext <<_ACEOF
20349/* end confdefs.h. */
20350$ac_includes_default
20351int
20352main ()
20353{
20354static struct stat ac_aggr;
20355if (sizeof ac_aggr.st_blksize)
20356return 0;
20357 ;
20358 return 0;
20359}
20360_ACEOF
20361rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020362if { (ac_try="$ac_compile"
20363case "(($ac_try" in
20364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20365 *) ac_try_echo=$ac_try;;
20366esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020367eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20368$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020369 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020371 grep -v '^ *+' conftest.er1 >conftest.err
20372 rm -f conftest.er1
20373 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020374 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020375 (exit $ac_status); } && {
20376 test -z "$ac_c_werror_flag" ||
20377 test ! -s conftest.err
20378 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020379 ac_cv_member_struct_stat_st_blksize=yes
20380else
Benjamin Petersona8332062009-09-11 22:36:27 +000020381 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020382sed 's/^/| /' conftest.$ac_ext >&5
20383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020384 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020386
20387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020389
20390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020391fi
Benjamin Petersona8332062009-09-11 22:36:27 +000020392{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20393$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; }
20394if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020395
Martin v. Löwis11437992002-04-12 09:54:03 +000020396cat >>confdefs.h <<_ACEOF
20397#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20398_ACEOF
20399
20400
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020401fi
20402
Benjamin Petersona8332062009-09-11 22:36:27 +000020403{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20404$as_echo_n "checking for struct stat.st_flags... " >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020405if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000020406 $as_echo_n "(cached) " >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020407else
20408 cat >conftest.$ac_ext <<_ACEOF
20409/* confdefs.h. */
20410_ACEOF
20411cat confdefs.h >>conftest.$ac_ext
20412cat >>conftest.$ac_ext <<_ACEOF
20413/* end confdefs.h. */
20414$ac_includes_default
20415int
20416main ()
20417{
20418static struct stat ac_aggr;
20419if (ac_aggr.st_flags)
20420return 0;
20421 ;
20422 return 0;
20423}
20424_ACEOF
20425rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020426if { (ac_try="$ac_compile"
20427case "(($ac_try" in
20428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20429 *) ac_try_echo=$ac_try;;
20430esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020431eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20432$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020433 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020434 ac_status=$?
20435 grep -v '^ *+' conftest.er1 >conftest.err
20436 rm -f conftest.er1
20437 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020438 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020439 (exit $ac_status); } && {
20440 test -z "$ac_c_werror_flag" ||
20441 test ! -s conftest.err
20442 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020443 ac_cv_member_struct_stat_st_flags=yes
20444else
Benjamin Petersona8332062009-09-11 22:36:27 +000020445 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020446sed 's/^/| /' conftest.$ac_ext >&5
20447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020448 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020449/* confdefs.h. */
20450_ACEOF
20451cat confdefs.h >>conftest.$ac_ext
20452cat >>conftest.$ac_ext <<_ACEOF
20453/* end confdefs.h. */
20454$ac_includes_default
20455int
20456main ()
20457{
20458static struct stat ac_aggr;
20459if (sizeof ac_aggr.st_flags)
20460return 0;
20461 ;
20462 return 0;
20463}
20464_ACEOF
20465rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020466if { (ac_try="$ac_compile"
20467case "(($ac_try" in
20468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20469 *) ac_try_echo=$ac_try;;
20470esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020471eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20472$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020473 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020474 ac_status=$?
20475 grep -v '^ *+' conftest.er1 >conftest.err
20476 rm -f conftest.er1
20477 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020478 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020479 (exit $ac_status); } && {
20480 test -z "$ac_c_werror_flag" ||
20481 test ! -s conftest.err
20482 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020483 ac_cv_member_struct_stat_st_flags=yes
20484else
Benjamin Petersona8332062009-09-11 22:36:27 +000020485 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020486sed 's/^/| /' conftest.$ac_ext >&5
20487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020488 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020490
20491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020493
20494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020495fi
Benjamin Petersona8332062009-09-11 22:36:27 +000020496{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20497$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; }
20498if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020499
20500cat >>confdefs.h <<_ACEOF
20501#define HAVE_STRUCT_STAT_ST_FLAGS 1
20502_ACEOF
20503
20504
20505fi
20506
Benjamin Petersona8332062009-09-11 22:36:27 +000020507{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20508$as_echo_n "checking for struct stat.st_gen... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020509if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000020510 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020511else
20512 cat >conftest.$ac_ext <<_ACEOF
20513/* confdefs.h. */
20514_ACEOF
20515cat confdefs.h >>conftest.$ac_ext
20516cat >>conftest.$ac_ext <<_ACEOF
20517/* end confdefs.h. */
20518$ac_includes_default
20519int
20520main ()
20521{
20522static struct stat ac_aggr;
20523if (ac_aggr.st_gen)
20524return 0;
20525 ;
20526 return 0;
20527}
20528_ACEOF
20529rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020530if { (ac_try="$ac_compile"
20531case "(($ac_try" in
20532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20533 *) ac_try_echo=$ac_try;;
20534esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020535eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20536$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020538 ac_status=$?
20539 grep -v '^ *+' conftest.er1 >conftest.err
20540 rm -f conftest.er1
20541 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020542 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020543 (exit $ac_status); } && {
20544 test -z "$ac_c_werror_flag" ||
20545 test ! -s conftest.err
20546 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020547 ac_cv_member_struct_stat_st_gen=yes
20548else
Benjamin Petersona8332062009-09-11 22:36:27 +000020549 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020550sed 's/^/| /' conftest.$ac_ext >&5
20551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020552 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020553/* confdefs.h. */
20554_ACEOF
20555cat confdefs.h >>conftest.$ac_ext
20556cat >>conftest.$ac_ext <<_ACEOF
20557/* end confdefs.h. */
20558$ac_includes_default
20559int
20560main ()
20561{
20562static struct stat ac_aggr;
20563if (sizeof ac_aggr.st_gen)
20564return 0;
20565 ;
20566 return 0;
20567}
20568_ACEOF
20569rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020570if { (ac_try="$ac_compile"
20571case "(($ac_try" in
20572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20573 *) ac_try_echo=$ac_try;;
20574esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020575eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20576$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020578 ac_status=$?
20579 grep -v '^ *+' conftest.er1 >conftest.err
20580 rm -f conftest.er1
20581 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020582 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020583 (exit $ac_status); } && {
20584 test -z "$ac_c_werror_flag" ||
20585 test ! -s conftest.err
20586 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020587 ac_cv_member_struct_stat_st_gen=yes
20588else
Benjamin Petersona8332062009-09-11 22:36:27 +000020589 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020590sed 's/^/| /' conftest.$ac_ext >&5
20591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020592 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020594
20595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020597
20598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020599fi
Benjamin Petersona8332062009-09-11 22:36:27 +000020600{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20601$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; }
20602if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020603
20604cat >>confdefs.h <<_ACEOF
20605#define HAVE_STRUCT_STAT_ST_GEN 1
20606_ACEOF
20607
20608
20609fi
20610
Benjamin Petersona8332062009-09-11 22:36:27 +000020611{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20612$as_echo_n "checking for struct stat.st_birthtime... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020613if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000020614 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020615else
20616 cat >conftest.$ac_ext <<_ACEOF
20617/* confdefs.h. */
20618_ACEOF
20619cat confdefs.h >>conftest.$ac_ext
20620cat >>conftest.$ac_ext <<_ACEOF
20621/* end confdefs.h. */
20622$ac_includes_default
20623int
20624main ()
20625{
20626static struct stat ac_aggr;
20627if (ac_aggr.st_birthtime)
20628return 0;
20629 ;
20630 return 0;
20631}
20632_ACEOF
20633rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020634if { (ac_try="$ac_compile"
20635case "(($ac_try" in
20636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20637 *) ac_try_echo=$ac_try;;
20638esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020639eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20640$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020642 ac_status=$?
20643 grep -v '^ *+' conftest.er1 >conftest.err
20644 rm -f conftest.er1
20645 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020646 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020647 (exit $ac_status); } && {
20648 test -z "$ac_c_werror_flag" ||
20649 test ! -s conftest.err
20650 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020651 ac_cv_member_struct_stat_st_birthtime=yes
20652else
Benjamin Petersona8332062009-09-11 22:36:27 +000020653 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020654sed 's/^/| /' conftest.$ac_ext >&5
20655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020656 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020657/* confdefs.h. */
20658_ACEOF
20659cat confdefs.h >>conftest.$ac_ext
20660cat >>conftest.$ac_ext <<_ACEOF
20661/* end confdefs.h. */
20662$ac_includes_default
20663int
20664main ()
20665{
20666static struct stat ac_aggr;
20667if (sizeof ac_aggr.st_birthtime)
20668return 0;
20669 ;
20670 return 0;
20671}
20672_ACEOF
20673rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020674if { (ac_try="$ac_compile"
20675case "(($ac_try" in
20676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20677 *) ac_try_echo=$ac_try;;
20678esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020679eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20680$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020682 ac_status=$?
20683 grep -v '^ *+' conftest.er1 >conftest.err
20684 rm -f conftest.er1
20685 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020686 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020687 (exit $ac_status); } && {
20688 test -z "$ac_c_werror_flag" ||
20689 test ! -s conftest.err
20690 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020691 ac_cv_member_struct_stat_st_birthtime=yes
20692else
Benjamin Petersona8332062009-09-11 22:36:27 +000020693 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020694sed 's/^/| /' conftest.$ac_ext >&5
20695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020696 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020698
20699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020701
20702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020703fi
Benjamin Petersona8332062009-09-11 22:36:27 +000020704{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20705$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; }
20706if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020707
20708cat >>confdefs.h <<_ACEOF
20709#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20710_ACEOF
20711
20712
20713fi
20714
Benjamin Petersona8332062009-09-11 22:36:27 +000020715{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20716$as_echo_n "checking for struct stat.st_blocks... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020717if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000020718 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020719else
Martin v. Löwis11437992002-04-12 09:54:03 +000020720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020721/* confdefs.h. */
20722_ACEOF
20723cat confdefs.h >>conftest.$ac_ext
20724cat >>conftest.$ac_ext <<_ACEOF
20725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020726$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020727int
20728main ()
20729{
20730static struct stat ac_aggr;
20731if (ac_aggr.st_blocks)
20732return 0;
20733 ;
20734 return 0;
20735}
20736_ACEOF
20737rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020738if { (ac_try="$ac_compile"
20739case "(($ac_try" in
20740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20741 *) ac_try_echo=$ac_try;;
20742esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020743eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20744$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020747 grep -v '^ *+' conftest.er1 >conftest.err
20748 rm -f conftest.er1
20749 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020750 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020751 (exit $ac_status); } && {
20752 test -z "$ac_c_werror_flag" ||
20753 test ! -s conftest.err
20754 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020755 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020756else
Benjamin Petersona8332062009-09-11 22:36:27 +000020757 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020758sed 's/^/| /' conftest.$ac_ext >&5
20759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020761/* confdefs.h. */
20762_ACEOF
20763cat confdefs.h >>conftest.$ac_ext
20764cat >>conftest.$ac_ext <<_ACEOF
20765/* end confdefs.h. */
20766$ac_includes_default
20767int
20768main ()
20769{
20770static struct stat ac_aggr;
20771if (sizeof ac_aggr.st_blocks)
20772return 0;
20773 ;
20774 return 0;
20775}
20776_ACEOF
20777rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020778if { (ac_try="$ac_compile"
20779case "(($ac_try" in
20780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20781 *) ac_try_echo=$ac_try;;
20782esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020783eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20784$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020785 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020787 grep -v '^ *+' conftest.er1 >conftest.err
20788 rm -f conftest.er1
20789 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020790 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020791 (exit $ac_status); } && {
20792 test -z "$ac_c_werror_flag" ||
20793 test ! -s conftest.err
20794 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020795 ac_cv_member_struct_stat_st_blocks=yes
20796else
Benjamin Petersona8332062009-09-11 22:36:27 +000020797 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020798sed 's/^/| /' conftest.$ac_ext >&5
20799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020800 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020802
20803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020805
20806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020807fi
Benjamin Petersona8332062009-09-11 22:36:27 +000020808{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20809$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; }
20810if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020811
Martin v. Löwis11437992002-04-12 09:54:03 +000020812cat >>confdefs.h <<_ACEOF
20813#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20814_ACEOF
20815
20816
20817cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020818#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020819_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020820
20821else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020822 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020823 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020824 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20825 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020826esac
20827
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020828fi
20829
Michael W. Hudson54241132001-12-07 15:38:26 +000020830
Martin v. Löwis11437992002-04-12 09:54:03 +000020831
Benjamin Petersona8332062009-09-11 22:36:27 +000020832{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20833$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020834if test "${ac_cv_header_time_altzone+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000020835 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020836else
Martin v. Löwis11437992002-04-12 09:54:03 +000020837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020838/* confdefs.h. */
20839_ACEOF
20840cat confdefs.h >>conftest.$ac_ext
20841cat >>conftest.$ac_ext <<_ACEOF
20842/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020843#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020844int
20845main ()
20846{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020847return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 ;
20849 return 0;
20850}
20851_ACEOF
20852rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020853if { (ac_try="$ac_compile"
20854case "(($ac_try" in
20855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20856 *) ac_try_echo=$ac_try;;
20857esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020858eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20859$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020862 grep -v '^ *+' conftest.er1 >conftest.err
20863 rm -f conftest.er1
20864 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020865 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020866 (exit $ac_status); } && {
20867 test -z "$ac_c_werror_flag" ||
20868 test ! -s conftest.err
20869 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020870 ac_cv_header_time_altzone=yes
20871else
Benjamin Petersona8332062009-09-11 22:36:27 +000020872 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020873sed 's/^/| /' conftest.$ac_ext >&5
20874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020875 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020876fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20879fi
20880
Benjamin Petersona8332062009-09-11 22:36:27 +000020881{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20882$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020883if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020884
20885cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020886#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020887_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020888
20889fi
20890
Guido van Rossumda88dad1995-01-26 00:46:29 +000020891was_it_defined=no
Benjamin Petersona8332062009-09-11 22:36:27 +000020892{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20893$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 +000020894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020895/* confdefs.h. */
20896_ACEOF
20897cat confdefs.h >>conftest.$ac_ext
20898cat >>conftest.$ac_ext <<_ACEOF
20899/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020900
20901#include <sys/types.h>
20902#include <sys/select.h>
20903#include <sys/time.h>
20904
Martin v. Löwis11437992002-04-12 09:54:03 +000020905int
20906main ()
20907{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020908;
Martin v. Löwis11437992002-04-12 09:54:03 +000020909 ;
20910 return 0;
20911}
20912_ACEOF
20913rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020914if { (ac_try="$ac_compile"
20915case "(($ac_try" in
20916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20917 *) ac_try_echo=$ac_try;;
20918esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020919eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20920$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020923 grep -v '^ *+' conftest.er1 >conftest.err
20924 rm -f conftest.er1
20925 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020926 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020927 (exit $ac_status); } && {
20928 test -z "$ac_c_werror_flag" ||
20929 test ! -s conftest.err
20930 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020931
20932
20933cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020934#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020935_ACEOF
20936
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020937 was_it_defined=yes
20938
Guido van Rossumf78abae1997-01-21 22:02:36 +000020939else
Benjamin Petersona8332062009-09-11 22:36:27 +000020940 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020941sed 's/^/| /' conftest.$ac_ext >&5
20942
Thomas Wouters477c8d52006-05-27 19:21:47 +000020943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020944fi
20945
20946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000020947{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
20948$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020949
Benjamin Petersona8332062009-09-11 22:36:27 +000020950{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5
20951$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020952if test "${ac_cv_struct_addrinfo+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000020953 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020954else
Martin v. Löwis11437992002-04-12 09:54:03 +000020955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020956/* confdefs.h. */
20957_ACEOF
20958cat confdefs.h >>conftest.$ac_ext
20959cat >>conftest.$ac_ext <<_ACEOF
20960/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020961
20962# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020963int
20964main ()
20965{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020966struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020967 ;
20968 return 0;
20969}
20970_ACEOF
20971rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020972if { (ac_try="$ac_compile"
20973case "(($ac_try" in
20974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20975 *) ac_try_echo=$ac_try;;
20976esac
Benjamin Petersona8332062009-09-11 22:36:27 +000020977eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20978$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020981 grep -v '^ *+' conftest.er1 >conftest.err
20982 rm -f conftest.er1
20983 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000020984 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020985 (exit $ac_status); } && {
20986 test -z "$ac_c_werror_flag" ||
20987 test ! -s conftest.err
20988 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020989 ac_cv_struct_addrinfo=yes
20990else
Benjamin Petersona8332062009-09-11 22:36:27 +000020991 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020992sed 's/^/| /' conftest.$ac_ext >&5
20993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020994 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020995fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20998fi
20999
Benjamin Petersona8332062009-09-11 22:36:27 +000021000{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21001$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021002if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021003
21004cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021005#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021006_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021007
21008fi
21009
Benjamin Petersona8332062009-09-11 22:36:27 +000021010{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21011$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021012if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000021013 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021014else
Martin v. Löwis11437992002-04-12 09:54:03 +000021015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021016/* confdefs.h. */
21017_ACEOF
21018cat confdefs.h >>conftest.$ac_ext
21019cat >>conftest.$ac_ext <<_ACEOF
21020/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021021
21022# include <sys/types.h>
21023# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021024int
21025main ()
21026{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021027struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021028 ;
21029 return 0;
21030}
21031_ACEOF
21032rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021033if { (ac_try="$ac_compile"
21034case "(($ac_try" in
21035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21036 *) ac_try_echo=$ac_try;;
21037esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021038eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21039$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021042 grep -v '^ *+' conftest.er1 >conftest.err
21043 rm -f conftest.er1
21044 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021045 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021046 (exit $ac_status); } && {
21047 test -z "$ac_c_werror_flag" ||
21048 test ! -s conftest.err
21049 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021050 ac_cv_struct_sockaddr_storage=yes
21051else
Benjamin Petersona8332062009-09-11 22:36:27 +000021052 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021053sed 's/^/| /' conftest.$ac_ext >&5
21054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021055 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21059fi
21060
Benjamin Petersona8332062009-09-11 22:36:27 +000021061{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21062$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021063if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021064
21065cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021066#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021067_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021068
21069fi
21070
Guido van Rossum627b2d71993-12-24 10:39:16 +000021071# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021072
Michael W. Hudson54241132001-12-07 15:38:26 +000021073
Benjamin Petersona8332062009-09-11 22:36:27 +000021074{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21075$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021076if test "${ac_cv_c_char_unsigned+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000021077 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021078else
Martin v. Löwis11437992002-04-12 09:54:03 +000021079 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021080/* confdefs.h. */
21081_ACEOF
21082cat confdefs.h >>conftest.$ac_ext
21083cat >>conftest.$ac_ext <<_ACEOF
21084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021085$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021086int
21087main ()
21088{
21089static int test_array [1 - 2 * !(((char) -1) < 0)];
21090test_array [0] = 0
21091
21092 ;
21093 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021094}
Martin v. Löwis11437992002-04-12 09:54:03 +000021095_ACEOF
21096rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021097if { (ac_try="$ac_compile"
21098case "(($ac_try" in
21099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21100 *) ac_try_echo=$ac_try;;
21101esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021102eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21103$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021106 grep -v '^ *+' conftest.er1 >conftest.err
21107 rm -f conftest.er1
21108 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021109 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021110 (exit $ac_status); } && {
21111 test -z "$ac_c_werror_flag" ||
21112 test ! -s conftest.err
21113 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021114 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021115else
Benjamin Petersona8332062009-09-11 22:36:27 +000021116 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021117sed 's/^/| /' conftest.$ac_ext >&5
21118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021119 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021121
21122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021123fi
Benjamin Petersona8332062009-09-11 22:36:27 +000021124{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21125$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021126if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021127 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021128#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021129_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021130
21131fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021132
Benjamin Petersona8332062009-09-11 22:36:27 +000021133{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21134$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021135if test "${ac_cv_c_const+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000021136 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021137else
21138 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021139/* confdefs.h. */
21140_ACEOF
21141cat confdefs.h >>conftest.$ac_ext
21142cat >>conftest.$ac_ext <<_ACEOF
21143/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021144
Martin v. Löwis11437992002-04-12 09:54:03 +000021145int
21146main ()
21147{
21148/* FIXME: Include the comments suggested by Paul. */
21149#ifndef __cplusplus
21150 /* Ultrix mips cc rejects this. */
21151 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021152 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021153 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021154 char const *const *pcpcc;
21155 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021156 /* NEC SVR4.0.2 mips cc rejects this. */
21157 struct point {int x, y;};
21158 static struct point const zero = {0,0};
21159 /* AIX XL C 1.02.0.0 rejects this.
21160 It does not let you subtract one const X* pointer from another in
21161 an arm of an if-expression whose if-part is not a constant
21162 expression */
21163 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021164 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021165 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021166 ++pcpcc;
21167 ppc = (char**) pcpcc;
21168 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021169 { /* SCO 3.2v4 cc rejects this. */
21170 char *t;
21171 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021172
Martin v. Löwis11437992002-04-12 09:54:03 +000021173 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021174 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021175 }
21176 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21177 int x[] = {25, 17};
21178 const int *foo = &x[0];
21179 ++foo;
21180 }
21181 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21182 typedef const int *iptr;
21183 iptr p = 0;
21184 ++p;
21185 }
21186 { /* AIX XL C 1.02.0.0 rejects this saying
21187 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21188 struct s { int j; const int *ap[3]; };
21189 struct s *b; b->j = 5;
21190 }
21191 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21192 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021193 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021194 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021195 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021196#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021197
Martin v. Löwis11437992002-04-12 09:54:03 +000021198 ;
21199 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021200}
Martin v. Löwis11437992002-04-12 09:54:03 +000021201_ACEOF
21202rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021203if { (ac_try="$ac_compile"
21204case "(($ac_try" in
21205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21206 *) ac_try_echo=$ac_try;;
21207esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021208eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21209$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021212 grep -v '^ *+' conftest.er1 >conftest.err
21213 rm -f conftest.er1
21214 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021215 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021216 (exit $ac_status); } && {
21217 test -z "$ac_c_werror_flag" ||
21218 test ! -s conftest.err
21219 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021220 ac_cv_c_const=yes
21221else
Benjamin Petersona8332062009-09-11 22:36:27 +000021222 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021223sed 's/^/| /' conftest.$ac_ext >&5
21224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021225 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021227
21228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021229fi
Benjamin Petersona8332062009-09-11 22:36:27 +000021230{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21231$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021232if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021233
21234cat >>confdefs.h <<\_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000021235#define const /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021236_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021237
21238fi
21239
Michael W. Hudson54241132001-12-07 15:38:26 +000021240
Guido van Rossumda88dad1995-01-26 00:46:29 +000021241works=no
Benjamin Petersona8332062009-09-11 22:36:27 +000021242{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
21243$as_echo_n "checking for working volatile... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021244cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021245/* confdefs.h. */
21246_ACEOF
21247cat confdefs.h >>conftest.$ac_ext
21248cat >>conftest.$ac_ext <<_ACEOF
21249/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021250
Martin v. Löwis11437992002-04-12 09:54:03 +000021251int
21252main ()
21253{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021254volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021255 ;
21256 return 0;
21257}
21258_ACEOF
21259rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021260if { (ac_try="$ac_compile"
21261case "(($ac_try" in
21262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21263 *) ac_try_echo=$ac_try;;
21264esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021265eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21266$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021267 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021269 grep -v '^ *+' conftest.er1 >conftest.err
21270 rm -f conftest.er1
21271 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021272 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021273 (exit $ac_status); } && {
21274 test -z "$ac_c_werror_flag" ||
21275 test ! -s conftest.err
21276 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021277 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021278else
Benjamin Petersona8332062009-09-11 22:36:27 +000021279 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021280sed 's/^/| /' conftest.$ac_ext >&5
21281
Martin v. Löwis11437992002-04-12 09:54:03 +000021282
21283cat >>confdefs.h <<\_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000021284#define volatile /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021285_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021286
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021287
Guido van Rossum627b2d71993-12-24 10:39:16 +000021288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021289
21290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000021291{ $as_echo "$as_me:$LINENO: result: $works" >&5
21292$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021293
Guido van Rossumda88dad1995-01-26 00:46:29 +000021294works=no
Benjamin Petersona8332062009-09-11 22:36:27 +000021295{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5
21296$as_echo_n "checking for working signed char... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021297cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021298/* confdefs.h. */
21299_ACEOF
21300cat confdefs.h >>conftest.$ac_ext
21301cat >>conftest.$ac_ext <<_ACEOF
21302/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021303
Martin v. Löwis11437992002-04-12 09:54:03 +000021304int
21305main ()
21306{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021307signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021308 ;
21309 return 0;
21310}
21311_ACEOF
21312rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021313if { (ac_try="$ac_compile"
21314case "(($ac_try" in
21315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21316 *) ac_try_echo=$ac_try;;
21317esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021318eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21319$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021320 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021322 grep -v '^ *+' conftest.er1 >conftest.err
21323 rm -f conftest.er1
21324 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021325 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021326 (exit $ac_status); } && {
21327 test -z "$ac_c_werror_flag" ||
21328 test ! -s conftest.err
21329 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021330 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021331else
Benjamin Petersona8332062009-09-11 22:36:27 +000021332 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021333sed 's/^/| /' conftest.$ac_ext >&5
21334
Martin v. Löwis11437992002-04-12 09:54:03 +000021335
21336cat >>confdefs.h <<\_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000021337#define signed /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021338_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021339
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021340
Guido van Rossum7f43da71994-08-01 12:15:30 +000021341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021342
21343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000021344{ $as_echo "$as_me:$LINENO: result: $works" >&5
21345$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021346
Guido van Rossumda88dad1995-01-26 00:46:29 +000021347have_prototypes=no
Benjamin Petersona8332062009-09-11 22:36:27 +000021348{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5
21349$as_echo_n "checking for prototypes... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021350cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021351/* confdefs.h. */
21352_ACEOF
21353cat confdefs.h >>conftest.$ac_ext
21354cat >>conftest.$ac_ext <<_ACEOF
21355/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021356int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021357int
21358main ()
21359{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021360return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021361 ;
21362 return 0;
21363}
21364_ACEOF
21365rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021366if { (ac_try="$ac_compile"
21367case "(($ac_try" in
21368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21369 *) ac_try_echo=$ac_try;;
21370esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021371eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21372$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021373 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021374 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021375 grep -v '^ *+' conftest.er1 >conftest.err
21376 rm -f conftest.er1
21377 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021378 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021379 (exit $ac_status); } && {
21380 test -z "$ac_c_werror_flag" ||
21381 test ! -s conftest.err
21382 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021383
21384
21385cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021386#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021387_ACEOF
21388
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021389 have_prototypes=yes
21390
Guido van Rossumf78abae1997-01-21 22:02:36 +000021391else
Benjamin Petersona8332062009-09-11 22:36:27 +000021392 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021393sed 's/^/| /' conftest.$ac_ext >&5
21394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021395
Guido van Rossum7f43da71994-08-01 12:15:30 +000021396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021397
21398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000021399{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5
21400$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021401
Guido van Rossumda88dad1995-01-26 00:46:29 +000021402works=no
Benjamin Petersona8332062009-09-11 22:36:27 +000021403{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21404$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021405cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021406/* confdefs.h. */
21407_ACEOF
21408cat confdefs.h >>conftest.$ac_ext
21409cat >>conftest.$ac_ext <<_ACEOF
21410/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021411
21412#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021413int foo(int x, ...) {
21414 va_list va;
21415 va_start(va, x);
21416 va_arg(va, int);
21417 va_arg(va, char *);
21418 va_arg(va, double);
21419 return 0;
21420}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021421
Martin v. Löwis11437992002-04-12 09:54:03 +000021422int
21423main ()
21424{
Guido van Rossum90eea071996-08-30 20:58:57 +000021425return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021426 ;
21427 return 0;
21428}
21429_ACEOF
21430rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021431if { (ac_try="$ac_compile"
21432case "(($ac_try" in
21433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21434 *) ac_try_echo=$ac_try;;
21435esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021436eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21437$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021440 grep -v '^ *+' conftest.er1 >conftest.err
21441 rm -f conftest.er1
21442 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021443 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021444 (exit $ac_status); } && {
21445 test -z "$ac_c_werror_flag" ||
21446 test ! -s conftest.err
21447 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021448
21449
21450cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021451#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021452_ACEOF
21453
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021454 works=yes
21455
Guido van Rossumf78abae1997-01-21 22:02:36 +000021456else
Benjamin Petersona8332062009-09-11 22:36:27 +000021457 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021458sed 's/^/| /' conftest.$ac_ext >&5
21459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021460
Guido van Rossum627b2d71993-12-24 10:39:16 +000021461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021462
21463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000021464{ $as_echo "$as_me:$LINENO: result: $works" >&5
21465$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021466
Martin v. Löwisd6320502004-08-12 13:45:08 +000021467# check for socketpair
Benjamin Petersona8332062009-09-11 22:36:27 +000021468{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5
21469$as_echo_n "checking for socketpair... " >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021470cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021471/* confdefs.h. */
21472_ACEOF
21473cat confdefs.h >>conftest.$ac_ext
21474cat >>conftest.$ac_ext <<_ACEOF
21475/* end confdefs.h. */
21476
21477#include <sys/types.h>
21478#include <sys/socket.h>
21479
21480int
21481main ()
21482{
21483void *x=socketpair
21484 ;
21485 return 0;
21486}
21487_ACEOF
21488rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021489if { (ac_try="$ac_compile"
21490case "(($ac_try" in
21491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21492 *) ac_try_echo=$ac_try;;
21493esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021494eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21495$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021498 grep -v '^ *+' conftest.er1 >conftest.err
21499 rm -f conftest.er1
21500 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021501 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021502 (exit $ac_status); } && {
21503 test -z "$ac_c_werror_flag" ||
21504 test ! -s conftest.err
21505 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021506
21507cat >>confdefs.h <<\_ACEOF
21508#define HAVE_SOCKETPAIR 1
21509_ACEOF
21510
Benjamin Petersona8332062009-09-11 22:36:27 +000021511 { $as_echo "$as_me:$LINENO: result: yes" >&5
21512$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021513else
Benjamin Petersona8332062009-09-11 22:36:27 +000021514 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021515sed 's/^/| /' conftest.$ac_ext >&5
21516
Benjamin Petersona8332062009-09-11 22:36:27 +000021517 { $as_echo "$as_me:$LINENO: result: no" >&5
21518$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021519
21520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021521
21522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021523
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021524# check if sockaddr has sa_len member
Benjamin Petersona8332062009-09-11 22:36:27 +000021525{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21526$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021527cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021528/* confdefs.h. */
21529_ACEOF
21530cat confdefs.h >>conftest.$ac_ext
21531cat >>conftest.$ac_ext <<_ACEOF
21532/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021533#include <sys/types.h>
21534#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021535int
21536main ()
21537{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021538struct sockaddr x;
21539x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021540 ;
21541 return 0;
21542}
21543_ACEOF
21544rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021545if { (ac_try="$ac_compile"
21546case "(($ac_try" in
21547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21548 *) ac_try_echo=$ac_try;;
21549esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021550eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21551$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021554 grep -v '^ *+' conftest.er1 >conftest.err
21555 rm -f conftest.er1
21556 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021557 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021558 (exit $ac_status); } && {
21559 test -z "$ac_c_werror_flag" ||
21560 test ! -s conftest.err
21561 } && test -s conftest.$ac_objext; then
Benjamin Petersona8332062009-09-11 22:36:27 +000021562 { $as_echo "$as_me:$LINENO: result: yes" >&5
21563$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021564
21565cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021566#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021567_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021568
21569else
Benjamin Petersona8332062009-09-11 22:36:27 +000021570 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021571sed 's/^/| /' conftest.$ac_ext >&5
21572
Benjamin Petersona8332062009-09-11 22:36:27 +000021573 { $as_echo "$as_me:$LINENO: result: no" >&5
21574$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021576
21577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021578
Guido van Rossumda88dad1995-01-26 00:46:29 +000021579va_list_is_array=no
Benjamin Petersona8332062009-09-11 22:36:27 +000021580{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21581$as_echo_n "checking whether va_list is an array... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021582cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021583/* confdefs.h. */
21584_ACEOF
21585cat confdefs.h >>conftest.$ac_ext
21586cat >>conftest.$ac_ext <<_ACEOF
21587/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021588
21589#ifdef HAVE_STDARG_PROTOTYPES
21590#include <stdarg.h>
21591#else
21592#include <varargs.h>
21593#endif
21594
Martin v. Löwis11437992002-04-12 09:54:03 +000021595int
21596main ()
21597{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021598va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021599 ;
21600 return 0;
21601}
21602_ACEOF
21603rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021604if { (ac_try="$ac_compile"
21605case "(($ac_try" in
21606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21607 *) ac_try_echo=$ac_try;;
21608esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021609eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21610$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021613 grep -v '^ *+' conftest.er1 >conftest.err
21614 rm -f conftest.er1
21615 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021616 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021617 (exit $ac_status); } && {
21618 test -z "$ac_c_werror_flag" ||
21619 test ! -s conftest.err
21620 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021621 :
21622else
Benjamin Petersona8332062009-09-11 22:36:27 +000021623 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021624sed 's/^/| /' conftest.$ac_ext >&5
21625
Martin v. Löwis11437992002-04-12 09:54:03 +000021626
21627
21628cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021629#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021630_ACEOF
21631
Guido van Rossumda88dad1995-01-26 00:46:29 +000021632 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021635
21636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000021637{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21638$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021639
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021640# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021641
21642
21643
Benjamin Petersona8332062009-09-11 22:36:27 +000021644{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21645$as_echo_n "checking for gethostbyname_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021646if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000021647 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021648else
Martin v. Löwis11437992002-04-12 09:54:03 +000021649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021650/* confdefs.h. */
21651_ACEOF
21652cat confdefs.h >>conftest.$ac_ext
21653cat >>conftest.$ac_ext <<_ACEOF
21654/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021655/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21657#define gethostbyname_r innocuous_gethostbyname_r
21658
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021659/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021660 which can conflict with char gethostbyname_r (); below.
21661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021662 <limits.h> exists even on freestanding compilers. */
21663
21664#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021665# include <limits.h>
21666#else
21667# include <assert.h>
21668#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021669
21670#undef gethostbyname_r
21671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021672/* Override any GCC internal prototype to avoid an error.
21673 Use char because int might match the return type of a GCC
21674 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021675#ifdef __cplusplus
21676extern "C"
21677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021678char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021679/* The GNU C library defines this for functions which it implements
21680 to always fail with ENOSYS. Some functions are actually named
21681 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021682#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021683choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021684#endif
21685
Skip Montanaro6dead952003-09-25 14:50:04 +000021686int
21687main ()
21688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021689return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021690 ;
21691 return 0;
21692}
21693_ACEOF
21694rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021695if { (ac_try="$ac_link"
21696case "(($ac_try" in
21697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21698 *) ac_try_echo=$ac_try;;
21699esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021700eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21701$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021702 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021704 grep -v '^ *+' conftest.er1 >conftest.err
21705 rm -f conftest.er1
21706 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021707 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021708 (exit $ac_status); } && {
21709 test -z "$ac_c_werror_flag" ||
21710 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000021711 } && test -s conftest$ac_exeext && {
21712 test "$cross_compiling" = yes ||
21713 $as_test_x conftest$ac_exeext
21714 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021715 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021716else
Benjamin Petersona8332062009-09-11 22:36:27 +000021717 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021718sed 's/^/| /' conftest.$ac_ext >&5
21719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021720 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021722
Benjamin Petersona8332062009-09-11 22:36:27 +000021723rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021724rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021725 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021726fi
Benjamin Petersona8332062009-09-11 22:36:27 +000021727{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21728$as_echo "$ac_cv_func_gethostbyname_r" >&6; }
21729if test "x$ac_cv_func_gethostbyname_r" = x""yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021730
Martin v. Löwis11437992002-04-12 09:54:03 +000021731 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021732#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021733_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021734
Benjamin Petersona8332062009-09-11 22:36:27 +000021735 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21736$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021737 OLD_CFLAGS=$CFLAGS
21738 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021740/* confdefs.h. */
21741_ACEOF
21742cat confdefs.h >>conftest.$ac_ext
21743cat >>conftest.$ac_ext <<_ACEOF
21744/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021745
21746# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021747
Martin v. Löwis11437992002-04-12 09:54:03 +000021748int
21749main ()
21750{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021751
21752 char *name;
21753 struct hostent *he, *res;
21754 char buffer[2048];
21755 int buflen = 2048;
21756 int h_errnop;
21757
21758 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021759
21760 ;
21761 return 0;
21762}
21763_ACEOF
21764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021765if { (ac_try="$ac_compile"
21766case "(($ac_try" in
21767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21768 *) ac_try_echo=$ac_try;;
21769esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021770eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21771$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021774 grep -v '^ *+' conftest.er1 >conftest.err
21775 rm -f conftest.er1
21776 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021777 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021778 (exit $ac_status); } && {
21779 test -z "$ac_c_werror_flag" ||
21780 test ! -s conftest.err
21781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021782
21783 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021784#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021785_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021786
Martin v. Löwis11437992002-04-12 09:54:03 +000021787
21788cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021789#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021790_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021791
Benjamin Petersona8332062009-09-11 22:36:27 +000021792 { $as_echo "$as_me:$LINENO: result: yes" >&5
21793$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021794
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021795else
Benjamin Petersona8332062009-09-11 22:36:27 +000021796 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021797sed 's/^/| /' conftest.$ac_ext >&5
21798
Martin v. Löwis11437992002-04-12 09:54:03 +000021799
Benjamin Petersona8332062009-09-11 22:36:27 +000021800 { $as_echo "$as_me:$LINENO: result: no" >&5
21801$as_echo "no" >&6; }
21802 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21803$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021805/* confdefs.h. */
21806_ACEOF
21807cat confdefs.h >>conftest.$ac_ext
21808cat >>conftest.$ac_ext <<_ACEOF
21809/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021810
21811# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021812
Martin v. Löwis11437992002-04-12 09:54:03 +000021813int
21814main ()
21815{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021816
21817 char *name;
21818 struct hostent *he;
21819 char buffer[2048];
21820 int buflen = 2048;
21821 int h_errnop;
21822
21823 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021824
21825 ;
21826 return 0;
21827}
21828_ACEOF
21829rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021830if { (ac_try="$ac_compile"
21831case "(($ac_try" in
21832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21833 *) ac_try_echo=$ac_try;;
21834esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021835eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21836$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021839 grep -v '^ *+' conftest.er1 >conftest.err
21840 rm -f conftest.er1
21841 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021842 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021843 (exit $ac_status); } && {
21844 test -z "$ac_c_werror_flag" ||
21845 test ! -s conftest.err
21846 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021847
21848 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021849#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021850_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021851
Martin v. Löwis11437992002-04-12 09:54:03 +000021852
21853cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021854#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021855_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021856
Benjamin Petersona8332062009-09-11 22:36:27 +000021857 { $as_echo "$as_me:$LINENO: result: yes" >&5
21858$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021859
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021860else
Benjamin Petersona8332062009-09-11 22:36:27 +000021861 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021862sed 's/^/| /' conftest.$ac_ext >&5
21863
Martin v. Löwis11437992002-04-12 09:54:03 +000021864
Benjamin Petersona8332062009-09-11 22:36:27 +000021865 { $as_echo "$as_me:$LINENO: result: no" >&5
21866$as_echo "no" >&6; }
21867 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21868$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021870/* confdefs.h. */
21871_ACEOF
21872cat confdefs.h >>conftest.$ac_ext
21873cat >>conftest.$ac_ext <<_ACEOF
21874/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021875
21876# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021877
Martin v. Löwis11437992002-04-12 09:54:03 +000021878int
21879main ()
21880{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021881
21882 char *name;
21883 struct hostent *he;
21884 struct hostent_data data;
21885
21886 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021887
21888 ;
21889 return 0;
21890}
21891_ACEOF
21892rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021893if { (ac_try="$ac_compile"
21894case "(($ac_try" in
21895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21896 *) ac_try_echo=$ac_try;;
21897esac
Benjamin Petersona8332062009-09-11 22:36:27 +000021898eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21899$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021902 grep -v '^ *+' conftest.er1 >conftest.err
21903 rm -f conftest.er1
21904 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000021905 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021906 (exit $ac_status); } && {
21907 test -z "$ac_c_werror_flag" ||
21908 test ! -s conftest.err
21909 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021910
21911 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021912#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021913_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021914
Martin v. Löwis11437992002-04-12 09:54:03 +000021915
21916cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021917#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021918_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021919
Benjamin Petersona8332062009-09-11 22:36:27 +000021920 { $as_echo "$as_me:$LINENO: result: yes" >&5
21921$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021922
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021923else
Benjamin Petersona8332062009-09-11 22:36:27 +000021924 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021925sed 's/^/| /' conftest.$ac_ext >&5
21926
Martin v. Löwis11437992002-04-12 09:54:03 +000021927
Benjamin Petersona8332062009-09-11 22:36:27 +000021928 { $as_echo "$as_me:$LINENO: result: no" >&5
21929$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021930
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021932
21933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021934
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021936
21937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021938
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021940
21941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021942 CFLAGS=$OLD_CFLAGS
21943
21944else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021945
Martin v. Löwis11437992002-04-12 09:54:03 +000021946
21947for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021948do
Benjamin Petersona8332062009-09-11 22:36:27 +000021949as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21950{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21951$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021952if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000021953 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021954else
Martin v. Löwis11437992002-04-12 09:54:03 +000021955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021956/* confdefs.h. */
21957_ACEOF
21958cat confdefs.h >>conftest.$ac_ext
21959cat >>conftest.$ac_ext <<_ACEOF
21960/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021961/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21962 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21963#define $ac_func innocuous_$ac_func
21964
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021965/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021966 which can conflict with char $ac_func (); below.
21967 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021968 <limits.h> exists even on freestanding compilers. */
21969
21970#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021971# include <limits.h>
21972#else
21973# include <assert.h>
21974#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021975
21976#undef $ac_func
21977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021978/* Override any GCC internal prototype to avoid an error.
21979 Use char because int might match the return type of a GCC
21980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021981#ifdef __cplusplus
21982extern "C"
21983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021984char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021985/* The GNU C library defines this for functions which it implements
21986 to always fail with ENOSYS. Some functions are actually named
21987 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021988#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021989choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021990#endif
21991
Skip Montanaro6dead952003-09-25 14:50:04 +000021992int
21993main ()
21994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021995return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021996 ;
21997 return 0;
21998}
21999_ACEOF
22000rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022001if { (ac_try="$ac_link"
22002case "(($ac_try" in
22003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22004 *) ac_try_echo=$ac_try;;
22005esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022006eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22007$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022008 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022010 grep -v '^ *+' conftest.er1 >conftest.err
22011 rm -f conftest.er1
22012 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000022013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022014 (exit $ac_status); } && {
22015 test -z "$ac_c_werror_flag" ||
22016 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000022017 } && test -s conftest$ac_exeext && {
22018 test "$cross_compiling" = yes ||
22019 $as_test_x conftest$ac_exeext
22020 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022021 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022022else
Benjamin Petersona8332062009-09-11 22:36:27 +000022023 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022024sed 's/^/| /' conftest.$ac_ext >&5
22025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022026 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022028
Benjamin Petersona8332062009-09-11 22:36:27 +000022029rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022031 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022032fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022033ac_res=`eval 'as_val=${'$as_ac_var'}
22034 $as_echo "$as_val"'`
22035 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22036$as_echo "$ac_res" >&6; }
22037as_val=`eval 'as_val=${'$as_ac_var'}
22038 $as_echo "$as_val"'`
22039 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022040 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000022041#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022042_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022043
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022044fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022045done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022046
Michael W. Hudson54241132001-12-07 15:38:26 +000022047
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022048fi
22049
Michael W. Hudson54241132001-12-07 15:38:26 +000022050
22051
22052
22053
22054
22055
Guido van Rossum627b2d71993-12-24 10:39:16 +000022056# checks for system services
22057# (none yet)
22058
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022059# Linux requires this for correct f.p. operations
Benjamin Petersona8332062009-09-11 22:36:27 +000022060{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5
22061$as_echo_n "checking for __fpu_control... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022062if test "${ac_cv_func___fpu_control+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000022063 $as_echo_n "(cached) " >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022064else
Martin v. Löwis11437992002-04-12 09:54:03 +000022065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022066/* confdefs.h. */
22067_ACEOF
22068cat confdefs.h >>conftest.$ac_ext
22069cat >>conftest.$ac_ext <<_ACEOF
22070/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022071/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22072 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22073#define __fpu_control innocuous___fpu_control
22074
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022075/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022076 which can conflict with char __fpu_control (); below.
22077 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022078 <limits.h> exists even on freestanding compilers. */
22079
22080#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022081# include <limits.h>
22082#else
22083# include <assert.h>
22084#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022085
22086#undef __fpu_control
22087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022088/* Override any GCC internal prototype to avoid an error.
22089 Use char because int might match the return type of a GCC
22090 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022091#ifdef __cplusplus
22092extern "C"
22093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022094char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022095/* The GNU C library defines this for functions which it implements
22096 to always fail with ENOSYS. Some functions are actually named
22097 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022098#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022099choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022100#endif
22101
Skip Montanaro6dead952003-09-25 14:50:04 +000022102int
22103main ()
22104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022105return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022106 ;
22107 return 0;
22108}
22109_ACEOF
22110rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022111if { (ac_try="$ac_link"
22112case "(($ac_try" in
22113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22114 *) ac_try_echo=$ac_try;;
22115esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022116eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22117$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022118 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022120 grep -v '^ *+' conftest.er1 >conftest.err
22121 rm -f conftest.er1
22122 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000022123 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022124 (exit $ac_status); } && {
22125 test -z "$ac_c_werror_flag" ||
22126 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000022127 } && test -s conftest$ac_exeext && {
22128 test "$cross_compiling" = yes ||
22129 $as_test_x conftest$ac_exeext
22130 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022131 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022132else
Benjamin Petersona8332062009-09-11 22:36:27 +000022133 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022134sed 's/^/| /' conftest.$ac_ext >&5
22135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022136 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022138
Benjamin Petersona8332062009-09-11 22:36:27 +000022139rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022141 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022142fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022143{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22144$as_echo "$ac_cv_func___fpu_control" >&6; }
22145if test "x$ac_cv_func___fpu_control" = x""yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022146 :
22147else
Martin v. Löwis11437992002-04-12 09:54:03 +000022148
Benjamin Petersona8332062009-09-11 22:36:27 +000022149{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22150$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022151if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000022152 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022153else
Martin v. Löwis11437992002-04-12 09:54:03 +000022154 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022155LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022156cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022157/* confdefs.h. */
22158_ACEOF
22159cat confdefs.h >>conftest.$ac_ext
22160cat >>conftest.$ac_ext <<_ACEOF
22161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022163/* Override any GCC internal prototype to avoid an error.
22164 Use char because int might match the return type of a GCC
22165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022166#ifdef __cplusplus
22167extern "C"
22168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022169char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022170int
22171main ()
22172{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022173return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022174 ;
22175 return 0;
22176}
22177_ACEOF
22178rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022179if { (ac_try="$ac_link"
22180case "(($ac_try" in
22181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22182 *) ac_try_echo=$ac_try;;
22183esac
Benjamin Petersona8332062009-09-11 22:36:27 +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_link") 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 Petersona8332062009-09-11 22:36:27 +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
Benjamin Petersona8332062009-09-11 22:36:27 +000022195 } && test -s conftest$ac_exeext && {
22196 test "$cross_compiling" = yes ||
22197 $as_test_x conftest$ac_exeext
22198 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022199 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022200else
Benjamin Petersona8332062009-09-11 22:36:27 +000022201 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022202sed 's/^/| /' conftest.$ac_ext >&5
22203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022204 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022206
Benjamin Petersona8332062009-09-11 22:36:27 +000022207rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022208rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022209 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022210LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022211fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022212{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22213$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
22214if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022215 cat >>confdefs.h <<_ACEOF
22216#define HAVE_LIBIEEE 1
22217_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022218
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022219 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022220
Guido van Rossum627b2d71993-12-24 10:39:16 +000022221fi
22222
Michael W. Hudson54241132001-12-07 15:38:26 +000022223
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022224fi
22225
Michael W. Hudson54241132001-12-07 15:38:26 +000022226
Guido van Rossum7f253911997-05-09 02:42:48 +000022227# Check for --with-fpectl
Benjamin Petersona8332062009-09-11 22:36:27 +000022228{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22229$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022231# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022232if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022233 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022234if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022235then
22236
22237cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022238#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022239_ACEOF
22240
Benjamin Petersona8332062009-09-11 22:36:27 +000022241 { $as_echo "$as_me:$LINENO: result: yes" >&5
22242$as_echo "yes" >&6; }
22243else { $as_echo "$as_me:$LINENO: result: no" >&5
22244$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022245fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022246else
Benjamin Petersona8332062009-09-11 22:36:27 +000022247 { $as_echo "$as_me:$LINENO: result: no" >&5
22248$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022249fi
22250
Guido van Rossum7f253911997-05-09 02:42:48 +000022251
Guido van Rossum7f43da71994-08-01 12:15:30 +000022252# check for --with-libm=...
22253
Guido van Rossum563e7081996-09-10 18:20:48 +000022254case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022255Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022256*) LIBM=-lm
22257esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022258{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22259$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022261# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022262if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022263 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022264if test "$withval" = no
22265then LIBM=
Benjamin Petersona8332062009-09-11 22:36:27 +000022266 { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5
22267$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022268elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022269then LIBM=$withval
Benjamin Petersona8332062009-09-11 22:36:27 +000022270 { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22271$as_echo "set LIBM=\"$withval\"" >&6; }
22272else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22273$as_echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022274 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022275fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022276else
Benjamin Petersona8332062009-09-11 22:36:27 +000022277 { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22278$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022279fi
22280
Guido van Rossum7f43da71994-08-01 12:15:30 +000022281
22282# check for --with-libc=...
22283
Benjamin Petersona8332062009-09-11 22:36:27 +000022284{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22285$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022287# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022288if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022289 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022290if test "$withval" = no
22291then LIBC=
Benjamin Petersona8332062009-09-11 22:36:27 +000022292 { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5
22293$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022294elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022295then LIBC=$withval
Benjamin Petersona8332062009-09-11 22:36:27 +000022296 { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22297$as_echo "set LIBC=\"$withval\"" >&6; }
22298else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22299$as_echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022300 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022301fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022302else
Benjamin Petersona8332062009-09-11 22:36:27 +000022303 { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22304$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022305fi
22306
Guido van Rossum7f43da71994-08-01 12:15:30 +000022307
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022308# **************************************************
22309# * Check for various properties of floating point *
22310# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022311
Benjamin Petersona8332062009-09-11 22:36:27 +000022312{ $as_echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22313$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022314if test "${ac_cv_little_endian_double+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000022315 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022316else
22317
22318if test "$cross_compiling" = yes; then
22319 ac_cv_little_endian_double=no
22320else
22321 cat >conftest.$ac_ext <<_ACEOF
22322/* confdefs.h. */
22323_ACEOF
22324cat confdefs.h >>conftest.$ac_ext
22325cat >>conftest.$ac_ext <<_ACEOF
22326/* end confdefs.h. */
22327
22328#include <string.h>
22329int main() {
22330 double x = 9006104071832581.0;
22331 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22332 return 0;
22333 else
22334 return 1;
22335}
22336
22337_ACEOF
22338rm -f conftest$ac_exeext
22339if { (ac_try="$ac_link"
22340case "(($ac_try" in
22341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22342 *) ac_try_echo=$ac_try;;
22343esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022344eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22345$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022346 (eval "$ac_link") 2>&5
22347 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000022348 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22350 { (case "(($ac_try" in
22351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22352 *) ac_try_echo=$ac_try;;
22353esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022354eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22355$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022356 (eval "$ac_try") 2>&5
22357 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000022358 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022359 (exit $ac_status); }; }; then
22360 ac_cv_little_endian_double=yes
22361else
Benjamin Petersona8332062009-09-11 22:36:27 +000022362 $as_echo "$as_me: program exited with status $ac_status" >&5
22363$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022364sed 's/^/| /' conftest.$ac_ext >&5
22365
22366( exit $ac_status )
22367ac_cv_little_endian_double=no
22368fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022369rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022370rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22371fi
22372
22373
22374fi
22375
Benjamin Petersona8332062009-09-11 22:36:27 +000022376{ $as_echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22377$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022378if test "$ac_cv_little_endian_double" = yes
22379then
22380
22381cat >>confdefs.h <<\_ACEOF
22382#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22383_ACEOF
22384
22385fi
22386
Benjamin Petersona8332062009-09-11 22:36:27 +000022387{ $as_echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22388$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022389if test "${ac_cv_big_endian_double+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000022390 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022391else
22392
22393if test "$cross_compiling" = yes; then
22394 ac_cv_big_endian_double=no
22395else
22396 cat >conftest.$ac_ext <<_ACEOF
22397/* confdefs.h. */
22398_ACEOF
22399cat confdefs.h >>conftest.$ac_ext
22400cat >>conftest.$ac_ext <<_ACEOF
22401/* end confdefs.h. */
22402
22403#include <string.h>
22404int main() {
22405 double x = 9006104071832581.0;
22406 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22407 return 0;
22408 else
22409 return 1;
22410}
22411
22412_ACEOF
22413rm -f conftest$ac_exeext
22414if { (ac_try="$ac_link"
22415case "(($ac_try" in
22416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22417 *) ac_try_echo=$ac_try;;
22418esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022419eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22420$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022421 (eval "$ac_link") 2>&5
22422 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000022423 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022424 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22425 { (case "(($ac_try" in
22426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22427 *) ac_try_echo=$ac_try;;
22428esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022429eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22430$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022431 (eval "$ac_try") 2>&5
22432 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000022433 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022434 (exit $ac_status); }; }; then
22435 ac_cv_big_endian_double=yes
22436else
Benjamin Petersona8332062009-09-11 22:36:27 +000022437 $as_echo "$as_me: program exited with status $ac_status" >&5
22438$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022439sed 's/^/| /' conftest.$ac_ext >&5
22440
22441( exit $ac_status )
22442ac_cv_big_endian_double=no
22443fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022444rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22446fi
22447
22448
22449fi
22450
Benjamin Petersona8332062009-09-11 22:36:27 +000022451{ $as_echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22452$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022453if test "$ac_cv_big_endian_double" = yes
22454then
22455
22456cat >>confdefs.h <<\_ACEOF
22457#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22458_ACEOF
22459
22460fi
22461
22462# Some ARM platforms use a mixed-endian representation for doubles.
22463# While Python doesn't currently have full support for these platforms
22464# (see e.g., issue 1762561), we can at least make sure that float <-> string
22465# conversions work.
Benjamin Petersona8332062009-09-11 22:36:27 +000022466{ $as_echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22467$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022468if test "${ac_cv_mixed_endian_double+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000022469 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022470else
22471
22472if test "$cross_compiling" = yes; then
22473 ac_cv_mixed_endian_double=no
22474else
22475 cat >conftest.$ac_ext <<_ACEOF
22476/* confdefs.h. */
22477_ACEOF
22478cat confdefs.h >>conftest.$ac_ext
22479cat >>conftest.$ac_ext <<_ACEOF
22480/* end confdefs.h. */
22481
22482#include <string.h>
22483int main() {
22484 double x = 9006104071832581.0;
22485 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22486 return 0;
22487 else
22488 return 1;
22489}
22490
22491_ACEOF
22492rm -f conftest$ac_exeext
22493if { (ac_try="$ac_link"
22494case "(($ac_try" in
22495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22496 *) ac_try_echo=$ac_try;;
22497esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022498eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22499$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022500 (eval "$ac_link") 2>&5
22501 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000022502 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022503 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22504 { (case "(($ac_try" in
22505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22506 *) ac_try_echo=$ac_try;;
22507esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022508eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22509$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022510 (eval "$ac_try") 2>&5
22511 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000022512 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022513 (exit $ac_status); }; }; then
22514 ac_cv_mixed_endian_double=yes
22515else
Benjamin Petersona8332062009-09-11 22:36:27 +000022516 $as_echo "$as_me: program exited with status $ac_status" >&5
22517$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022518sed 's/^/| /' conftest.$ac_ext >&5
22519
22520( exit $ac_status )
22521ac_cv_mixed_endian_double=no
22522fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022523rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22525fi
22526
22527
22528fi
22529
Benjamin Petersona8332062009-09-11 22:36:27 +000022530{ $as_echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22531$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022532if test "$ac_cv_mixed_endian_double" = yes
22533then
22534
22535cat >>confdefs.h <<\_ACEOF
22536#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22537_ACEOF
22538
22539fi
22540
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022541# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022542# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022543# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022544# rounding; this is a problem on x86, where the x87 FPU has a default
22545# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22546# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022547if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22548then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022549 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022550 # x87 control word. It should be, but you never know...
Benjamin Petersona8332062009-09-11 22:36:27 +000022551 { $as_echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22552$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 +000022553 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022554/* confdefs.h. */
22555_ACEOF
22556cat confdefs.h >>conftest.$ac_ext
22557cat >>conftest.$ac_ext <<_ACEOF
22558/* end confdefs.h. */
22559
22560int
22561main ()
22562{
22563
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022564 unsigned short cw;
22565 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22566 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022567
22568 ;
22569 return 0;
22570}
22571_ACEOF
22572rm -f conftest.$ac_objext
22573if { (ac_try="$ac_compile"
22574case "(($ac_try" in
22575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22576 *) ac_try_echo=$ac_try;;
22577esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022578eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22579$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022580 (eval "$ac_compile") 2>conftest.er1
22581 ac_status=$?
22582 grep -v '^ *+' conftest.er1 >conftest.err
22583 rm -f conftest.er1
22584 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000022585 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022586 (exit $ac_status); } && {
22587 test -z "$ac_c_werror_flag" ||
22588 test ! -s conftest.err
22589 } && test -s conftest.$ac_objext; then
22590 have_gcc_asm_for_x87=yes
22591else
Benjamin Petersona8332062009-09-11 22:36:27 +000022592 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022593sed 's/^/| /' conftest.$ac_ext >&5
22594
22595 have_gcc_asm_for_x87=no
22596fi
22597
22598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000022599 { $as_echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22600$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022601 if test "$have_gcc_asm_for_x87" = yes
22602 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022603
22604cat >>confdefs.h <<\_ACEOF
22605#define HAVE_GCC_ASM_FOR_X87 1
22606_ACEOF
22607
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022608 fi
22609fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022610
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022611# Detect whether system arithmetic is subject to x87-style double
22612# rounding issues. The result of this test has little meaning on non
22613# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22614# mode is round-to-nearest and double rounding issues are present, and
22615# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Benjamin Petersona8332062009-09-11 22:36:27 +000022616{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22617$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022618# $BASECFLAGS may affect the result
22619ac_save_cc="$CC"
22620CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022621if test "$cross_compiling" = yes; then
22622 ac_cv_x87_double_rounding=no
22623else
22624 cat >conftest.$ac_ext <<_ACEOF
22625/* confdefs.h. */
22626_ACEOF
22627cat confdefs.h >>conftest.$ac_ext
22628cat >>conftest.$ac_ext <<_ACEOF
22629/* end confdefs.h. */
22630
22631#include <stdlib.h>
22632#include <math.h>
22633int main() {
22634 volatile double x, y, z;
22635 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22636 x = 0.99999999999999989; /* 1-2**-53 */
22637 y = 1./x;
22638 if (y != 1.)
22639 exit(0);
22640 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22641 x = 1e16;
22642 y = 2.99999;
22643 z = x + y;
22644 if (z != 1e16+4.)
22645 exit(0);
22646 /* both tests show evidence of double rounding */
22647 exit(1);
22648}
22649
22650_ACEOF
22651rm -f conftest$ac_exeext
22652if { (ac_try="$ac_link"
22653case "(($ac_try" in
22654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22655 *) ac_try_echo=$ac_try;;
22656esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022657eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22658$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022659 (eval "$ac_link") 2>&5
22660 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000022661 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022662 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22663 { (case "(($ac_try" in
22664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22665 *) ac_try_echo=$ac_try;;
22666esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022667eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22668$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022669 (eval "$ac_try") 2>&5
22670 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000022671 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022672 (exit $ac_status); }; }; then
22673 ac_cv_x87_double_rounding=no
22674else
Benjamin Petersona8332062009-09-11 22:36:27 +000022675 $as_echo "$as_me: program exited with status $ac_status" >&5
22676$as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022677sed 's/^/| /' conftest.$ac_ext >&5
22678
22679( exit $ac_status )
22680ac_cv_x87_double_rounding=yes
22681fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022682rm -rf conftest.dSYM
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22684fi
22685
22686
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022687CC="$ac_save_cc"
Benjamin Petersona8332062009-09-11 22:36:27 +000022688{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22689$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022690if test "$ac_cv_x87_double_rounding" = yes
22691then
22692
22693cat >>confdefs.h <<\_ACEOF
22694#define X87_DOUBLE_ROUNDING 1
22695_ACEOF
22696
22697fi
22698
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022699# ************************************
22700# * Check for mathematical functions *
22701# ************************************
22702
22703LIBS_SAVE=$LIBS
22704LIBS="$LIBS $LIBM"
22705
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022706# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22707# -0. on some architectures.
Benjamin Petersona8332062009-09-11 22:36:27 +000022708{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22709$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022710if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000022711 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022712else
22713
22714if test "$cross_compiling" = yes; then
22715 ac_cv_tanh_preserves_zero_sign=no
22716else
22717 cat >conftest.$ac_ext <<_ACEOF
22718/* confdefs.h. */
22719_ACEOF
22720cat confdefs.h >>conftest.$ac_ext
22721cat >>conftest.$ac_ext <<_ACEOF
22722/* end confdefs.h. */
22723
22724#include <math.h>
22725#include <stdlib.h>
22726int main() {
22727 /* return 0 if either negative zeros don't exist
22728 on this platform or if negative zeros exist
22729 and tanh(-0.) == -0. */
22730 if (atan2(0., -1.) == atan2(-0., -1.) ||
22731 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22732 else exit(1);
22733}
22734
22735_ACEOF
22736rm -f conftest$ac_exeext
22737if { (ac_try="$ac_link"
22738case "(($ac_try" in
22739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22740 *) ac_try_echo=$ac_try;;
22741esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022742eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22743$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022744 (eval "$ac_link") 2>&5
22745 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000022746 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22748 { (case "(($ac_try" in
22749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22750 *) ac_try_echo=$ac_try;;
22751esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022752eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22753$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022754 (eval "$ac_try") 2>&5
22755 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000022756 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022757 (exit $ac_status); }; }; then
22758 ac_cv_tanh_preserves_zero_sign=yes
22759else
Benjamin Petersona8332062009-09-11 22:36:27 +000022760 $as_echo "$as_me: program exited with status $ac_status" >&5
22761$as_echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022762sed 's/^/| /' conftest.$ac_ext >&5
22763
22764( exit $ac_status )
22765ac_cv_tanh_preserves_zero_sign=no
22766fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022767rm -rf conftest.dSYM
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22769fi
22770
22771
22772fi
22773
Benjamin Petersona8332062009-09-11 22:36:27 +000022774{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22775$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022776if test "$ac_cv_tanh_preserves_zero_sign" = yes
22777then
22778
22779cat >>confdefs.h <<\_ACEOF
22780#define TANH_PRESERVES_ZERO_SIGN 1
22781_ACEOF
22782
22783fi
22784
22785
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022786
Michael W. Hudson54241132001-12-07 15:38:26 +000022787
Christian Heimes99170a52007-12-19 02:07:34 +000022788
22789
22790
22791
22792
Mark Dickinsonf2537862009-04-18 13:58:18 +000022793
22794for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022795do
Benjamin Petersona8332062009-09-11 22:36:27 +000022796as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22797{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22798$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022799if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000022800 $as_echo_n "(cached) " >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022801else
22802 cat >conftest.$ac_ext <<_ACEOF
22803/* confdefs.h. */
22804_ACEOF
22805cat confdefs.h >>conftest.$ac_ext
22806cat >>conftest.$ac_ext <<_ACEOF
22807/* end confdefs.h. */
22808/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22809 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22810#define $ac_func innocuous_$ac_func
22811
22812/* System header to define __stub macros and hopefully few prototypes,
22813 which can conflict with char $ac_func (); below.
22814 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22815 <limits.h> exists even on freestanding compilers. */
22816
22817#ifdef __STDC__
22818# include <limits.h>
22819#else
22820# include <assert.h>
22821#endif
22822
22823#undef $ac_func
22824
22825/* Override any GCC internal prototype to avoid an error.
22826 Use char because int might match the return type of a GCC
22827 builtin and then its argument prototype would still apply. */
22828#ifdef __cplusplus
22829extern "C"
22830#endif
22831char $ac_func ();
22832/* The GNU C library defines this for functions which it implements
22833 to always fail with ENOSYS. Some functions are actually named
22834 something starting with __ and the normal name is an alias. */
22835#if defined __stub_$ac_func || defined __stub___$ac_func
22836choke me
22837#endif
22838
22839int
22840main ()
22841{
22842return $ac_func ();
22843 ;
22844 return 0;
22845}
22846_ACEOF
22847rm -f conftest.$ac_objext conftest$ac_exeext
22848if { (ac_try="$ac_link"
22849case "(($ac_try" in
22850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22851 *) ac_try_echo=$ac_try;;
22852esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022853eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22854$as_echo "$ac_try_echo") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022855 (eval "$ac_link") 2>conftest.er1
22856 ac_status=$?
22857 grep -v '^ *+' conftest.er1 >conftest.err
22858 rm -f conftest.er1
22859 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000022860 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022861 (exit $ac_status); } && {
22862 test -z "$ac_c_werror_flag" ||
22863 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000022864 } && test -s conftest$ac_exeext && {
22865 test "$cross_compiling" = yes ||
22866 $as_test_x conftest$ac_exeext
22867 }; then
Christian Heimes99170a52007-12-19 02:07:34 +000022868 eval "$as_ac_var=yes"
22869else
Benjamin Petersona8332062009-09-11 22:36:27 +000022870 $as_echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022871sed 's/^/| /' conftest.$ac_ext >&5
22872
22873 eval "$as_ac_var=no"
22874fi
22875
Benjamin Petersona8332062009-09-11 22:36:27 +000022876rm -rf conftest.dSYM
Christian Heimes99170a52007-12-19 02:07:34 +000022877rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22878 conftest$ac_exeext conftest.$ac_ext
22879fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022880ac_res=`eval 'as_val=${'$as_ac_var'}
22881 $as_echo "$as_val"'`
22882 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22883$as_echo "$ac_res" >&6; }
22884as_val=`eval 'as_val=${'$as_ac_var'}
22885 $as_echo "$as_val"'`
22886 if test "x$as_val" = x""yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022887 cat >>confdefs.h <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000022888#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022889_ACEOF
22890
22891fi
22892done
22893
Benjamin Petersona8332062009-09-11 22:36:27 +000022894{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22895$as_echo_n "checking whether isinf is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022896if test "${ac_cv_have_decl_isinf+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000022897 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022898else
22899 cat >conftest.$ac_ext <<_ACEOF
22900/* confdefs.h. */
22901_ACEOF
22902cat confdefs.h >>conftest.$ac_ext
22903cat >>conftest.$ac_ext <<_ACEOF
22904/* end confdefs.h. */
22905#include <math.h>
22906
22907int
22908main ()
22909{
22910#ifndef isinf
22911 (void) isinf;
22912#endif
22913
22914 ;
22915 return 0;
22916}
22917_ACEOF
22918rm -f conftest.$ac_objext
22919if { (ac_try="$ac_compile"
22920case "(($ac_try" in
22921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22922 *) ac_try_echo=$ac_try;;
22923esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022924eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22925$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022926 (eval "$ac_compile") 2>conftest.er1
22927 ac_status=$?
22928 grep -v '^ *+' conftest.er1 >conftest.err
22929 rm -f conftest.er1
22930 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000022931 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022932 (exit $ac_status); } && {
22933 test -z "$ac_c_werror_flag" ||
22934 test ! -s conftest.err
22935 } && test -s conftest.$ac_objext; then
22936 ac_cv_have_decl_isinf=yes
22937else
Benjamin Petersona8332062009-09-11 22:36:27 +000022938 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022939sed 's/^/| /' conftest.$ac_ext >&5
22940
22941 ac_cv_have_decl_isinf=no
22942fi
22943
22944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22945fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022946{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22947$as_echo "$ac_cv_have_decl_isinf" >&6; }
22948if test "x$ac_cv_have_decl_isinf" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022949
22950cat >>confdefs.h <<_ACEOF
22951#define HAVE_DECL_ISINF 1
22952_ACEOF
22953
22954
22955else
22956 cat >>confdefs.h <<_ACEOF
22957#define HAVE_DECL_ISINF 0
22958_ACEOF
22959
22960
22961fi
Benjamin Petersona8332062009-09-11 22:36:27 +000022962{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22963$as_echo_n "checking whether isnan is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022964if test "${ac_cv_have_decl_isnan+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000022965 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022966else
22967 cat >conftest.$ac_ext <<_ACEOF
22968/* confdefs.h. */
22969_ACEOF
22970cat confdefs.h >>conftest.$ac_ext
22971cat >>conftest.$ac_ext <<_ACEOF
22972/* end confdefs.h. */
22973#include <math.h>
22974
22975int
22976main ()
22977{
22978#ifndef isnan
22979 (void) isnan;
22980#endif
22981
22982 ;
22983 return 0;
22984}
22985_ACEOF
22986rm -f conftest.$ac_objext
22987if { (ac_try="$ac_compile"
22988case "(($ac_try" in
22989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22990 *) ac_try_echo=$ac_try;;
22991esac
Benjamin Petersona8332062009-09-11 22:36:27 +000022992eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22993$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022994 (eval "$ac_compile") 2>conftest.er1
22995 ac_status=$?
22996 grep -v '^ *+' conftest.er1 >conftest.err
22997 rm -f conftest.er1
22998 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000022999 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023000 (exit $ac_status); } && {
23001 test -z "$ac_c_werror_flag" ||
23002 test ! -s conftest.err
23003 } && test -s conftest.$ac_objext; then
23004 ac_cv_have_decl_isnan=yes
23005else
Benjamin Petersona8332062009-09-11 22:36:27 +000023006 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023007sed 's/^/| /' conftest.$ac_ext >&5
23008
23009 ac_cv_have_decl_isnan=no
23010fi
23011
23012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23013fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023014{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23015$as_echo "$ac_cv_have_decl_isnan" >&6; }
23016if test "x$ac_cv_have_decl_isnan" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023017
23018cat >>confdefs.h <<_ACEOF
23019#define HAVE_DECL_ISNAN 1
23020_ACEOF
23021
23022
23023else
23024 cat >>confdefs.h <<_ACEOF
23025#define HAVE_DECL_ISNAN 0
23026_ACEOF
23027
23028
23029fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023030{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23031$as_echo_n "checking whether isfinite is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023032if test "${ac_cv_have_decl_isfinite+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023033 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023034else
23035 cat >conftest.$ac_ext <<_ACEOF
23036/* confdefs.h. */
23037_ACEOF
23038cat confdefs.h >>conftest.$ac_ext
23039cat >>conftest.$ac_ext <<_ACEOF
23040/* end confdefs.h. */
23041#include <math.h>
23042
23043int
23044main ()
23045{
23046#ifndef isfinite
23047 (void) isfinite;
23048#endif
23049
23050 ;
23051 return 0;
23052}
23053_ACEOF
23054rm -f conftest.$ac_objext
23055if { (ac_try="$ac_compile"
23056case "(($ac_try" in
23057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23058 *) ac_try_echo=$ac_try;;
23059esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023060eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23061$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023062 (eval "$ac_compile") 2>conftest.er1
23063 ac_status=$?
23064 grep -v '^ *+' conftest.er1 >conftest.err
23065 rm -f conftest.er1
23066 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023067 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023068 (exit $ac_status); } && {
23069 test -z "$ac_c_werror_flag" ||
23070 test ! -s conftest.err
23071 } && test -s conftest.$ac_objext; then
23072 ac_cv_have_decl_isfinite=yes
23073else
Benjamin Petersona8332062009-09-11 22:36:27 +000023074 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023075sed 's/^/| /' conftest.$ac_ext >&5
23076
23077 ac_cv_have_decl_isfinite=no
23078fi
23079
23080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23081fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023082{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23083$as_echo "$ac_cv_have_decl_isfinite" >&6; }
23084if test "x$ac_cv_have_decl_isfinite" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023085
23086cat >>confdefs.h <<_ACEOF
23087#define HAVE_DECL_ISFINITE 1
23088_ACEOF
23089
23090
23091else
23092 cat >>confdefs.h <<_ACEOF
23093#define HAVE_DECL_ISFINITE 0
23094_ACEOF
23095
23096
23097fi
23098
23099
Christian Heimes99170a52007-12-19 02:07:34 +000023100
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023101LIBS=$LIBS_SAVE
23102
Mark Dickinson10683072009-04-18 21:18:19 +000023103# Multiprocessing check for broken sem_getvalue
Benjamin Petersona8332062009-09-11 22:36:27 +000023104{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23105$as_echo_n "checking for broken sem_getvalue... " >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000023106if test "$cross_compiling" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023107 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23108$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23109{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000023110See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023111$as_echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000023112See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000023113 { (exit 1); exit 1; }; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000023114else
23115 cat >conftest.$ac_ext <<_ACEOF
23116/* confdefs.h. */
23117_ACEOF
23118cat confdefs.h >>conftest.$ac_ext
23119cat >>conftest.$ac_ext <<_ACEOF
23120/* end confdefs.h. */
23121
23122#include <unistd.h>
23123#include <fcntl.h>
23124#include <stdio.h>
23125#include <semaphore.h>
23126#include <sys/stat.h>
23127
23128int main(void){
23129 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23130 int count;
23131 int res;
23132 if(a==SEM_FAILED){
23133 perror("sem_open");
23134 return 1;
23135
23136 }
23137 res = sem_getvalue(a, &count);
23138 sem_close(a);
23139 return res==-1 ? 1 : 0;
23140}
23141
23142
23143_ACEOF
23144rm -f conftest$ac_exeext
23145if { (ac_try="$ac_link"
23146case "(($ac_try" in
23147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23148 *) ac_try_echo=$ac_try;;
23149esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023150eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23151$as_echo "$ac_try_echo") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023152 (eval "$ac_link") 2>&5
23153 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000023154 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23156 { (case "(($ac_try" in
23157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23158 *) ac_try_echo=$ac_try;;
23159esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023160eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23161$as_echo "$ac_try_echo") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023162 (eval "$ac_try") 2>&5
23163 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000023164 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023165 (exit $ac_status); }; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023166 { $as_echo "$as_me:$LINENO: result: no" >&5
23167$as_echo "no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000023168else
Benjamin Petersona8332062009-09-11 22:36:27 +000023169 $as_echo "$as_me: program exited with status $ac_status" >&5
23170$as_echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023171sed 's/^/| /' conftest.$ac_ext >&5
23172
23173( exit $ac_status )
Benjamin Petersona8332062009-09-11 22:36:27 +000023174{ $as_echo "$as_me:$LINENO: result: yes" >&5
23175$as_echo "yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000023176
23177cat >>confdefs.h <<\_ACEOF
23178#define HAVE_BROKEN_SEM_GETVALUE 1
23179_ACEOF
23180
23181
23182fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023183rm -rf conftest.dSYM
Mark Dickinson10683072009-04-18 21:18:19 +000023184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23185fi
23186
23187
23188
Mark Dickinsonbd792642009-03-18 20:06:12 +000023189# determine what size digit to use for Python's longs
Benjamin Petersona8332062009-09-11 22:36:27 +000023190{ $as_echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23191$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023192# Check whether --enable-big-digits was given.
23193if test "${enable_big_digits+set}" = set; then
23194 enableval=$enable_big_digits; case $enable_big_digits in
23195yes)
23196 enable_big_digits=30 ;;
23197no)
23198 enable_big_digits=15 ;;
2319915|30)
23200 ;;
23201*)
Benjamin Petersona8332062009-09-11 22:36:27 +000023202 { { $as_echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23203$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 +000023204 { (exit 1); exit 1; }; } ;;
23205esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023206{ $as_echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23207$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023208
23209cat >>confdefs.h <<_ACEOF
23210#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23211_ACEOF
23212
23213
23214else
Benjamin Petersona8332062009-09-11 22:36:27 +000023215 { $as_echo "$as_me:$LINENO: result: no value specified" >&5
23216$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023217fi
23218
23219
Guido van Rossumef2255b2000-03-10 22:30:29 +000023220# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023221if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023222 { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
23223$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023224if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023225 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023226fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023227{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23228$as_echo "$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023229else
Martin v. Löwis11437992002-04-12 09:54:03 +000023230 # Is the header compilable?
Benjamin Petersona8332062009-09-11 22:36:27 +000023231{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5
23232$as_echo_n "checking wchar.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023233cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023234/* confdefs.h. */
23235_ACEOF
23236cat confdefs.h >>conftest.$ac_ext
23237cat >>conftest.$ac_ext <<_ACEOF
23238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023239$ac_includes_default
23240#include <wchar.h>
23241_ACEOF
23242rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023243if { (ac_try="$ac_compile"
23244case "(($ac_try" in
23245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23246 *) ac_try_echo=$ac_try;;
23247esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023248eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23249$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023252 grep -v '^ *+' conftest.er1 >conftest.err
23253 rm -f conftest.er1
23254 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023255 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023256 (exit $ac_status); } && {
23257 test -z "$ac_c_werror_flag" ||
23258 test ! -s conftest.err
23259 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023260 ac_header_compiler=yes
23261else
Benjamin Petersona8332062009-09-11 22:36:27 +000023262 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023263sed 's/^/| /' conftest.$ac_ext >&5
23264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023265 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023267
23268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000023269{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23270$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023271
23272# Is the header present?
Benjamin Petersona8332062009-09-11 22:36:27 +000023273{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5
23274$as_echo_n "checking wchar.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023276/* confdefs.h. */
23277_ACEOF
23278cat confdefs.h >>conftest.$ac_ext
23279cat >>conftest.$ac_ext <<_ACEOF
23280/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023281#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023282_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023283if { (ac_try="$ac_cpp conftest.$ac_ext"
23284case "(($ac_try" in
23285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23286 *) ac_try_echo=$ac_try;;
23287esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023288eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23289$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023290 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023291 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023292 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023293 rm -f conftest.er1
23294 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023296 (exit $ac_status); } >/dev/null && {
23297 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23298 test ! -s conftest.err
23299 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023300 ac_header_preproc=yes
23301else
Benjamin Petersona8332062009-09-11 22:36:27 +000023302 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023303sed 's/^/| /' conftest.$ac_ext >&5
23304
Martin v. Löwis11437992002-04-12 09:54:03 +000023305 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023307
Martin v. Löwis11437992002-04-12 09:54:03 +000023308rm -f conftest.err conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000023309{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23310$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023311
23312# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023313case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23314 yes:no: )
Benjamin Petersona8332062009-09-11 22:36:27 +000023315 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23316$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23317 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23318$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023319 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023320 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023321 no:yes:* )
Benjamin Petersona8332062009-09-11 22:36:27 +000023322 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23323$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23324 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23325$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23326 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23327$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23328 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23329$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23330 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23331$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23332 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23333$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023334 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023335## -------------------------------------- ##
23336## Report this to http://bugs.python.org/ ##
23337## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023338_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023339 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023340 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023341esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023342{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
23343$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023344if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023345 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023346else
23347 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023348fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023349{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23350$as_echo "$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023351
23352fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023353if test "x$ac_cv_header_wchar_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023354
23355
23356cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023357#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023358_ACEOF
23359
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023360 wchar_h="yes"
23361
Guido van Rossumef2255b2000-03-10 22:30:29 +000023362else
Martin v. Löwis11437992002-04-12 09:54:03 +000023363 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023364
23365fi
23366
Michael W. Hudson54241132001-12-07 15:38:26 +000023367
Martin v. Löwis11437992002-04-12 09:54:03 +000023368
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023369# determine wchar_t size
23370if test "$wchar_h" = yes
23371then
Benjamin Petersona8332062009-09-11 22:36:27 +000023372 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023373# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23374# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23375# This bug is HP SR number 8606223364.
Benjamin Petersona8332062009-09-11 22:36:27 +000023376{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5
23377$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023378if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023379 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023380else
Martin v. Löwis11437992002-04-12 09:54:03 +000023381 if test "$cross_compiling" = yes; then
23382 # Depending upon the size, compute the lo and hi bounds.
23383cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023384/* confdefs.h. */
23385_ACEOF
23386cat confdefs.h >>conftest.$ac_ext
23387cat >>conftest.$ac_ext <<_ACEOF
23388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023389#include <wchar.h>
23390
Martin v. Löwis11437992002-04-12 09:54:03 +000023391int
23392main ()
23393{
Benjamin Petersona8332062009-09-11 22:36:27 +000023394static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023395test_array [0] = 0
23396
23397 ;
23398 return 0;
23399}
23400_ACEOF
23401rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023402if { (ac_try="$ac_compile"
23403case "(($ac_try" in
23404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23405 *) ac_try_echo=$ac_try;;
23406esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023407eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23408$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023411 grep -v '^ *+' conftest.er1 >conftest.err
23412 rm -f conftest.er1
23413 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023414 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023415 (exit $ac_status); } && {
23416 test -z "$ac_c_werror_flag" ||
23417 test ! -s conftest.err
23418 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023419 ac_lo=0 ac_mid=0
23420 while :; do
23421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023422/* confdefs.h. */
23423_ACEOF
23424cat confdefs.h >>conftest.$ac_ext
23425cat >>conftest.$ac_ext <<_ACEOF
23426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023427#include <wchar.h>
23428
Martin v. Löwis11437992002-04-12 09:54:03 +000023429int
23430main ()
23431{
Benjamin Petersona8332062009-09-11 22:36:27 +000023432static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023433test_array [0] = 0
23434
23435 ;
23436 return 0;
23437}
23438_ACEOF
23439rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023440if { (ac_try="$ac_compile"
23441case "(($ac_try" in
23442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23443 *) ac_try_echo=$ac_try;;
23444esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023445eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23446$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023449 grep -v '^ *+' conftest.er1 >conftest.err
23450 rm -f conftest.er1
23451 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023452 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023453 (exit $ac_status); } && {
23454 test -z "$ac_c_werror_flag" ||
23455 test ! -s conftest.err
23456 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023457 ac_hi=$ac_mid; break
23458else
Benjamin Petersona8332062009-09-11 22:36:27 +000023459 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023460sed 's/^/| /' conftest.$ac_ext >&5
23461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023462 ac_lo=`expr $ac_mid + 1`
23463 if test $ac_lo -le $ac_mid; then
23464 ac_lo= ac_hi=
23465 break
23466 fi
23467 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023469
23470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023471 done
23472else
Benjamin Petersona8332062009-09-11 22:36:27 +000023473 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023474sed 's/^/| /' conftest.$ac_ext >&5
23475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023477/* confdefs.h. */
23478_ACEOF
23479cat confdefs.h >>conftest.$ac_ext
23480cat >>conftest.$ac_ext <<_ACEOF
23481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023482#include <wchar.h>
23483
Martin v. Löwis11437992002-04-12 09:54:03 +000023484int
23485main ()
23486{
Benjamin Petersona8332062009-09-11 22:36:27 +000023487static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023488test_array [0] = 0
23489
23490 ;
23491 return 0;
23492}
23493_ACEOF
23494rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023495if { (ac_try="$ac_compile"
23496case "(($ac_try" in
23497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23498 *) ac_try_echo=$ac_try;;
23499esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023500eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23501$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023504 grep -v '^ *+' conftest.er1 >conftest.err
23505 rm -f conftest.er1
23506 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023507 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023508 (exit $ac_status); } && {
23509 test -z "$ac_c_werror_flag" ||
23510 test ! -s conftest.err
23511 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023512 ac_hi=-1 ac_mid=-1
23513 while :; do
23514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023515/* confdefs.h. */
23516_ACEOF
23517cat confdefs.h >>conftest.$ac_ext
23518cat >>conftest.$ac_ext <<_ACEOF
23519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023520#include <wchar.h>
23521
Martin v. Löwis11437992002-04-12 09:54:03 +000023522int
23523main ()
23524{
Benjamin Petersona8332062009-09-11 22:36:27 +000023525static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023526test_array [0] = 0
23527
23528 ;
23529 return 0;
23530}
23531_ACEOF
23532rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023533if { (ac_try="$ac_compile"
23534case "(($ac_try" in
23535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23536 *) ac_try_echo=$ac_try;;
23537esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023538eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23539$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023542 grep -v '^ *+' conftest.er1 >conftest.err
23543 rm -f conftest.er1
23544 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023545 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023546 (exit $ac_status); } && {
23547 test -z "$ac_c_werror_flag" ||
23548 test ! -s conftest.err
23549 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023550 ac_lo=$ac_mid; break
23551else
Benjamin Petersona8332062009-09-11 22:36:27 +000023552 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023553sed 's/^/| /' conftest.$ac_ext >&5
23554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023555 ac_hi=`expr '(' $ac_mid ')' - 1`
23556 if test $ac_mid -le $ac_hi; then
23557 ac_lo= ac_hi=
23558 break
23559 fi
23560 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023562
23563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023564 done
23565else
Benjamin Petersona8332062009-09-11 22:36:27 +000023566 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023567sed 's/^/| /' conftest.$ac_ext >&5
23568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023569 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023571
23572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023574
23575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023576# Binary search between lo and hi bounds.
23577while test "x$ac_lo" != "x$ac_hi"; do
23578 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023580/* confdefs.h. */
23581_ACEOF
23582cat confdefs.h >>conftest.$ac_ext
23583cat >>conftest.$ac_ext <<_ACEOF
23584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023585#include <wchar.h>
23586
Martin v. Löwis11437992002-04-12 09:54:03 +000023587int
23588main ()
23589{
Benjamin Petersona8332062009-09-11 22:36:27 +000023590static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023591test_array [0] = 0
23592
23593 ;
23594 return 0;
23595}
23596_ACEOF
23597rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023598if { (ac_try="$ac_compile"
23599case "(($ac_try" in
23600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23601 *) ac_try_echo=$ac_try;;
23602esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023603eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23604$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023607 grep -v '^ *+' conftest.er1 >conftest.err
23608 rm -f conftest.er1
23609 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023610 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023611 (exit $ac_status); } && {
23612 test -z "$ac_c_werror_flag" ||
23613 test ! -s conftest.err
23614 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023615 ac_hi=$ac_mid
23616else
Benjamin Petersona8332062009-09-11 22:36:27 +000023617 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023618sed 's/^/| /' conftest.$ac_ext >&5
23619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023620 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023622
23623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023624done
23625case $ac_lo in
23626?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023627'') if test "$ac_cv_type_wchar_t" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023628 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23630{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023631See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023632$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023633See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000023634 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023635 else
23636 ac_cv_sizeof_wchar_t=0
23637 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023638esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023639else
Martin v. Löwis11437992002-04-12 09:54:03 +000023640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023641/* confdefs.h. */
23642_ACEOF
23643cat confdefs.h >>conftest.$ac_ext
23644cat >>conftest.$ac_ext <<_ACEOF
23645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023646#include <wchar.h>
23647
Benjamin Petersona8332062009-09-11 22:36:27 +000023648static long int longval () { return (long int) (sizeof (wchar_t)); }
23649static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023650#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023651#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023652int
23653main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023654{
Martin v. Löwis11437992002-04-12 09:54:03 +000023655
23656 FILE *f = fopen ("conftest.val", "w");
23657 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023658 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000023659 if (((long int) (sizeof (wchar_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023660 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023661 long int i = longval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000023662 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023663 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000023664 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023665 }
23666 else
23667 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023668 unsigned long int i = ulongval ();
Benjamin Petersona8332062009-09-11 22:36:27 +000023669 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023670 return 1;
Benjamin Petersona8332062009-09-11 22:36:27 +000023671 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023672 }
Benjamin Petersona8332062009-09-11 22:36:27 +000023673 /* Do not output a trailing newline, as this causes \r\n confusion
23674 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023675 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023676
23677 ;
23678 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023679}
Martin v. Löwis11437992002-04-12 09:54:03 +000023680_ACEOF
23681rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023682if { (ac_try="$ac_link"
23683case "(($ac_try" in
23684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23685 *) ac_try_echo=$ac_try;;
23686esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023687eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23688$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023689 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023690 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000023691 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023693 { (case "(($ac_try" in
23694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23695 *) ac_try_echo=$ac_try;;
23696esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023697eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23698$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023699 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023700 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000023701 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023702 (exit $ac_status); }; }; then
23703 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023704else
Benjamin Petersona8332062009-09-11 22:36:27 +000023705 $as_echo "$as_me: program exited with status $ac_status" >&5
23706$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023707sed 's/^/| /' conftest.$ac_ext >&5
23708
Martin v. Löwis11437992002-04-12 09:54:03 +000023709( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023710if test "$ac_cv_type_wchar_t" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023711 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23713{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023714See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023715$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023716See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000023717 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023718 else
23719 ac_cv_sizeof_wchar_t=0
23720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023721fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023722rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023723rm -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 +000023724fi
23725rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023726fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023727{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23728$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023729
23730
23731
Martin v. Löwis11437992002-04-12 09:54:03 +000023732cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023733#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023734_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023735
Michael W. Hudson54241132001-12-07 15:38:26 +000023736
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023737fi
23738
Benjamin Petersona8332062009-09-11 22:36:27 +000023739{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23740$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023741have_ucs4_tcl=no
23742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023743/* confdefs.h. */
23744_ACEOF
23745cat confdefs.h >>conftest.$ac_ext
23746cat >>conftest.$ac_ext <<_ACEOF
23747/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023748
23749#include <tcl.h>
23750#if TCL_UTF_MAX != 6
23751# error "NOT UCS4_TCL"
23752#endif
23753int
23754main ()
23755{
23756
23757 ;
23758 return 0;
23759}
23760_ACEOF
23761rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023762if { (ac_try="$ac_compile"
23763case "(($ac_try" in
23764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23765 *) ac_try_echo=$ac_try;;
23766esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023767eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23768$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023771 grep -v '^ *+' conftest.er1 >conftest.err
23772 rm -f conftest.er1
23773 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000023774 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023775 (exit $ac_status); } && {
23776 test -z "$ac_c_werror_flag" ||
23777 test ! -s conftest.err
23778 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023779
23780
23781cat >>confdefs.h <<\_ACEOF
23782#define HAVE_UCS4_TCL 1
23783_ACEOF
23784
23785 have_ucs4_tcl=yes
23786
23787else
Benjamin Petersona8332062009-09-11 22:36:27 +000023788 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023789sed 's/^/| /' conftest.$ac_ext >&5
23790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023791
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023793
23794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersona8332062009-09-11 22:36:27 +000023795{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23796$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023797
Skip Montanaro6dead952003-09-25 14:50:04 +000023798# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023799if test "$wchar_h" = yes
23800then
23801 # check whether wchar_t is signed or not
Benjamin Petersona8332062009-09-11 22:36:27 +000023802 { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23803$as_echo_n "checking whether wchar_t is signed... " >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023804 if test "${ac_cv_wchar_t_signed+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023805 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023806else
23807
23808 if test "$cross_compiling" = yes; then
23809 ac_cv_wchar_t_signed=yes
23810else
23811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023812/* confdefs.h. */
23813_ACEOF
23814cat confdefs.h >>conftest.$ac_ext
23815cat >>conftest.$ac_ext <<_ACEOF
23816/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023817
23818 #include <wchar.h>
23819 int main()
23820 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023821 /* Success: exit code 0 */
23822 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023823 }
23824
23825_ACEOF
23826rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023827if { (ac_try="$ac_link"
23828case "(($ac_try" in
23829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23830 *) ac_try_echo=$ac_try;;
23831esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023832eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23833$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023834 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023835 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000023836 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023838 { (case "(($ac_try" in
23839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23840 *) ac_try_echo=$ac_try;;
23841esac
Benjamin Petersona8332062009-09-11 22:36:27 +000023842eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23843$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023844 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023845 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000023846 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023847 (exit $ac_status); }; }; then
23848 ac_cv_wchar_t_signed=yes
23849else
Benjamin Petersona8332062009-09-11 22:36:27 +000023850 $as_echo "$as_me: program exited with status $ac_status" >&5
23851$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023852sed 's/^/| /' conftest.$ac_ext >&5
23853
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023854( exit $ac_status )
23855ac_cv_wchar_t_signed=no
23856fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023857rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023858rm -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 +000023859fi
23860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023861
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023862fi
23863
Benjamin Petersona8332062009-09-11 22:36:27 +000023864 { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23865$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023866fi
23867
Benjamin Petersona8332062009-09-11 22:36:27 +000023868{ $as_echo "$as_me:$LINENO: checking what type to use for str" >&5
23869$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023870
23871# Check whether --with-wide-unicode was given.
23872if test "${with_wide_unicode+set}" = set; then
23873 withval=$with_wide_unicode;
23874if test "$withval" != no
23875then unicode_size="4"
23876else unicode_size="2"
23877fi
23878
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023879else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023880
Georg Brandl52d168a2008-01-07 18:10:24 +000023881case "$have_ucs4_tcl" in
23882 yes) unicode_size="4" ;;
23883 *) unicode_size="2" ;;
23884esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023885
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023886fi
23887
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023888
23889
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023890
Georg Brandl52d168a2008-01-07 18:10:24 +000023891case "$unicode_size" in
23892 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023893#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023894_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023895 ;;
23896 *) cat >>confdefs.h <<\_ACEOF
23897#define Py_UNICODE_SIZE 2
23898_ACEOF
23899 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023900esac
23901
Michael W. Hudson54241132001-12-07 15:38:26 +000023902
Martin v. Löwis11437992002-04-12 09:54:03 +000023903
23904
Georg Brandl52d168a2008-01-07 18:10:24 +000023905# wchar_t is only usable if it maps to an unsigned type
23906if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023907 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023908then
23909 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023910
Martin v. Löwis11437992002-04-12 09:54:03 +000023911cat >>confdefs.h <<\_ACEOF
23912#define HAVE_USABLE_WCHAR_T 1
23913_ACEOF
23914
Georg Brandl52d168a2008-01-07 18:10:24 +000023915 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023916#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023917_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023918
Georg Brandl52d168a2008-01-07 18:10:24 +000023919elif test "$ac_cv_sizeof_short" = "$unicode_size"
23920then
23921 PY_UNICODE_TYPE="unsigned short"
23922 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023923#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023924_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023925
Georg Brandl52d168a2008-01-07 18:10:24 +000023926elif test "$ac_cv_sizeof_long" = "$unicode_size"
23927then
23928 PY_UNICODE_TYPE="unsigned long"
23929 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023930#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023931_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023932
Georg Brandl52d168a2008-01-07 18:10:24 +000023933else
23934 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023935fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023936{ $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23937$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023938
23939# check for endianness
Benjamin Petersona8332062009-09-11 22:36:27 +000023940
23941 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23942$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023943if test "${ac_cv_c_bigendian+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000023944 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023945else
Benjamin Petersona8332062009-09-11 22:36:27 +000023946 ac_cv_c_bigendian=unknown
23947 # See if we're dealing with a universal compiler.
23948 cat >conftest.$ac_ext <<_ACEOF
23949/* confdefs.h. */
23950_ACEOF
23951cat confdefs.h >>conftest.$ac_ext
23952cat >>conftest.$ac_ext <<_ACEOF
23953/* end confdefs.h. */
23954#ifndef __APPLE_CC__
23955 not a universal capable compiler
23956 #endif
23957 typedef int dummy;
23958
23959_ACEOF
23960rm -f conftest.$ac_objext
23961if { (ac_try="$ac_compile"
23962case "(($ac_try" in
23963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23964 *) ac_try_echo=$ac_try;;
23965esac
23966eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23967$as_echo "$ac_try_echo") >&5
23968 (eval "$ac_compile") 2>conftest.er1
23969 ac_status=$?
23970 grep -v '^ *+' conftest.er1 >conftest.err
23971 rm -f conftest.er1
23972 cat conftest.err >&5
23973 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23974 (exit $ac_status); } && {
23975 test -z "$ac_c_werror_flag" ||
23976 test ! -s conftest.err
23977 } && test -s conftest.$ac_objext; then
23978
23979 # Check for potential -arch flags. It is not universal unless
23980 # there are some -arch flags. Note that *ppc* also matches
23981 # ppc64. This check is also rather less than ideal.
23982 case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
23983 *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
23984 esac
23985else
23986 $as_echo "$as_me: failed program was:" >&5
23987sed 's/^/| /' conftest.$ac_ext >&5
23988
23989
23990fi
23991
23992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23993 if test $ac_cv_c_bigendian = unknown; then
23994 # See if sys/param.h defines the BYTE_ORDER macro.
23995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023996/* confdefs.h. */
23997_ACEOF
23998cat confdefs.h >>conftest.$ac_ext
23999cat >>conftest.$ac_ext <<_ACEOF
24000/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024001#include <sys/types.h>
Benjamin Petersona8332062009-09-11 22:36:27 +000024002 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024003
Martin v. Löwis11437992002-04-12 09:54:03 +000024004int
24005main ()
24006{
Benjamin Petersona8332062009-09-11 22:36:27 +000024007#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
24008 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
24009 && LITTLE_ENDIAN)
24010 bogus endian macros
24011 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024012
24013 ;
24014 return 0;
24015}
24016_ACEOF
24017rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024018if { (ac_try="$ac_compile"
24019case "(($ac_try" in
24020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24021 *) ac_try_echo=$ac_try;;
24022esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024023eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24024$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024025 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024026 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024027 grep -v '^ *+' conftest.er1 >conftest.err
24028 rm -f conftest.er1
24029 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024030 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024031 (exit $ac_status); } && {
24032 test -z "$ac_c_werror_flag" ||
24033 test ! -s conftest.err
24034 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024035 # It does; now see whether it defined to BIG_ENDIAN or not.
Benjamin Petersona8332062009-09-11 22:36:27 +000024036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024037/* confdefs.h. */
24038_ACEOF
24039cat confdefs.h >>conftest.$ac_ext
24040cat >>conftest.$ac_ext <<_ACEOF
24041/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024042#include <sys/types.h>
Benjamin Petersona8332062009-09-11 22:36:27 +000024043 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024044
Martin v. Löwis11437992002-04-12 09:54:03 +000024045int
24046main ()
24047{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024048#if BYTE_ORDER != BIG_ENDIAN
Benjamin Petersona8332062009-09-11 22:36:27 +000024049 not big endian
24050 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024051
24052 ;
24053 return 0;
24054}
24055_ACEOF
24056rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024057if { (ac_try="$ac_compile"
24058case "(($ac_try" in
24059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24060 *) ac_try_echo=$ac_try;;
24061esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024062eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24063$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024066 grep -v '^ *+' conftest.er1 >conftest.err
24067 rm -f conftest.er1
24068 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024069 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024070 (exit $ac_status); } && {
24071 test -z "$ac_c_werror_flag" ||
24072 test ! -s conftest.err
24073 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024074 ac_cv_c_bigendian=yes
24075else
Benjamin Petersona8332062009-09-11 22:36:27 +000024076 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024077sed 's/^/| /' conftest.$ac_ext >&5
24078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024079 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024081
24082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024083else
Benjamin Petersona8332062009-09-11 22:36:27 +000024084 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024085sed 's/^/| /' conftest.$ac_ext >&5
24086
Benjamin Petersona8332062009-09-11 22:36:27 +000024087
24088fi
24089
24090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24091 fi
24092 if test $ac_cv_c_bigendian = unknown; then
24093 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
24094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024095/* confdefs.h. */
24096_ACEOF
24097cat confdefs.h >>conftest.$ac_ext
24098cat >>conftest.$ac_ext <<_ACEOF
24099/* end confdefs.h. */
Benjamin Petersona8332062009-09-11 22:36:27 +000024100#include <limits.h>
24101
Martin v. Löwis11437992002-04-12 09:54:03 +000024102int
24103main ()
24104{
Benjamin Petersona8332062009-09-11 22:36:27 +000024105#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
24106 bogus endian macros
24107 #endif
24108
Martin v. Löwis11437992002-04-12 09:54:03 +000024109 ;
24110 return 0;
24111}
24112_ACEOF
24113rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024114if { (ac_try="$ac_compile"
24115case "(($ac_try" in
24116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24117 *) ac_try_echo=$ac_try;;
24118esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024119eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24120$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024121 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024123 grep -v '^ *+' conftest.er1 >conftest.err
24124 rm -f conftest.er1
24125 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024126 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024127 (exit $ac_status); } && {
24128 test -z "$ac_c_werror_flag" ||
24129 test ! -s conftest.err
24130 } && test -s conftest.$ac_objext; then
Benjamin Petersona8332062009-09-11 22:36:27 +000024131 # It does; now see whether it defined to _BIG_ENDIAN or not.
24132 cat >conftest.$ac_ext <<_ACEOF
24133/* confdefs.h. */
24134_ACEOF
24135cat confdefs.h >>conftest.$ac_ext
24136cat >>conftest.$ac_ext <<_ACEOF
24137/* end confdefs.h. */
24138#include <limits.h>
24139
24140int
24141main ()
24142{
24143#ifndef _BIG_ENDIAN
24144 not big endian
24145 #endif
24146
24147 ;
24148 return 0;
24149}
24150_ACEOF
24151rm -f conftest.$ac_objext
24152if { (ac_try="$ac_compile"
24153case "(($ac_try" in
24154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24155 *) ac_try_echo=$ac_try;;
24156esac
24157eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24158$as_echo "$ac_try_echo") >&5
24159 (eval "$ac_compile") 2>conftest.er1
24160 ac_status=$?
24161 grep -v '^ *+' conftest.er1 >conftest.err
24162 rm -f conftest.er1
24163 cat conftest.err >&5
24164 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24165 (exit $ac_status); } && {
24166 test -z "$ac_c_werror_flag" ||
24167 test ! -s conftest.err
24168 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024169 ac_cv_c_bigendian=yes
Antoine Pitrou20327222009-05-24 20:39:11 +000024170else
Benjamin Petersona8332062009-09-11 22:36:27 +000024171 $as_echo "$as_me: failed program was:" >&5
24172sed 's/^/| /' conftest.$ac_ext >&5
24173
24174 ac_cv_c_bigendian=no
24175fi
24176
24177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24178else
24179 $as_echo "$as_me: failed program was:" >&5
24180sed 's/^/| /' conftest.$ac_ext >&5
24181
24182
24183fi
24184
24185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24186 fi
24187 if test $ac_cv_c_bigendian = unknown; then
24188 # Compile a test program.
24189 if test "$cross_compiling" = yes; then
24190 # Try to guess by grepping values from an object file.
24191 cat >conftest.$ac_ext <<_ACEOF
24192/* confdefs.h. */
24193_ACEOF
24194cat confdefs.h >>conftest.$ac_ext
24195cat >>conftest.$ac_ext <<_ACEOF
24196/* end confdefs.h. */
24197short int ascii_mm[] =
24198 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24199 short int ascii_ii[] =
24200 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24201 int use_ascii (int i) {
24202 return ascii_mm[i] + ascii_ii[i];
24203 }
24204 short int ebcdic_ii[] =
24205 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24206 short int ebcdic_mm[] =
24207 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24208 int use_ebcdic (int i) {
24209 return ebcdic_mm[i] + ebcdic_ii[i];
24210 }
24211 extern int foo;
24212
24213int
24214main ()
24215{
24216return use_ascii (foo) == use_ebcdic (foo);
24217 ;
24218 return 0;
24219}
24220_ACEOF
24221rm -f conftest.$ac_objext
24222if { (ac_try="$ac_compile"
24223case "(($ac_try" in
24224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24225 *) ac_try_echo=$ac_try;;
24226esac
24227eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24228$as_echo "$ac_try_echo") >&5
24229 (eval "$ac_compile") 2>conftest.er1
24230 ac_status=$?
24231 grep -v '^ *+' conftest.er1 >conftest.err
24232 rm -f conftest.er1
24233 cat conftest.err >&5
24234 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24235 (exit $ac_status); } && {
24236 test -z "$ac_c_werror_flag" ||
24237 test ! -s conftest.err
24238 } && test -s conftest.$ac_objext; then
24239 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
24240 ac_cv_c_bigendian=yes
24241 fi
24242 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24243 if test "$ac_cv_c_bigendian" = unknown; then
24244 ac_cv_c_bigendian=no
24245 else
24246 # finding both strings is unlikely to happen, but who knows?
24247 ac_cv_c_bigendian=unknown
24248 fi
24249 fi
24250else
24251 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024252sed 's/^/| /' conftest.$ac_ext >&5
24253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024254
Martin v. Löwis11437992002-04-12 09:54:03 +000024255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024256
24257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024258else
24259 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024260/* confdefs.h. */
24261_ACEOF
24262cat confdefs.h >>conftest.$ac_ext
24263cat >>conftest.$ac_ext <<_ACEOF
24264/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024265$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024266int
24267main ()
24268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024269
Benjamin Petersona8332062009-09-11 22:36:27 +000024270 /* Are we little or big endian? From Harbison&Steele. */
24271 union
24272 {
24273 long int l;
24274 char c[sizeof (long int)];
24275 } u;
24276 u.l = 1;
24277 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024278
24279 ;
24280 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024281}
Martin v. Löwis11437992002-04-12 09:54:03 +000024282_ACEOF
24283rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024284if { (ac_try="$ac_link"
24285case "(($ac_try" in
24286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24287 *) ac_try_echo=$ac_try;;
24288esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024289eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24290$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024291 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024292 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000024293 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024294 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024295 { (case "(($ac_try" in
24296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24297 *) ac_try_echo=$ac_try;;
24298esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024299eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24300$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024301 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024302 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000024303 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024304 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024305 ac_cv_c_bigendian=no
24306else
Benjamin Petersona8332062009-09-11 22:36:27 +000024307 $as_echo "$as_me: program exited with status $ac_status" >&5
24308$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024309sed 's/^/| /' conftest.$ac_ext >&5
24310
Martin v. Löwis11437992002-04-12 09:54:03 +000024311( exit $ac_status )
24312ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024313fi
Benjamin Petersona8332062009-09-11 22:36:27 +000024314rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024315rm -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 +000024316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024317
24318
Benjamin Petersona8332062009-09-11 22:36:27 +000024319 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024320fi
Benjamin Petersona8332062009-09-11 22:36:27 +000024321{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24322$as_echo "$ac_cv_c_bigendian" >&6; }
24323 case $ac_cv_c_bigendian in #(
24324 yes)
24325 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis113a0852009-05-29 17:25:39 +000024326#define WORDS_BIGENDIAN 1
Antoine Pitrou20327222009-05-24 20:39:11 +000024327_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000024328;; #(
24329 no)
24330 ;; #(
24331 universal)
24332
24333cat >>confdefs.h <<\_ACEOF
24334#define AC_APPLE_UNIVERSAL_BUILD 1
24335_ACEOF
24336
24337 ;; #(
24338 *)
24339 { { $as_echo "$as_me:$LINENO: error: unknown endianness
24340 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24341$as_echo "$as_me: error: unknown endianness
24342 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024343 { (exit 1); exit 1; }; } ;;
Benjamin Petersona8332062009-09-11 22:36:27 +000024344 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024345
Michael W. Hudson54241132001-12-07 15:38:26 +000024346
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024347# Check whether right shifting a negative integer extends the sign bit
24348# or fills with zeros (like the Cray J90, according to Tim Peters).
Benjamin Petersona8332062009-09-11 22:36:27 +000024349{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24350$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024351if test "${ac_cv_rshift_extends_sign+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000024352 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024353else
Martin v. Löwis11437992002-04-12 09:54:03 +000024354
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024355if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024356 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024357else
Martin v. Löwis11437992002-04-12 09:54:03 +000024358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024359/* confdefs.h. */
24360_ACEOF
24361cat confdefs.h >>conftest.$ac_ext
24362cat >>conftest.$ac_ext <<_ACEOF
24363/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024364
24365int main()
24366{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024367 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024368}
24369
Martin v. Löwis11437992002-04-12 09:54:03 +000024370_ACEOF
24371rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024372if { (ac_try="$ac_link"
24373case "(($ac_try" in
24374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24375 *) ac_try_echo=$ac_try;;
24376esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024377eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24378$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024379 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024380 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000024381 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024383 { (case "(($ac_try" in
24384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24385 *) ac_try_echo=$ac_try;;
24386esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024387eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24388$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024389 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024390 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000024391 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024392 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024393 ac_cv_rshift_extends_sign=yes
24394else
Benjamin Petersona8332062009-09-11 22:36:27 +000024395 $as_echo "$as_me: program exited with status $ac_status" >&5
24396$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024397sed 's/^/| /' conftest.$ac_ext >&5
24398
Martin v. Löwis11437992002-04-12 09:54:03 +000024399( exit $ac_status )
24400ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024401fi
Benjamin Petersona8332062009-09-11 22:36:27 +000024402rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024403rm -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 +000024404fi
24405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024406
24407fi
24408
Benjamin Petersona8332062009-09-11 22:36:27 +000024409{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24410$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024411if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024412then
Martin v. Löwis11437992002-04-12 09:54:03 +000024413
24414cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024415#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024416_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024417
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024418fi
24419
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024420# check for getc_unlocked and related locking functions
Benjamin Petersona8332062009-09-11 22:36:27 +000024421{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24422$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024423if test "${ac_cv_have_getc_unlocked+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000024424 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024425else
Martin v. Löwis11437992002-04-12 09:54:03 +000024426
24427cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024428/* confdefs.h. */
24429_ACEOF
24430cat confdefs.h >>conftest.$ac_ext
24431cat >>conftest.$ac_ext <<_ACEOF
24432/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024433#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024434int
24435main ()
24436{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024437
24438 FILE *f = fopen("/dev/null", "r");
24439 flockfile(f);
24440 getc_unlocked(f);
24441 funlockfile(f);
24442
Martin v. Löwis11437992002-04-12 09:54:03 +000024443 ;
24444 return 0;
24445}
24446_ACEOF
24447rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024448if { (ac_try="$ac_link"
24449case "(($ac_try" in
24450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24451 *) ac_try_echo=$ac_try;;
24452esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024453eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24454$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024455 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024457 grep -v '^ *+' conftest.er1 >conftest.err
24458 rm -f conftest.er1
24459 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024460 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024461 (exit $ac_status); } && {
24462 test -z "$ac_c_werror_flag" ||
24463 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000024464 } && test -s conftest$ac_exeext && {
24465 test "$cross_compiling" = yes ||
24466 $as_test_x conftest$ac_exeext
24467 }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024468 ac_cv_have_getc_unlocked=yes
24469else
Benjamin Petersona8332062009-09-11 22:36:27 +000024470 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024471sed 's/^/| /' conftest.$ac_ext >&5
24472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024473 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024475
Benjamin Petersona8332062009-09-11 22:36:27 +000024476rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024478 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024479fi
24480
Benjamin Petersona8332062009-09-11 22:36:27 +000024481{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24482$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024483if test "$ac_cv_have_getc_unlocked" = yes
24484then
Martin v. Löwis11437992002-04-12 09:54:03 +000024485
24486cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024487#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024488_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024489
24490fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024491
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024492# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024493# save the value of LIBS so we don't actually link Python with readline
24494LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024495
Gregory P. Smith18820942008-09-07 06:24:49 +000024496# On some systems we need to link readline to a termcap compatible
24497# library. NOTE: Keep the precedence of listed libraries synchronised
24498# with setup.py.
24499py_cv_lib_readline=no
Benjamin Petersona8332062009-09-11 22:36:27 +000024500{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5
24501$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024502for py_libtermcap in "" ncursesw ncurses curses termcap; do
24503 if test -z "$py_libtermcap"; then
24504 READLINE_LIBS="-lreadline"
24505 else
24506 READLINE_LIBS="-lreadline -l$py_libtermcap"
24507 fi
24508 LIBS="$READLINE_LIBS $LIBS_no_readline"
24509 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024510/* confdefs.h. */
24511_ACEOF
24512cat confdefs.h >>conftest.$ac_ext
24513cat >>conftest.$ac_ext <<_ACEOF
24514/* end confdefs.h. */
24515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024516/* Override any GCC internal prototype to avoid an error.
24517 Use char because int might match the return type of a GCC
24518 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024519#ifdef __cplusplus
24520extern "C"
24521#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024522char readline ();
24523int
24524main ()
24525{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024526return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024527 ;
24528 return 0;
24529}
24530_ACEOF
24531rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024532if { (ac_try="$ac_link"
24533case "(($ac_try" in
24534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24535 *) ac_try_echo=$ac_try;;
24536esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024537eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24538$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024539 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024540 ac_status=$?
24541 grep -v '^ *+' conftest.er1 >conftest.err
24542 rm -f conftest.er1
24543 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024544 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024545 (exit $ac_status); } && {
24546 test -z "$ac_c_werror_flag" ||
24547 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000024548 } && test -s conftest$ac_exeext && {
24549 test "$cross_compiling" = yes ||
24550 $as_test_x conftest$ac_exeext
24551 }; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024552 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024553else
Benjamin Petersona8332062009-09-11 22:36:27 +000024554 $as_echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024555sed 's/^/| /' conftest.$ac_ext >&5
24556
Gregory P. Smith18820942008-09-07 06:24:49 +000024557
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024559
Benjamin Petersona8332062009-09-11 22:36:27 +000024560rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024562 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024563 if test $py_cv_lib_readline = yes; then
24564 break
24565 fi
24566done
24567# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24568#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024569if test $py_cv_lib_readline = no; then
Benjamin Petersona8332062009-09-11 22:36:27 +000024570 { $as_echo "$as_me:$LINENO: result: none" >&5
24571$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024572else
Benjamin Petersona8332062009-09-11 22:36:27 +000024573 { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24574$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024575
24576cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024577#define HAVE_LIBREADLINE 1
24578_ACEOF
24579
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024580fi
24581
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024582# check for readline 2.1
Benjamin Petersona8332062009-09-11 22:36:27 +000024583{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24584$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024585if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000024586 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024587else
24588 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024589LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024590cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024591/* confdefs.h. */
24592_ACEOF
24593cat confdefs.h >>conftest.$ac_ext
24594cat >>conftest.$ac_ext <<_ACEOF
24595/* end confdefs.h. */
24596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024597/* Override any GCC internal prototype to avoid an error.
24598 Use char because int might match the return type of a GCC
24599 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024600#ifdef __cplusplus
24601extern "C"
24602#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024603char rl_callback_handler_install ();
24604int
24605main ()
24606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024607return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024608 ;
24609 return 0;
24610}
24611_ACEOF
24612rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024613if { (ac_try="$ac_link"
24614case "(($ac_try" in
24615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24616 *) ac_try_echo=$ac_try;;
24617esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024618eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24619$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024620 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024622 grep -v '^ *+' conftest.er1 >conftest.err
24623 rm -f conftest.er1
24624 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024625 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024626 (exit $ac_status); } && {
24627 test -z "$ac_c_werror_flag" ||
24628 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000024629 } && test -s conftest$ac_exeext && {
24630 test "$cross_compiling" = yes ||
24631 $as_test_x conftest$ac_exeext
24632 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024633 ac_cv_lib_readline_rl_callback_handler_install=yes
24634else
Benjamin Petersona8332062009-09-11 22:36:27 +000024635 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024636sed 's/^/| /' conftest.$ac_ext >&5
24637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024638 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024640
Benjamin Petersona8332062009-09-11 22:36:27 +000024641rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024643 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024644LIBS=$ac_check_lib_save_LIBS
24645fi
Benjamin Petersona8332062009-09-11 22:36:27 +000024646{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24647$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24648if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024649
24650cat >>confdefs.h <<\_ACEOF
24651#define HAVE_RL_CALLBACK 1
24652_ACEOF
24653
24654fi
24655
24656
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024657# check for readline 2.2
24658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024659/* confdefs.h. */
24660_ACEOF
24661cat confdefs.h >>conftest.$ac_ext
24662cat >>conftest.$ac_ext <<_ACEOF
24663/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024664#include <readline/readline.h>
24665_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024666if { (ac_try="$ac_cpp conftest.$ac_ext"
24667case "(($ac_try" in
24668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24669 *) ac_try_echo=$ac_try;;
24670esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024671eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24672$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024674 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024675 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024676 rm -f conftest.er1
24677 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024678 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024679 (exit $ac_status); } >/dev/null && {
24680 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24681 test ! -s conftest.err
24682 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024683 have_readline=yes
24684else
Benjamin Petersona8332062009-09-11 22:36:27 +000024685 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024686sed 's/^/| /' conftest.$ac_ext >&5
24687
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024688 have_readline=no
24689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024690
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024691rm -f conftest.err conftest.$ac_ext
24692if test $have_readline = yes
24693then
24694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024695/* confdefs.h. */
24696_ACEOF
24697cat confdefs.h >>conftest.$ac_ext
24698cat >>conftest.$ac_ext <<_ACEOF
24699/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024700#include <readline/readline.h>
24701
24702_ACEOF
24703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024704 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024705
24706cat >>confdefs.h <<\_ACEOF
24707#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24708_ACEOF
24709
24710fi
Benjamin Petersona8332062009-09-11 22:36:27 +000024711rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024712
24713fi
24714
Martin v. Löwis0daad592001-09-30 21:09:59 +000024715# check for readline 4.0
Benjamin Petersona8332062009-09-11 22:36:27 +000024716{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24717$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024718if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000024719 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024720else
Martin v. Löwis11437992002-04-12 09:54:03 +000024721 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024722LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024723cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024724/* confdefs.h. */
24725_ACEOF
24726cat confdefs.h >>conftest.$ac_ext
24727cat >>conftest.$ac_ext <<_ACEOF
24728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024730/* Override any GCC internal prototype to avoid an error.
24731 Use char because int might match the return type of a GCC
24732 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024733#ifdef __cplusplus
24734extern "C"
24735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024736char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024737int
24738main ()
24739{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024740return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024741 ;
24742 return 0;
24743}
24744_ACEOF
24745rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024746if { (ac_try="$ac_link"
24747case "(($ac_try" in
24748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24749 *) ac_try_echo=$ac_try;;
24750esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024751eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24752$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024753 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024755 grep -v '^ *+' conftest.er1 >conftest.err
24756 rm -f conftest.er1
24757 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024758 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024759 (exit $ac_status); } && {
24760 test -z "$ac_c_werror_flag" ||
24761 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000024762 } && test -s conftest$ac_exeext && {
24763 test "$cross_compiling" = yes ||
24764 $as_test_x conftest$ac_exeext
24765 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024766 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024767else
Benjamin Petersona8332062009-09-11 22:36:27 +000024768 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024769sed 's/^/| /' conftest.$ac_ext >&5
24770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024771 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024773
Benjamin Petersona8332062009-09-11 22:36:27 +000024774rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024775rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024776 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024777LIBS=$ac_check_lib_save_LIBS
24778fi
Benjamin Petersona8332062009-09-11 22:36:27 +000024779{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24780$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24781if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024782
Martin v. Löwis11437992002-04-12 09:54:03 +000024783cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024784#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024785_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024786
Martin v. Löwis0daad592001-09-30 21:09:59 +000024787fi
24788
Michael W. Hudson54241132001-12-07 15:38:26 +000024789
Thomas Wouters89d996e2007-09-08 17:39:28 +000024790# also in 4.0
Benjamin Petersona8332062009-09-11 22:36:27 +000024791{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24792$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024793if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000024794 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024795else
24796 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024797LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024798cat >conftest.$ac_ext <<_ACEOF
24799/* confdefs.h. */
24800_ACEOF
24801cat confdefs.h >>conftest.$ac_ext
24802cat >>conftest.$ac_ext <<_ACEOF
24803/* end confdefs.h. */
24804
24805/* Override any GCC internal prototype to avoid an error.
24806 Use char because int might match the return type of a GCC
24807 builtin and then its argument prototype would still apply. */
24808#ifdef __cplusplus
24809extern "C"
24810#endif
24811char rl_completion_display_matches_hook ();
24812int
24813main ()
24814{
24815return rl_completion_display_matches_hook ();
24816 ;
24817 return 0;
24818}
24819_ACEOF
24820rm -f conftest.$ac_objext conftest$ac_exeext
24821if { (ac_try="$ac_link"
24822case "(($ac_try" in
24823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24824 *) ac_try_echo=$ac_try;;
24825esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024826eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24827$as_echo "$ac_try_echo") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024828 (eval "$ac_link") 2>conftest.er1
24829 ac_status=$?
24830 grep -v '^ *+' conftest.er1 >conftest.err
24831 rm -f conftest.er1
24832 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024833 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024834 (exit $ac_status); } && {
24835 test -z "$ac_c_werror_flag" ||
24836 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000024837 } && test -s conftest$ac_exeext && {
24838 test "$cross_compiling" = yes ||
24839 $as_test_x conftest$ac_exeext
24840 }; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024841 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24842else
Benjamin Petersona8332062009-09-11 22:36:27 +000024843 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024844sed 's/^/| /' conftest.$ac_ext >&5
24845
24846 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24847fi
24848
Benjamin Petersona8332062009-09-11 22:36:27 +000024849rm -rf conftest.dSYM
Thomas Wouters89d996e2007-09-08 17:39:28 +000024850rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24851 conftest$ac_exeext conftest.$ac_ext
24852LIBS=$ac_check_lib_save_LIBS
24853fi
Benjamin Petersona8332062009-09-11 22:36:27 +000024854{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24855$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24856if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024857
24858cat >>confdefs.h <<\_ACEOF
24859#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24860_ACEOF
24861
24862fi
24863
24864
Martin v. Löwis0daad592001-09-30 21:09:59 +000024865# check for readline 4.2
Benjamin Petersona8332062009-09-11 22:36:27 +000024866{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24867$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024868if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000024869 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024870else
Martin v. Löwis11437992002-04-12 09:54:03 +000024871 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024872LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024874/* confdefs.h. */
24875_ACEOF
24876cat confdefs.h >>conftest.$ac_ext
24877cat >>conftest.$ac_ext <<_ACEOF
24878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024880/* Override any GCC internal prototype to avoid an error.
24881 Use char because int might match the return type of a GCC
24882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024883#ifdef __cplusplus
24884extern "C"
24885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024886char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024887int
24888main ()
24889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024890return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024891 ;
24892 return 0;
24893}
24894_ACEOF
24895rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024896if { (ac_try="$ac_link"
24897case "(($ac_try" in
24898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24899 *) ac_try_echo=$ac_try;;
24900esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024901eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24902$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024903 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024905 grep -v '^ *+' conftest.er1 >conftest.err
24906 rm -f conftest.er1
24907 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024908 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024909 (exit $ac_status); } && {
24910 test -z "$ac_c_werror_flag" ||
24911 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000024912 } && test -s conftest$ac_exeext && {
24913 test "$cross_compiling" = yes ||
24914 $as_test_x conftest$ac_exeext
24915 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024916 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024917else
Benjamin Petersona8332062009-09-11 22:36:27 +000024918 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024919sed 's/^/| /' conftest.$ac_ext >&5
24920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024921 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024923
Benjamin Petersona8332062009-09-11 22:36:27 +000024924rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024925rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024927LIBS=$ac_check_lib_save_LIBS
24928fi
Benjamin Petersona8332062009-09-11 22:36:27 +000024929{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24930$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
24931if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024932
Martin v. Löwis11437992002-04-12 09:54:03 +000024933cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024934#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024935_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024936
Guido van Rossum353ae582001-07-10 16:45:32 +000024937fi
24938
Jack Jansendd19cf82001-12-06 22:36:17 +000024939
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024940# also in readline 4.2
24941cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024942/* confdefs.h. */
24943_ACEOF
24944cat confdefs.h >>conftest.$ac_ext
24945cat >>conftest.$ac_ext <<_ACEOF
24946/* end confdefs.h. */
24947#include <readline/readline.h>
24948_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024949if { (ac_try="$ac_cpp conftest.$ac_ext"
24950case "(($ac_try" in
24951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24952 *) ac_try_echo=$ac_try;;
24953esac
Benjamin Petersona8332062009-09-11 22:36:27 +000024954eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24955$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024956 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024957 ac_status=$?
24958 grep -v '^ *+' conftest.er1 >conftest.err
24959 rm -f conftest.er1
24960 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000024961 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024962 (exit $ac_status); } >/dev/null && {
24963 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24964 test ! -s conftest.err
24965 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024966 have_readline=yes
24967else
Benjamin Petersona8332062009-09-11 22:36:27 +000024968 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024969sed 's/^/| /' conftest.$ac_ext >&5
24970
24971 have_readline=no
24972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024973
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024974rm -f conftest.err conftest.$ac_ext
24975if test $have_readline = yes
24976then
24977 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024978/* confdefs.h. */
24979_ACEOF
24980cat confdefs.h >>conftest.$ac_ext
24981cat >>conftest.$ac_ext <<_ACEOF
24982/* end confdefs.h. */
24983#include <readline/readline.h>
24984
24985_ACEOF
24986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24987 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24988
24989cat >>confdefs.h <<\_ACEOF
24990#define HAVE_RL_CATCH_SIGNAL 1
24991_ACEOF
24992
24993fi
Benjamin Petersona8332062009-09-11 22:36:27 +000024994rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024995
24996fi
24997
Martin v. Löwis82bca632006-02-10 20:49:30 +000024998# End of readline checks: restore LIBS
24999LIBS=$LIBS_no_readline
25000
Benjamin Petersona8332062009-09-11 22:36:27 +000025001{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5
25002$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025003if test "${ac_cv_broken_nice+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000025004 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025005else
Martin v. Löwis11437992002-04-12 09:54:03 +000025006
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025007if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025008 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025009else
Martin v. Löwis11437992002-04-12 09:54:03 +000025010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025011/* confdefs.h. */
25012_ACEOF
25013cat confdefs.h >>conftest.$ac_ext
25014cat >>conftest.$ac_ext <<_ACEOF
25015/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025016
25017int main()
25018{
25019 int val1 = nice(1);
25020 if (val1 != -1 && val1 == nice(2))
25021 exit(0);
25022 exit(1);
25023}
25024
Martin v. Löwis11437992002-04-12 09:54:03 +000025025_ACEOF
25026rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025027if { (ac_try="$ac_link"
25028case "(($ac_try" in
25029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25030 *) ac_try_echo=$ac_try;;
25031esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025032eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25033$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025034 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025035 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000025036 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025037 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025038 { (case "(($ac_try" in
25039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25040 *) ac_try_echo=$ac_try;;
25041esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025042eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25043$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025044 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025045 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000025046 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025047 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025048 ac_cv_broken_nice=yes
25049else
Benjamin Petersona8332062009-09-11 22:36:27 +000025050 $as_echo "$as_me: program exited with status $ac_status" >&5
25051$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025052sed 's/^/| /' conftest.$ac_ext >&5
25053
Martin v. Löwis11437992002-04-12 09:54:03 +000025054( exit $ac_status )
25055ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025056fi
Benjamin Petersona8332062009-09-11 22:36:27 +000025057rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025058rm -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 +000025059fi
25060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025061
25062fi
25063
Benjamin Petersona8332062009-09-11 22:36:27 +000025064{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25065$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025066if test "$ac_cv_broken_nice" = yes
25067then
Martin v. Löwis11437992002-04-12 09:54:03 +000025068
25069cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025070#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025071_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025072
25073fi
25074
Benjamin Petersona8332062009-09-11 22:36:27 +000025075{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5
25076$as_echo_n "checking for broken poll()... " >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025077if test "$cross_compiling" = yes; then
25078 ac_cv_broken_poll=no
25079else
25080 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025081/* confdefs.h. */
25082_ACEOF
25083cat confdefs.h >>conftest.$ac_ext
25084cat >>conftest.$ac_ext <<_ACEOF
25085/* end confdefs.h. */
25086
25087#include <poll.h>
25088
25089int main (void)
25090 {
25091 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
25092
25093 close (42);
25094
25095 int poll_test = poll (&poll_struct, 1, 0);
25096
25097 if (poll_test < 0)
25098 {
25099 exit(0);
25100 }
25101 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
25102 {
25103 exit(0);
25104 }
25105 else
25106 {
25107 exit(1);
25108 }
25109 }
25110
25111_ACEOF
25112rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025113if { (ac_try="$ac_link"
25114case "(($ac_try" in
25115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25116 *) ac_try_echo=$ac_try;;
25117esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025118eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25119$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025120 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025121 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000025122 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025124 { (case "(($ac_try" in
25125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25126 *) ac_try_echo=$ac_try;;
25127esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025128eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25129$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025130 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025131 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000025132 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025133 (exit $ac_status); }; }; then
25134 ac_cv_broken_poll=yes
25135else
Benjamin Petersona8332062009-09-11 22:36:27 +000025136 $as_echo "$as_me: program exited with status $ac_status" >&5
25137$as_echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025138sed 's/^/| /' conftest.$ac_ext >&5
25139
25140( exit $ac_status )
25141ac_cv_broken_poll=no
25142fi
Benjamin Petersona8332062009-09-11 22:36:27 +000025143rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025144rm -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 +000025145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025146
25147
Benjamin Petersona8332062009-09-11 22:36:27 +000025148{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25149$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025150if test "$ac_cv_broken_poll" = yes
25151then
25152
25153cat >>confdefs.h <<\_ACEOF
25154#define HAVE_BROKEN_POLL 1
25155_ACEOF
25156
25157fi
25158
Brett Cannon43802422005-02-10 20:48:03 +000025159# 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 +000025160# (which is not required by ISO C or UNIX spec) and/or if we support
25161# tzname[]
Benjamin Petersona8332062009-09-11 22:36:27 +000025162{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25163$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025164if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000025165 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000025166else
25167 cat >conftest.$ac_ext <<_ACEOF
25168/* confdefs.h. */
25169_ACEOF
25170cat confdefs.h >>conftest.$ac_ext
25171cat >>conftest.$ac_ext <<_ACEOF
25172/* end confdefs.h. */
25173#include <sys/types.h>
25174#include <$ac_cv_struct_tm>
25175
25176
25177int
25178main ()
25179{
25180static struct tm ac_aggr;
25181if (ac_aggr.tm_zone)
25182return 0;
25183 ;
25184 return 0;
25185}
25186_ACEOF
25187rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025188if { (ac_try="$ac_compile"
25189case "(($ac_try" in
25190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25191 *) ac_try_echo=$ac_try;;
25192esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025193eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25194$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025195 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025196 ac_status=$?
25197 grep -v '^ *+' conftest.er1 >conftest.err
25198 rm -f conftest.er1
25199 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000025200 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025201 (exit $ac_status); } && {
25202 test -z "$ac_c_werror_flag" ||
25203 test ! -s conftest.err
25204 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025205 ac_cv_member_struct_tm_tm_zone=yes
25206else
Benjamin Petersona8332062009-09-11 22:36:27 +000025207 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025208sed 's/^/| /' conftest.$ac_ext >&5
25209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025210 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025211/* confdefs.h. */
25212_ACEOF
25213cat confdefs.h >>conftest.$ac_ext
25214cat >>conftest.$ac_ext <<_ACEOF
25215/* end confdefs.h. */
25216#include <sys/types.h>
25217#include <$ac_cv_struct_tm>
25218
25219
25220int
25221main ()
25222{
25223static struct tm ac_aggr;
25224if (sizeof ac_aggr.tm_zone)
25225return 0;
25226 ;
25227 return 0;
25228}
25229_ACEOF
25230rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025231if { (ac_try="$ac_compile"
25232case "(($ac_try" in
25233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25234 *) ac_try_echo=$ac_try;;
25235esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025236eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25237$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025238 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025239 ac_status=$?
25240 grep -v '^ *+' conftest.er1 >conftest.err
25241 rm -f conftest.er1
25242 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000025243 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025244 (exit $ac_status); } && {
25245 test -z "$ac_c_werror_flag" ||
25246 test ! -s conftest.err
25247 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025248 ac_cv_member_struct_tm_tm_zone=yes
25249else
Benjamin Petersona8332062009-09-11 22:36:27 +000025250 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025251sed 's/^/| /' conftest.$ac_ext >&5
25252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025253 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025255
25256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025258
25259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025260fi
Benjamin Petersona8332062009-09-11 22:36:27 +000025261{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25262$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
25263if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025264
25265cat >>confdefs.h <<_ACEOF
25266#define HAVE_STRUCT_TM_TM_ZONE 1
25267_ACEOF
25268
25269
25270fi
25271
25272if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25273
25274cat >>confdefs.h <<\_ACEOF
25275#define HAVE_TM_ZONE 1
25276_ACEOF
25277
25278else
Benjamin Petersona8332062009-09-11 22:36:27 +000025279 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25280$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025281if test "${ac_cv_have_decl_tzname+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000025282 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025283else
25284 cat >conftest.$ac_ext <<_ACEOF
25285/* confdefs.h. */
25286_ACEOF
25287cat confdefs.h >>conftest.$ac_ext
25288cat >>conftest.$ac_ext <<_ACEOF
25289/* end confdefs.h. */
25290#include <time.h>
25291
25292int
25293main ()
25294{
25295#ifndef tzname
25296 (void) tzname;
25297#endif
25298
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
Benjamin Petersona8332062009-09-11 22:36:27 +000025309eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25310$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025311 (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
Benjamin Petersona8332062009-09-11 22:36:27 +000025316 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025317 (exit $ac_status); } && {
25318 test -z "$ac_c_werror_flag" ||
25319 test ! -s conftest.err
25320 } && test -s conftest.$ac_objext; then
25321 ac_cv_have_decl_tzname=yes
25322else
Benjamin Petersona8332062009-09-11 22:36:27 +000025323 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025324sed 's/^/| /' conftest.$ac_ext >&5
25325
25326 ac_cv_have_decl_tzname=no
25327fi
25328
25329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25330fi
Benjamin Petersona8332062009-09-11 22:36:27 +000025331{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25332$as_echo "$ac_cv_have_decl_tzname" >&6; }
25333if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025334
25335cat >>confdefs.h <<_ACEOF
25336#define HAVE_DECL_TZNAME 1
25337_ACEOF
25338
25339
25340else
25341 cat >>confdefs.h <<_ACEOF
25342#define HAVE_DECL_TZNAME 0
25343_ACEOF
25344
25345
25346fi
25347
25348
Benjamin Petersona8332062009-09-11 22:36:27 +000025349 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
25350$as_echo_n "checking for tzname... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025351if test "${ac_cv_var_tzname+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000025352 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000025353else
25354 cat >conftest.$ac_ext <<_ACEOF
25355/* confdefs.h. */
25356_ACEOF
25357cat confdefs.h >>conftest.$ac_ext
25358cat >>conftest.$ac_ext <<_ACEOF
25359/* end confdefs.h. */
25360#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025361#if !HAVE_DECL_TZNAME
25362extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025363#endif
25364
25365int
25366main ()
25367{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025368return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025369 ;
25370 return 0;
25371}
25372_ACEOF
25373rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025374if { (ac_try="$ac_link"
25375case "(($ac_try" in
25376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25377 *) ac_try_echo=$ac_try;;
25378esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025379eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25380$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025381 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025382 ac_status=$?
25383 grep -v '^ *+' conftest.er1 >conftest.err
25384 rm -f conftest.er1
25385 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000025386 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025387 (exit $ac_status); } && {
25388 test -z "$ac_c_werror_flag" ||
25389 test ! -s conftest.err
Benjamin Petersona8332062009-09-11 22:36:27 +000025390 } && test -s conftest$ac_exeext && {
25391 test "$cross_compiling" = yes ||
25392 $as_test_x conftest$ac_exeext
25393 }; then
Brett Cannon43802422005-02-10 20:48:03 +000025394 ac_cv_var_tzname=yes
25395else
Benjamin Petersona8332062009-09-11 22:36:27 +000025396 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025397sed 's/^/| /' conftest.$ac_ext >&5
25398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025399 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025401
Benjamin Petersona8332062009-09-11 22:36:27 +000025402rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025404 conftest$ac_exeext conftest.$ac_ext
25405fi
Benjamin Petersona8332062009-09-11 22:36:27 +000025406{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25407$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025408 if test $ac_cv_var_tzname = yes; then
25409
25410cat >>confdefs.h <<\_ACEOF
25411#define HAVE_TZNAME 1
25412_ACEOF
25413
25414 fi
25415fi
25416
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025417
Martin v. Löwis1d459062005-03-14 21:23:33 +000025418# check tzset(3) exists and works like we expect it to
Benjamin Petersona8332062009-09-11 22:36:27 +000025419{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5
25420$as_echo_n "checking for working tzset()... " >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025421if test "${ac_cv_working_tzset+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000025422 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025423else
25424
25425if test "$cross_compiling" = yes; then
25426 ac_cv_working_tzset=no
25427else
25428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025429/* confdefs.h. */
25430_ACEOF
25431cat confdefs.h >>conftest.$ac_ext
25432cat >>conftest.$ac_ext <<_ACEOF
25433/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025434
25435#include <stdlib.h>
25436#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025437#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025438
25439#if HAVE_TZNAME
25440extern char *tzname[];
25441#endif
25442
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025443int main()
25444{
Brett Cannon18367812003-09-19 00:59:16 +000025445 /* Note that we need to ensure that not only does tzset(3)
25446 do 'something' with localtime, but it works as documented
25447 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025448 This includes making sure that tzname is set properly if
25449 tm->tm_zone does not exist since it is the alternative way
25450 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025451
25452 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025453 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025454 */
25455
Martin v. Löwis1d459062005-03-14 21:23:33 +000025456 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025457 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25458
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025459 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025460 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025461 if (localtime(&groundhogday)->tm_hour != 0)
25462 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025463#if HAVE_TZNAME
25464 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25465 if (strcmp(tzname[0], "UTC") ||
25466 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25467 exit(1);
25468#endif
Brett Cannon18367812003-09-19 00:59:16 +000025469
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025470 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025471 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025472 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025473 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025474#if HAVE_TZNAME
25475 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25476 exit(1);
25477#endif
Brett Cannon18367812003-09-19 00:59:16 +000025478
25479 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25480 tzset();
25481 if (localtime(&groundhogday)->tm_hour != 11)
25482 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025483#if HAVE_TZNAME
25484 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25485 exit(1);
25486#endif
25487
25488#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025489 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25490 exit(1);
25491 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25492 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025493#endif
Brett Cannon18367812003-09-19 00:59:16 +000025494
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025495 exit(0);
25496}
25497
25498_ACEOF
25499rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025500if { (ac_try="$ac_link"
25501case "(($ac_try" in
25502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25503 *) ac_try_echo=$ac_try;;
25504esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025505eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25506$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025507 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025508 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000025509 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025510 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025511 { (case "(($ac_try" in
25512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25513 *) ac_try_echo=$ac_try;;
25514esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025515eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25516$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025517 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025518 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000025519 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025520 (exit $ac_status); }; }; then
25521 ac_cv_working_tzset=yes
25522else
Benjamin Petersona8332062009-09-11 22:36:27 +000025523 $as_echo "$as_me: program exited with status $ac_status" >&5
25524$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025525sed 's/^/| /' conftest.$ac_ext >&5
25526
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025527( exit $ac_status )
25528ac_cv_working_tzset=no
25529fi
Benjamin Petersona8332062009-09-11 22:36:27 +000025530rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025531rm -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 +000025532fi
25533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025534
25535fi
25536
Benjamin Petersona8332062009-09-11 22:36:27 +000025537{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25538$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025539if test "$ac_cv_working_tzset" = yes
25540then
25541
25542cat >>confdefs.h <<\_ACEOF
25543#define HAVE_WORKING_TZSET 1
25544_ACEOF
25545
25546fi
25547
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025548# Look for subsecond timestamps in struct stat
Benjamin Petersona8332062009-09-11 22:36:27 +000025549{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25550$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025551if test "${ac_cv_stat_tv_nsec+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000025552 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025553else
25554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025555/* confdefs.h. */
25556_ACEOF
25557cat confdefs.h >>conftest.$ac_ext
25558cat >>conftest.$ac_ext <<_ACEOF
25559/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025560#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025561int
25562main ()
25563{
25564
25565struct stat st;
25566st.st_mtim.tv_nsec = 1;
25567
25568 ;
25569 return 0;
25570}
25571_ACEOF
25572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025573if { (ac_try="$ac_compile"
25574case "(($ac_try" in
25575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25576 *) ac_try_echo=$ac_try;;
25577esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025578eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25579$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025582 grep -v '^ *+' conftest.er1 >conftest.err
25583 rm -f conftest.er1
25584 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000025585 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025586 (exit $ac_status); } && {
25587 test -z "$ac_c_werror_flag" ||
25588 test ! -s conftest.err
25589 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025590 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025591else
Benjamin Petersona8332062009-09-11 22:36:27 +000025592 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025593sed 's/^/| /' conftest.$ac_ext >&5
25594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025595 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025596fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25599fi
25600
Benjamin Petersona8332062009-09-11 22:36:27 +000025601{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25602$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025603if test "$ac_cv_stat_tv_nsec" = yes
25604then
25605
25606cat >>confdefs.h <<\_ACEOF
25607#define HAVE_STAT_TV_NSEC 1
25608_ACEOF
25609
25610fi
25611
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025612# Look for BSD style subsecond timestamps in struct stat
Benjamin Petersona8332062009-09-11 22:36:27 +000025613{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25614$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025615if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000025616 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025617else
25618 cat >conftest.$ac_ext <<_ACEOF
25619/* confdefs.h. */
25620_ACEOF
25621cat confdefs.h >>conftest.$ac_ext
25622cat >>conftest.$ac_ext <<_ACEOF
25623/* end confdefs.h. */
25624#include <sys/stat.h>
25625int
25626main ()
25627{
25628
25629struct stat st;
25630st.st_mtimespec.tv_nsec = 1;
25631
25632 ;
25633 return 0;
25634}
25635_ACEOF
25636rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025637if { (ac_try="$ac_compile"
25638case "(($ac_try" in
25639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25640 *) ac_try_echo=$ac_try;;
25641esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025642eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25643$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025645 ac_status=$?
25646 grep -v '^ *+' conftest.er1 >conftest.err
25647 rm -f conftest.er1
25648 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000025649 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025650 (exit $ac_status); } && {
25651 test -z "$ac_c_werror_flag" ||
25652 test ! -s conftest.err
25653 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025654 ac_cv_stat_tv_nsec2=yes
25655else
Benjamin Petersona8332062009-09-11 22:36:27 +000025656 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025657sed 's/^/| /' conftest.$ac_ext >&5
25658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025659 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025660fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25663fi
25664
Benjamin Petersona8332062009-09-11 22:36:27 +000025665{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25666$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025667if test "$ac_cv_stat_tv_nsec2" = yes
25668then
25669
25670cat >>confdefs.h <<\_ACEOF
25671#define HAVE_STAT_TV_NSEC2 1
25672_ACEOF
25673
25674fi
25675
Jack Jansen666b1e72001-10-31 12:11:48 +000025676# On HP/UX 11.0, mvwdelch is a block with a return statement
Benjamin Petersona8332062009-09-11 22:36:27 +000025677{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25678$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025679if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000025680 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025681else
Martin v. Löwis11437992002-04-12 09:54:03 +000025682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025683/* confdefs.h. */
25684_ACEOF
25685cat confdefs.h >>conftest.$ac_ext
25686cat >>conftest.$ac_ext <<_ACEOF
25687/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025688#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025689int
25690main ()
25691{
Jack Jansen666b1e72001-10-31 12:11:48 +000025692
25693 int rtn;
25694 rtn = mvwdelch(0,0,0);
25695
Martin v. Löwis11437992002-04-12 09:54:03 +000025696 ;
25697 return 0;
25698}
25699_ACEOF
25700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025701if { (ac_try="$ac_compile"
25702case "(($ac_try" in
25703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25704 *) ac_try_echo=$ac_try;;
25705esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025706eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25707$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025710 grep -v '^ *+' conftest.er1 >conftest.err
25711 rm -f conftest.er1
25712 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000025713 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025714 (exit $ac_status); } && {
25715 test -z "$ac_c_werror_flag" ||
25716 test ! -s conftest.err
25717 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025718 ac_cv_mvwdelch_is_expression=yes
25719else
Benjamin Petersona8332062009-09-11 22:36:27 +000025720 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025721sed 's/^/| /' conftest.$ac_ext >&5
25722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025723 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025724fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25727fi
25728
Benjamin Petersona8332062009-09-11 22:36:27 +000025729{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25730$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025731
25732if test "$ac_cv_mvwdelch_is_expression" = yes
25733then
Martin v. Löwis11437992002-04-12 09:54:03 +000025734
25735cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025736#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025737_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025738
25739fi
25740
Benjamin Petersona8332062009-09-11 22:36:27 +000025741{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25742$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025743if test "${ac_cv_window_has_flags+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000025744 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025745else
Martin v. Löwis11437992002-04-12 09:54:03 +000025746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025747/* confdefs.h. */
25748_ACEOF
25749cat confdefs.h >>conftest.$ac_ext
25750cat >>conftest.$ac_ext <<_ACEOF
25751/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025752#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025753int
25754main ()
25755{
Jack Jansen666b1e72001-10-31 12:11:48 +000025756
25757 WINDOW *w;
25758 w->_flags = 0;
25759
Martin v. Löwis11437992002-04-12 09:54:03 +000025760 ;
25761 return 0;
25762}
25763_ACEOF
25764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025765if { (ac_try="$ac_compile"
25766case "(($ac_try" in
25767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25768 *) ac_try_echo=$ac_try;;
25769esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025770eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25771$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025774 grep -v '^ *+' conftest.er1 >conftest.err
25775 rm -f conftest.er1
25776 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000025777 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025778 (exit $ac_status); } && {
25779 test -z "$ac_c_werror_flag" ||
25780 test ! -s conftest.err
25781 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025782 ac_cv_window_has_flags=yes
25783else
Benjamin Petersona8332062009-09-11 22:36:27 +000025784 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025785sed 's/^/| /' conftest.$ac_ext >&5
25786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025787 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025788fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25791fi
25792
Benjamin Petersona8332062009-09-11 22:36:27 +000025793{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25794$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025795
Jack Jansen666b1e72001-10-31 12:11:48 +000025796
25797if test "$ac_cv_window_has_flags" = yes
25798then
Martin v. Löwis11437992002-04-12 09:54:03 +000025799
25800cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025801#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025802_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025803
25804fi
25805
Benjamin Petersona8332062009-09-11 22:36:27 +000025806{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5
25807$as_echo_n "checking for is_term_resized... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025808cat >conftest.$ac_ext <<_ACEOF
25809/* confdefs.h. */
25810_ACEOF
25811cat confdefs.h >>conftest.$ac_ext
25812cat >>conftest.$ac_ext <<_ACEOF
25813/* end confdefs.h. */
25814#include <curses.h>
25815int
25816main ()
25817{
25818void *x=is_term_resized
25819 ;
25820 return 0;
25821}
25822_ACEOF
25823rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025824if { (ac_try="$ac_compile"
25825case "(($ac_try" in
25826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25827 *) ac_try_echo=$ac_try;;
25828esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025829eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25830$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025831 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025832 ac_status=$?
25833 grep -v '^ *+' conftest.er1 >conftest.err
25834 rm -f conftest.er1
25835 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000025836 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025837 (exit $ac_status); } && {
25838 test -z "$ac_c_werror_flag" ||
25839 test ! -s conftest.err
25840 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025841
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025842cat >>confdefs.h <<\_ACEOF
25843#define HAVE_CURSES_IS_TERM_RESIZED 1
25844_ACEOF
25845
Benjamin Petersona8332062009-09-11 22:36:27 +000025846 { $as_echo "$as_me:$LINENO: result: yes" >&5
25847$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025848else
Benjamin Petersona8332062009-09-11 22:36:27 +000025849 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025850sed 's/^/| /' conftest.$ac_ext >&5
25851
Benjamin Petersona8332062009-09-11 22:36:27 +000025852 { $as_echo "$as_me:$LINENO: result: no" >&5
25853$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025854
25855fi
25856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25858
Benjamin Petersona8332062009-09-11 22:36:27 +000025859{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5
25860$as_echo_n "checking for resize_term... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025861cat >conftest.$ac_ext <<_ACEOF
25862/* confdefs.h. */
25863_ACEOF
25864cat confdefs.h >>conftest.$ac_ext
25865cat >>conftest.$ac_ext <<_ACEOF
25866/* end confdefs.h. */
25867#include <curses.h>
25868int
25869main ()
25870{
25871void *x=resize_term
25872 ;
25873 return 0;
25874}
25875_ACEOF
25876rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025877if { (ac_try="$ac_compile"
25878case "(($ac_try" in
25879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25880 *) ac_try_echo=$ac_try;;
25881esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025882eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25883$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025884 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025885 ac_status=$?
25886 grep -v '^ *+' conftest.er1 >conftest.err
25887 rm -f conftest.er1
25888 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000025889 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025890 (exit $ac_status); } && {
25891 test -z "$ac_c_werror_flag" ||
25892 test ! -s conftest.err
25893 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025894
25895cat >>confdefs.h <<\_ACEOF
25896#define HAVE_CURSES_RESIZE_TERM 1
25897_ACEOF
25898
Benjamin Petersona8332062009-09-11 22:36:27 +000025899 { $as_echo "$as_me:$LINENO: result: yes" >&5
25900$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025901else
Benjamin Petersona8332062009-09-11 22:36:27 +000025902 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025903sed 's/^/| /' conftest.$ac_ext >&5
25904
Benjamin Petersona8332062009-09-11 22:36:27 +000025905 { $as_echo "$as_me:$LINENO: result: no" >&5
25906$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025907
25908fi
25909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25911
Benjamin Petersona8332062009-09-11 22:36:27 +000025912{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5
25913$as_echo_n "checking for resizeterm... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025914cat >conftest.$ac_ext <<_ACEOF
25915/* confdefs.h. */
25916_ACEOF
25917cat confdefs.h >>conftest.$ac_ext
25918cat >>conftest.$ac_ext <<_ACEOF
25919/* end confdefs.h. */
25920#include <curses.h>
25921int
25922main ()
25923{
25924void *x=resizeterm
25925 ;
25926 return 0;
25927}
25928_ACEOF
25929rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025930if { (ac_try="$ac_compile"
25931case "(($ac_try" in
25932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25933 *) ac_try_echo=$ac_try;;
25934esac
Benjamin Petersona8332062009-09-11 22:36:27 +000025935eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25936$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025937 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025938 ac_status=$?
25939 grep -v '^ *+' conftest.er1 >conftest.err
25940 rm -f conftest.er1
25941 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000025942 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025943 (exit $ac_status); } && {
25944 test -z "$ac_c_werror_flag" ||
25945 test ! -s conftest.err
25946 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025947
25948cat >>confdefs.h <<\_ACEOF
25949#define HAVE_CURSES_RESIZETERM 1
25950_ACEOF
25951
Benjamin Petersona8332062009-09-11 22:36:27 +000025952 { $as_echo "$as_me:$LINENO: result: yes" >&5
25953$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025954else
Benjamin Petersona8332062009-09-11 22:36:27 +000025955 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025956sed 's/^/| /' conftest.$ac_ext >&5
25957
Benjamin Petersona8332062009-09-11 22:36:27 +000025958 { $as_echo "$as_me:$LINENO: result: no" >&5
25959$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025960
25961fi
25962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25964
Benjamin Petersona8332062009-09-11 22:36:27 +000025965{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25966$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025967
25968if test -r /dev/ptmx
25969then
Benjamin Petersona8332062009-09-11 22:36:27 +000025970 { $as_echo "$as_me:$LINENO: result: yes" >&5
25971$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025972
25973cat >>confdefs.h <<\_ACEOF
25974#define HAVE_DEV_PTMX 1
25975_ACEOF
25976
Thomas Wouters89f507f2006-12-13 04:49:30 +000025977else
Benjamin Petersona8332062009-09-11 22:36:27 +000025978 { $as_echo "$as_me:$LINENO: result: no" >&5
25979$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025980fi
25981
Benjamin Petersona8332062009-09-11 22:36:27 +000025982{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25983$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025984
25985if test -r /dev/ptc
25986then
Benjamin Petersona8332062009-09-11 22:36:27 +000025987 { $as_echo "$as_me:$LINENO: result: yes" >&5
25988$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025989
25990cat >>confdefs.h <<\_ACEOF
25991#define HAVE_DEV_PTC 1
25992_ACEOF
25993
Thomas Wouters89f507f2006-12-13 04:49:30 +000025994else
Benjamin Petersona8332062009-09-11 22:36:27 +000025995 { $as_echo "$as_me:$LINENO: result: no" >&5
25996$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025997fi
25998
Benjamin Petersona8332062009-09-11 22:36:27 +000025999{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26000$as_echo_n "checking for %zd printf() format support... " >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000026001if test "$cross_compiling" = yes; then
Benjamin Petersona8332062009-09-11 22:36:27 +000026002 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26004{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000026005See \`config.log' for more details." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000026006$as_echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000026007See \`config.log' for more details." >&2;}
Benjamin Petersona8332062009-09-11 22:36:27 +000026008 { (exit 1); exit 1; }; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000026009else
26010 cat >conftest.$ac_ext <<_ACEOF
26011/* confdefs.h. */
26012_ACEOF
26013cat confdefs.h >>conftest.$ac_ext
26014cat >>conftest.$ac_ext <<_ACEOF
26015/* end confdefs.h. */
26016#include <stdio.h>
26017#include <stddef.h>
26018#include <string.h>
26019
Christian Heimes2c181612007-12-17 20:04:13 +000026020#ifdef HAVE_SYS_TYPES_H
26021#include <sys/types.h>
26022#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026023
26024#ifdef HAVE_SSIZE_T
26025typedef ssize_t Py_ssize_t;
26026#elif SIZEOF_VOID_P == SIZEOF_LONG
26027typedef long Py_ssize_t;
26028#else
26029typedef int Py_ssize_t;
26030#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026031
Christian Heimes2c181612007-12-17 20:04:13 +000026032int main()
26033{
26034 char buffer[256];
26035
Thomas Wouters477c8d52006-05-27 19:21:47 +000026036 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26037 return 1;
26038
Thomas Wouters89f507f2006-12-13 04:49:30 +000026039 if (strcmp(buffer, "123"))
26040 return 1;
26041
26042 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26043 return 1;
26044
26045 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026046 return 1;
26047
26048 return 0;
26049}
26050_ACEOF
26051rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026052if { (ac_try="$ac_link"
26053case "(($ac_try" in
26054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26055 *) ac_try_echo=$ac_try;;
26056esac
Benjamin Petersona8332062009-09-11 22:36:27 +000026057eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26058$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026059 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026060 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000026061 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026062 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026063 { (case "(($ac_try" in
26064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26065 *) ac_try_echo=$ac_try;;
26066esac
Benjamin Petersona8332062009-09-11 22:36:27 +000026067eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26068$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026069 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026070 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000026071 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026072 (exit $ac_status); }; }; then
Benjamin Petersona8332062009-09-11 22:36:27 +000026073 { $as_echo "$as_me:$LINENO: result: yes" >&5
26074$as_echo "yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000026075
26076cat >>confdefs.h <<\_ACEOF
26077#define PY_FORMAT_SIZE_T "z"
26078_ACEOF
26079
26080else
Benjamin Petersona8332062009-09-11 22:36:27 +000026081 $as_echo "$as_me: program exited with status $ac_status" >&5
26082$as_echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026083sed 's/^/| /' conftest.$ac_ext >&5
26084
26085( exit $ac_status )
Benjamin Petersona8332062009-09-11 22:36:27 +000026086{ $as_echo "$as_me:$LINENO: result: no" >&5
26087$as_echo "no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000026088fi
Benjamin Petersona8332062009-09-11 22:36:27 +000026089rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000026091fi
26092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026093
26094
Benjamin Petersona8332062009-09-11 22:36:27 +000026095{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
26096$as_echo_n "checking for socklen_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026097if test "${ac_cv_type_socklen_t+set}" = set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000026098 $as_echo_n "(cached) " >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026099else
Benjamin Petersona8332062009-09-11 22:36:27 +000026100 ac_cv_type_socklen_t=no
26101cat >conftest.$ac_ext <<_ACEOF
26102/* confdefs.h. */
26103_ACEOF
26104cat confdefs.h >>conftest.$ac_ext
26105cat >>conftest.$ac_ext <<_ACEOF
26106/* end confdefs.h. */
26107
26108#ifdef HAVE_SYS_TYPES_H
26109#include <sys/types.h>
26110#endif
26111#ifdef HAVE_SYS_SOCKET_H
26112#include <sys/socket.h>
26113#endif
26114
26115
26116int
26117main ()
26118{
26119if (sizeof (socklen_t))
26120 return 0;
26121 ;
26122 return 0;
26123}
26124_ACEOF
26125rm -f conftest.$ac_objext
26126if { (ac_try="$ac_compile"
26127case "(($ac_try" in
26128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26129 *) ac_try_echo=$ac_try;;
26130esac
26131eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26132$as_echo "$ac_try_echo") >&5
26133 (eval "$ac_compile") 2>conftest.er1
26134 ac_status=$?
26135 grep -v '^ *+' conftest.er1 >conftest.err
26136 rm -f conftest.er1
26137 cat conftest.err >&5
26138 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26139 (exit $ac_status); } && {
26140 test -z "$ac_c_werror_flag" ||
26141 test ! -s conftest.err
26142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026144/* confdefs.h. */
26145_ACEOF
26146cat confdefs.h >>conftest.$ac_ext
26147cat >>conftest.$ac_ext <<_ACEOF
26148/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026149
26150#ifdef HAVE_SYS_TYPES_H
26151#include <sys/types.h>
26152#endif
26153#ifdef HAVE_SYS_SOCKET_H
26154#include <sys/socket.h>
26155#endif
26156
26157
Martin v. Löwis11437992002-04-12 09:54:03 +000026158int
26159main ()
26160{
Benjamin Petersona8332062009-09-11 22:36:27 +000026161if (sizeof ((socklen_t)))
26162 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026163 ;
26164 return 0;
26165}
26166_ACEOF
26167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026168if { (ac_try="$ac_compile"
26169case "(($ac_try" in
26170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26171 *) ac_try_echo=$ac_try;;
26172esac
Benjamin Petersona8332062009-09-11 22:36:27 +000026173eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26174$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026177 grep -v '^ *+' conftest.er1 >conftest.err
26178 rm -f conftest.er1
26179 cat conftest.err >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000026180 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026181 (exit $ac_status); } && {
26182 test -z "$ac_c_werror_flag" ||
26183 test ! -s conftest.err
26184 } && test -s conftest.$ac_objext; then
Benjamin Petersona8332062009-09-11 22:36:27 +000026185 :
Guido van Rossum95713eb2000-05-18 20:53:31 +000026186else
Benjamin Petersona8332062009-09-11 22:36:27 +000026187 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026188sed 's/^/| /' conftest.$ac_ext >&5
26189
Benjamin Petersona8332062009-09-11 22:36:27 +000026190 ac_cv_type_socklen_t=yes
26191fi
26192
26193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26194else
26195 $as_echo "$as_me: failed program was:" >&5
26196sed 's/^/| /' conftest.$ac_ext >&5
26197
26198
Guido van Rossum95713eb2000-05-18 20:53:31 +000026199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026200
26201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026202fi
Benjamin Petersona8332062009-09-11 22:36:27 +000026203{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26204$as_echo "$ac_cv_type_socklen_t" >&6; }
26205if test "x$ac_cv_type_socklen_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026206 :
26207else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026208
Martin v. Löwis01c04012002-11-11 14:58:44 +000026209cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026210#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026211_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026212
26213fi
26214
Michael W. Hudson54241132001-12-07 15:38:26 +000026215
Benjamin Petersona8332062009-09-11 22:36:27 +000026216{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26217$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026218if test "$cross_compiling" = yes; then
26219 ac_cv_broken_mbstowcs=no
26220else
26221 cat >conftest.$ac_ext <<_ACEOF
26222/* confdefs.h. */
26223_ACEOF
26224cat confdefs.h >>conftest.$ac_ext
26225cat >>conftest.$ac_ext <<_ACEOF
26226/* end confdefs.h. */
26227
26228#include<stdlib.h>
26229int main() {
26230 size_t len = -1;
26231 const char *str = "text";
26232 len = mbstowcs(NULL, str, 0);
26233 return (len != 4);
26234}
26235
26236_ACEOF
26237rm -f conftest$ac_exeext
26238if { (ac_try="$ac_link"
26239case "(($ac_try" in
26240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26241 *) ac_try_echo=$ac_try;;
26242esac
Benjamin Petersona8332062009-09-11 22:36:27 +000026243eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26244$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026245 (eval "$ac_link") 2>&5
26246 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000026247 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026248 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26249 { (case "(($ac_try" in
26250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26251 *) ac_try_echo=$ac_try;;
26252esac
Benjamin Petersona8332062009-09-11 22:36:27 +000026253eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26254$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026255 (eval "$ac_try") 2>&5
26256 ac_status=$?
Benjamin Petersona8332062009-09-11 22:36:27 +000026257 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026258 (exit $ac_status); }; }; then
26259 ac_cv_broken_mbstowcs=no
26260else
Benjamin Petersona8332062009-09-11 22:36:27 +000026261 $as_echo "$as_me: program exited with status $ac_status" >&5
26262$as_echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026263sed 's/^/| /' conftest.$ac_ext >&5
26264
26265( exit $ac_status )
26266ac_cv_broken_mbstowcs=yes
26267fi
Benjamin Petersona8332062009-09-11 22:36:27 +000026268rm -rf conftest.dSYM
Antoine Pitroufff95302008-09-03 18:58:51 +000026269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26270fi
26271
26272
Benjamin Petersona8332062009-09-11 22:36:27 +000026273{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26274$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026275if test "$ac_cv_broken_mbstowcs" = yes
26276then
26277
26278cat >>confdefs.h <<\_ACEOF
26279#define HAVE_BROKEN_MBSTOWCS 1
26280_ACEOF
26281
26282fi
26283
Antoine Pitroub52ec782009-01-25 16:34:23 +000026284# Check for --with-computed-gotos
Benjamin Petersona8332062009-09-11 22:36:27 +000026285{ $as_echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26286$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026287
26288# Check whether --with-computed-gotos was given.
26289if test "${with_computed_gotos+set}" = set; then
26290 withval=$with_computed_gotos;
26291if test "$withval" != no
26292then
26293
26294cat >>confdefs.h <<\_ACEOF
26295#define USE_COMPUTED_GOTOS 1
26296_ACEOF
26297
Benjamin Petersona8332062009-09-11 22:36:27 +000026298 { $as_echo "$as_me:$LINENO: result: yes" >&5
26299$as_echo "yes" >&6; }
26300else { $as_echo "$as_me:$LINENO: result: no" >&5
26301$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026302fi
26303else
Benjamin Petersona8332062009-09-11 22:36:27 +000026304 { $as_echo "$as_me:$LINENO: result: no" >&5
26305$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026306fi
26307
26308
26309
Michael W. Hudson54241132001-12-07 15:38:26 +000026310
26311
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026312for h in `(cd $srcdir;echo Python/thread_*.h)`
26313do
26314 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26315done
26316
Michael W. Hudson54241132001-12-07 15:38:26 +000026317
Neal Norwitzd24499d2005-12-18 21:36:39 +000026318SRCDIRS="Parser Grammar Objects Python Modules Mac"
Benjamin Petersona8332062009-09-11 22:36:27 +000026319{ $as_echo "$as_me:$LINENO: checking for build directories" >&5
26320$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026321for dir in $SRCDIRS; do
26322 if test ! -d $dir; then
26323 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026324 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026325done
Benjamin Petersona8332062009-09-11 22:36:27 +000026326{ $as_echo "$as_me:$LINENO: result: done" >&5
26327$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026328
Guido van Rossum627b2d71993-12-24 10:39:16 +000026329# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026330ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026331
Martin v. Löwis11437992002-04-12 09:54:03 +000026332cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026333# This file is a shell script that caches the results of configure
26334# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026335# scripts and configure runs, see configure's option --config-cache.
26336# It is not useful on other systems. If it contains results you don't
26337# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026338#
Martin v. Löwis11437992002-04-12 09:54:03 +000026339# config.status only pays attention to the cache file if you give it
26340# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026341#
Skip Montanaro6dead952003-09-25 14:50:04 +000026342# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026343# loading this file, other *unset* `ac_cv_foo' will be assigned the
26344# following values.
26345
26346_ACEOF
26347
Guido van Rossumf78abae1997-01-21 22:02:36 +000026348# The following way of writing the cache mishandles newlines in values,
26349# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026350# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026351# Ultrix sh set writes to stderr and can't be redirected directly,
26352# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026353(
26354 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26355 eval ac_val=\$$ac_var
26356 case $ac_val in #(
26357 *${as_nl}*)
26358 case $ac_var in #(
Benjamin Petersona8332062009-09-11 22:36:27 +000026359 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
26360$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026361 esac
26362 case $ac_var in #(
26363 _ | IFS | as_nl) ;; #(
Benjamin Petersona8332062009-09-11 22:36:27 +000026364 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026365 *) $as_unset $ac_var ;;
26366 esac ;;
26367 esac
26368 done
26369
Martin v. Löwis11437992002-04-12 09:54:03 +000026370 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026371 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26372 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026373 # `set' does not quote correctly, so add quotes (double-quote
26374 # substitution turns \\\\ into \\, and sed turns \\ into \).
26375 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026376 "s/'/'\\\\''/g;
26377 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026378 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026379 *)
26380 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026381 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026382 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026383 esac |
26384 sort
26385) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026386 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026387 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026388 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026389 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026390 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26391 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026392 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26393 :end' >>confcache
26394if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26395 if test -w "$cache_file"; then
26396 test "x$cache_file" != "x/dev/null" &&
Benjamin Petersona8332062009-09-11 22:36:27 +000026397 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
26398$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026399 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026400 else
Benjamin Petersona8332062009-09-11 22:36:27 +000026401 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26402$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026403 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026404fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026405rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026406
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026407test "x$prefix" = xNONE && prefix=$ac_default_prefix
26408# Let make expand exec_prefix.
26409test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026410
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026411DEFS=-DHAVE_CONFIG_H
26412
Skip Montanaro6dead952003-09-25 14:50:04 +000026413ac_libobjs=
26414ac_ltlibobjs=
26415for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26416 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026417 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Benjamin Petersona8332062009-09-11 22:36:27 +000026418 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026419 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26420 # will be set to the directory where LIBOBJS objects are built.
26421 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26422 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026423done
26424LIBOBJS=$ac_libobjs
26425
26426LTLIBOBJS=$ac_ltlibobjs
26427
26428
Martin v. Löwis11437992002-04-12 09:54:03 +000026429
Benjamin Petersona8332062009-09-11 22:36:27 +000026430
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026431: ${CONFIG_STATUS=./config.status}
Benjamin Petersona8332062009-09-11 22:36:27 +000026432ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000026433ac_clean_files_save=$ac_clean_files
26434ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Benjamin Petersona8332062009-09-11 22:36:27 +000026435{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26436$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26437cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026438#! $SHELL
26439# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026440# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026441# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026442# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026443
Martin v. Löwis11437992002-04-12 09:54:03 +000026444debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026445ac_cs_recheck=false
26446ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026447SHELL=\${CONFIG_SHELL-$SHELL}
26448_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026449
Benjamin Petersona8332062009-09-11 22:36:27 +000026450cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026451## --------------------- ##
26452## M4sh Initialization. ##
26453## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026455# Be more Bourne compatible
26456DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026457if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26458 emulate sh
26459 NULLCMD=:
Benjamin Petersona8332062009-09-11 22:36:27 +000026460 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026461 # is contrary to our usage. Disable this feature.
26462 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026463 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026464else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026465 case `(set -o) 2>/dev/null` in
26466 *posix*) set -o posix ;;
26467esac
26468
Michael W. Hudson54241132001-12-07 15:38:26 +000026469fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026470
26471
Michael W. Hudson54241132001-12-07 15:38:26 +000026472
Michael W. Hudson54241132001-12-07 15:38:26 +000026473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026474# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026475# Avoid depending upon Character Ranges.
26476as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26477as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26478as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26479as_cr_digits='0123456789'
26480as_cr_alnum=$as_cr_Letters$as_cr_digits
26481
Benjamin Petersona8332062009-09-11 22:36:27 +000026482as_nl='
26483'
26484export as_nl
26485# Printing a long string crashes Solaris 7 /usr/bin/printf.
26486as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26487as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26488as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26489if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26490 as_echo='printf %s\n'
26491 as_echo_n='printf %s'
26492else
26493 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26494 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26495 as_echo_n='/usr/ucb/echo -n'
26496 else
26497 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26498 as_echo_n_body='eval
26499 arg=$1;
26500 case $arg in
26501 *"$as_nl"*)
26502 expr "X$arg" : "X\\(.*\\)$as_nl";
26503 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26504 esac;
26505 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26506 '
26507 export as_echo_n_body
26508 as_echo_n='sh -c $as_echo_n_body as_echo'
26509 fi
26510 export as_echo_body
26511 as_echo='sh -c $as_echo_body as_echo'
26512fi
26513
Martin v. Löwis11437992002-04-12 09:54:03 +000026514# The user is always right.
26515if test "${PATH_SEPARATOR+set}" != set; then
Benjamin Petersona8332062009-09-11 22:36:27 +000026516 PATH_SEPARATOR=:
26517 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26518 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26519 PATH_SEPARATOR=';'
26520 }
Martin v. Löwis11437992002-04-12 09:54:03 +000026521fi
26522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026523# Support unset when possible.
26524if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26525 as_unset=unset
26526else
26527 as_unset=false
26528fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026530
26531# IFS
26532# We need space, tab and new line, in precisely that order. Quoting is
26533# there to prevent editors from complaining about space-tab.
26534# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26535# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026536IFS=" "" $as_nl"
26537
26538# Find who we are. Look in the path if we contain no directory separator.
26539case $0 in
26540 *[\\/]* ) as_myself=$0 ;;
26541 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026542for as_dir in $PATH
26543do
26544 IFS=$as_save_IFS
26545 test -z "$as_dir" && as_dir=.
26546 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26547done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026548IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026550 ;;
26551esac
26552# We did not find ourselves, most probably we were run as `sh COMMAND'
26553# in which case we are not to be found in the path.
26554if test "x$as_myself" = x; then
26555 as_myself=$0
26556fi
26557if test ! -f "$as_myself"; then
Benjamin Petersona8332062009-09-11 22:36:27 +000026558 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026559 { (exit 1); exit 1; }
26560fi
26561
26562# Work around bugs in pre-3.0 UWIN ksh.
26563for as_var in ENV MAIL MAILPATH
26564do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26565done
26566PS1='$ '
26567PS2='> '
26568PS4='+ '
26569
26570# NLS nuisances.
Benjamin Petersona8332062009-09-11 22:36:27 +000026571LC_ALL=C
26572export LC_ALL
26573LANGUAGE=C
26574export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026575
26576# Required to use basename.
26577if expr a : '\(a\)' >/dev/null 2>&1 &&
26578 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26579 as_expr=expr
26580else
26581 as_expr=false
26582fi
26583
26584if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26585 as_basename=basename
26586else
26587 as_basename=false
26588fi
26589
26590
26591# Name of the executable.
26592as_me=`$as_basename -- "$0" ||
26593$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26594 X"$0" : 'X\(//\)$' \| \
26595 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Petersona8332062009-09-11 22:36:27 +000026596$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026597 sed '/^.*\/\([^/][^/]*\)\/*$/{
26598 s//\1/
26599 q
26600 }
26601 /^X\/\(\/\/\)$/{
26602 s//\1/
26603 q
26604 }
26605 /^X\/\(\/\).*/{
26606 s//\1/
26607 q
26608 }
26609 s/.*/./; q'`
26610
26611# CDPATH.
26612$as_unset CDPATH
26613
26614
26615
Martin v. Löwis11437992002-04-12 09:54:03 +000026616 as_lineno_1=$LINENO
26617 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026618 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026619 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026620
Martin v. Löwis11437992002-04-12 09:54:03 +000026621 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26622 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026623 # line-number line after each line using $LINENO; the second 'sed'
26624 # does the real work. The second script uses 'N' to pair each
26625 # line-number line with the line containing $LINENO, and appends
26626 # trailing '-' during substitution so that $LINENO is not a special
26627 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026628 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026629 # scripts with optimization help from Paolo Bonzini. Blame Lee
26630 # E. McMahon (1931-1989) for sed's syntax. :-)
26631 sed -n '
26632 p
26633 /[$]LINENO/=
26634 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026635 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026636 s/[$]LINENO.*/&-/
26637 t lineno
26638 b
26639 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026640 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026641 :loop
26642 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026643 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026644 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026645 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026646 chmod +x "$as_me.lineno" ||
Benjamin Petersona8332062009-09-11 22:36:27 +000026647 { $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 +000026648 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026649
Martin v. Löwis11437992002-04-12 09:54:03 +000026650 # Don't try to exec as it changes $[0], causing all sort of problems
26651 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026652 # original and so on. Autoconf is especially sensitive to this).
26653 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026654 # Exit status is that of the last command.
26655 exit
26656}
26657
26658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026659if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26660 as_dirname=dirname
26661else
26662 as_dirname=false
26663fi
26664
26665ECHO_C= ECHO_N= ECHO_T=
26666case `echo -n x` in
26667-n*)
26668 case `echo 'x\c'` in
26669 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26670 *) ECHO_C='\c';;
26671 esac;;
26672*)
26673 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026674esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026675if expr a : '\(a\)' >/dev/null 2>&1 &&
26676 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026677 as_expr=expr
26678else
26679 as_expr=false
26680fi
26681
26682rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026683if test -d conf$$.dir; then
26684 rm -f conf$$.dir/conf$$.file
26685else
26686 rm -f conf$$.dir
Benjamin Petersona8332062009-09-11 22:36:27 +000026687 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026688fi
Benjamin Petersona8332062009-09-11 22:36:27 +000026689if (echo >conf$$.file) 2>/dev/null; then
26690 if ln -s conf$$.file conf$$ 2>/dev/null; then
26691 as_ln_s='ln -s'
26692 # ... but there are two gotchas:
26693 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26694 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26695 # In both cases, we have to default to `cp -p'.
26696 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26697 as_ln_s='cp -p'
26698 elif ln conf$$.file conf$$ 2>/dev/null; then
26699 as_ln_s=ln
26700 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026701 as_ln_s='cp -p'
Benjamin Petersona8332062009-09-11 22:36:27 +000026702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026703else
26704 as_ln_s='cp -p'
26705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026706rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26707rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026708
Skip Montanaro6dead952003-09-25 14:50:04 +000026709if mkdir -p . 2>/dev/null; then
26710 as_mkdir_p=:
26711else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026712 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026713 as_mkdir_p=false
26714fi
26715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026716if test -x / >/dev/null 2>&1; then
26717 as_test_x='test -x'
26718else
26719 if ls -dL / >/dev/null 2>&1; then
26720 as_ls_L_option=L
26721 else
26722 as_ls_L_option=
26723 fi
26724 as_test_x='
26725 eval sh -c '\''
26726 if test -d "$1"; then
Benjamin Petersona8332062009-09-11 22:36:27 +000026727 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026728 else
26729 case $1 in
Benjamin Petersona8332062009-09-11 22:36:27 +000026730 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026731 esac;
26732 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26733 ???[sx]*):;;*)false;;esac;fi
26734 '\'' sh
26735 '
26736fi
26737as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026738
26739# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026740as_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 +000026741
26742# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026743as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026744
26745
Martin v. Löwis11437992002-04-12 09:54:03 +000026746exec 6>&1
26747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026748# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026749# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026750# values after options handling.
26751ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026752This file was extended by python $as_me 3.1, which was
Benjamin Petersona8332062009-09-11 22:36:27 +000026753generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026754
26755 CONFIG_FILES = $CONFIG_FILES
26756 CONFIG_HEADERS = $CONFIG_HEADERS
26757 CONFIG_LINKS = $CONFIG_LINKS
26758 CONFIG_COMMANDS = $CONFIG_COMMANDS
26759 $ $0 $@
26760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026761on `(hostname || uname -n) 2>/dev/null | sed 1q`
26762"
26763
Martin v. Löwis11437992002-04-12 09:54:03 +000026764_ACEOF
26765
Benjamin Petersona8332062009-09-11 22:36:27 +000026766case $ac_config_files in *"
26767"*) set x $ac_config_files; shift; ac_config_files=$*;;
26768esac
26769
26770case $ac_config_headers in *"
26771"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26772esac
26773
26774
26775cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026776# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026777config_files="$ac_config_files"
26778config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026780_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026781
Benjamin Petersona8332062009-09-11 22:36:27 +000026782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026783ac_cs_usage="\
26784\`$as_me' instantiates files from templates according to the
26785current configuration.
26786
Benjamin Petersona8332062009-09-11 22:36:27 +000026787Usage: $0 [OPTION]... [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026788
26789 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026790 -V, --version print version number and configuration settings, then exit
Benjamin Petersona8332062009-09-11 22:36:27 +000026791 -q, --quiet, --silent
26792 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026793 -d, --debug don't remove temporary files
26794 --recheck update $as_me by reconfiguring in the same conditions
Benjamin Petersona8332062009-09-11 22:36:27 +000026795 --file=FILE[:TEMPLATE]
26796 instantiate the configuration file FILE
26797 --header=FILE[:TEMPLATE]
26798 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026799
26800Configuration files:
26801$config_files
26802
26803Configuration headers:
26804$config_headers
26805
26806Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026808_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000026809cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026810ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026811python config.status 3.1
Benjamin Petersona8332062009-09-11 22:36:27 +000026812configured by $0, generated by GNU Autoconf 2.63,
26813 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026814
Benjamin Petersona8332062009-09-11 22:36:27 +000026815Copyright (C) 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026816This config.status script is free software; the Free Software Foundation
26817gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026818
26819ac_pwd='$ac_pwd'
26820srcdir='$srcdir'
26821INSTALL='$INSTALL'
Benjamin Petersona8332062009-09-11 22:36:27 +000026822test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000026823_ACEOF
26824
Benjamin Petersona8332062009-09-11 22:36:27 +000026825cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26826# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000026827ac_need_defaults=:
26828while test $# != 0
26829do
26830 case $1 in
26831 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026832 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26833 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026834 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026835 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026836 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026837 ac_option=$1
26838 ac_optarg=$2
26839 ac_shift=shift
26840 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026841 esac
26842
Skip Montanaro6dead952003-09-25 14:50:04 +000026843 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026844 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026845 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26846 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026847 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Benjamin Petersona8332062009-09-11 22:36:27 +000026848 $as_echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026849 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026850 debug=: ;;
26851 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026852 $ac_shift
Benjamin Petersona8332062009-09-11 22:36:27 +000026853 case $ac_optarg in
26854 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26855 esac
26856 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026857 ac_need_defaults=false;;
26858 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026859 $ac_shift
Benjamin Petersona8332062009-09-11 22:36:27 +000026860 case $ac_optarg in
26861 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26862 esac
26863 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026864 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026865 --he | --h)
26866 # Conflict between --help and --header
Benjamin Petersona8332062009-09-11 22:36:27 +000026867 { $as_echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026868Try \`$0 --help' for more information." >&2
26869 { (exit 1); exit 1; }; };;
26870 --help | --hel | -h )
Benjamin Petersona8332062009-09-11 22:36:27 +000026871 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026872 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26873 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26874 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026875
26876 # This is an error.
Benjamin Petersona8332062009-09-11 22:36:27 +000026877 -*) { $as_echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026878Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026879 { (exit 1); exit 1; }; } ;;
26880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026881 *) ac_config_targets="$ac_config_targets $1"
26882 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026883
26884 esac
26885 shift
26886done
26887
Skip Montanaro6dead952003-09-25 14:50:04 +000026888ac_configure_extra_args=
26889
26890if $ac_cs_silent; then
26891 exec 6>/dev/null
26892 ac_configure_extra_args="$ac_configure_extra_args --silent"
26893fi
26894
26895_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000026896cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000026897if \$ac_cs_recheck; then
Benjamin Petersona8332062009-09-11 22:36:27 +000026898 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26899 shift
26900 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
26901 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026902 export CONFIG_SHELL
Benjamin Petersona8332062009-09-11 22:36:27 +000026903 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000026904fi
26905
Martin v. Löwis11437992002-04-12 09:54:03 +000026906_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000026907cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026908exec 5>>config.log
26909{
26910 echo
26911 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26912## Running $as_me. ##
26913_ASBOX
Benjamin Petersona8332062009-09-11 22:36:27 +000026914 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026915} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026917_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000026918cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026919_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026920
Benjamin Petersona8332062009-09-11 22:36:27 +000026921cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026922
26923# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026924for ac_config_target in $ac_config_targets
26925do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026926 case $ac_config_target in
26927 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26928 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26929 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026930 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26931 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026932 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26933 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026934 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026935
Benjamin Petersona8332062009-09-11 22:36:27 +000026936 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26937$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026938 { (exit 1); exit 1; }; };;
26939 esac
26940done
26941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026942
Martin v. Löwis11437992002-04-12 09:54:03 +000026943# If the user did not use the arguments to specify the items to instantiate,
26944# then the envvar interface is used. Set only those that are not.
26945# We use the long form for the default assignment because of an extremely
26946# bizarre bug on SunOS 4.1.3.
26947if $ac_need_defaults; then
26948 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26949 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26950fi
26951
Skip Montanaro6dead952003-09-25 14:50:04 +000026952# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026953# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026954# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026955# Hook for its removal unless debugging.
26956# Note that there is a small window in which the directory will not be cleaned:
26957# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026958$debug ||
26959{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026960 tmp=
26961 trap 'exit_status=$?
26962 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26963' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026964 trap '{ (exit 1); exit 1; }' 1 2 13 15
26965}
Martin v. Löwis11437992002-04-12 09:54:03 +000026966# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026967
Martin v. Löwis11437992002-04-12 09:54:03 +000026968{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026969 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026970 test -n "$tmp" && test -d "$tmp"
26971} ||
26972{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026973 tmp=./conf$$-$RANDOM
26974 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026975} ||
26976{
Benjamin Petersona8332062009-09-11 22:36:27 +000026977 $as_echo "$as_me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026978 { (exit 1); exit 1; }
26979}
26980
Benjamin Petersona8332062009-09-11 22:36:27 +000026981# Set up the scripts for CONFIG_FILES section.
26982# No need to generate them if there are no CONFIG_FILES.
26983# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026984if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026985
Benjamin Petersona8332062009-09-11 22:36:27 +000026986
26987ac_cr='
26988'
26989ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26990if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26991 ac_cs_awk_cr='\\r'
26992else
26993 ac_cs_awk_cr=$ac_cr
26994fi
26995
26996echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026997_ACEOF
26998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026999
Benjamin Petersona8332062009-09-11 22:36:27 +000027000{
27001 echo "cat >conf$$subs.awk <<_ACEOF" &&
27002 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27003 echo "_ACEOF"
27004} >conf$$subs.sh ||
27005 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27006$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
27007 { (exit 1); exit 1; }; }
27008ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027009ac_delim='%!_!# '
27010for ac_last_try in false false false false false :; do
Benjamin Petersona8332062009-09-11 22:36:27 +000027011 . ./conf$$subs.sh ||
27012 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27013$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
27014 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027015
Benjamin Petersona8332062009-09-11 22:36:27 +000027016 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27017 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027018 break
27019 elif $ac_last_try; then
Benjamin Petersona8332062009-09-11 22:36:27 +000027020 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27021$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027022 { (exit 1); exit 1; }; }
27023 else
27024 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027025 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027026done
Benjamin Petersona8332062009-09-11 22:36:27 +000027027rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027028
Benjamin Petersona8332062009-09-11 22:36:27 +000027029cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27030cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027031_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000027032sed -n '
27033h
27034s/^/S["/; s/!.*/"]=/
27035p
27036g
27037s/^[^!]*!//
27038:repl
27039t repl
27040s/'"$ac_delim"'$//
27041t delim
27042:nl
27043h
27044s/\(.\{148\}\).*/\1/
27045t more1
27046s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27047p
27048n
27049b repl
27050:more1
27051s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27052p
27053g
27054s/.\{148\}//
27055t nl
27056:delim
27057h
27058s/\(.\{148\}\).*/\1/
27059t more2
27060s/["\\]/\\&/g; s/^/"/; s/$/"/
27061p
27062b
27063:more2
27064s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27065p
27066g
27067s/.\{148\}//
27068t delim
27069' <conf$$subs.awk | sed '
27070/^[^""]/{
27071 N
27072 s/\n//
27073}
27074' >>$CONFIG_STATUS || ac_write_fail=1
27075rm -f conf$$subs.awk
27076cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27077_ACAWK
27078cat >>"\$tmp/subs1.awk" <<_ACAWK &&
27079 for (key in S) S_is_set[key] = 1
27080 FS = ""
27081
27082}
27083{
27084 line = $ 0
27085 nfields = split(line, field, "@")
27086 substed = 0
27087 len = length(field[1])
27088 for (i = 2; i < nfields; i++) {
27089 key = field[i]
27090 keylen = length(key)
27091 if (S_is_set[key]) {
27092 value = S[key]
27093 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27094 len += length(value) + length(field[++i])
27095 substed = 1
27096 } else
27097 len += 1 + keylen
27098 }
27099
27100 print line
27101}
27102
27103_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027104_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000027105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27106if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27107 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27108else
27109 cat
27110fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
27111 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
27112$as_echo "$as_me: error: could not setup config files machinery" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027113 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027114_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027115
27116# VPATH may cause trouble with some makes, so we remove $(srcdir),
27117# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27118# trailing colons and then remove the whole line if VPATH becomes empty
27119# (actually we leave an empty line to preserve line numbers).
27120if test "x$srcdir" = x.; then
27121 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27122s/:*\$(srcdir):*/:/
27123s/:*\${srcdir}:*/:/
27124s/:*@srcdir@:*/:/
27125s/^\([^=]*=[ ]*\):*/\1/
27126s/:*$//
27127s/^[^=]*=[ ]*$//
27128}'
27129fi
27130
Benjamin Petersona8332062009-09-11 22:36:27 +000027131cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027132fi # test -n "$CONFIG_FILES"
27133
Benjamin Petersona8332062009-09-11 22:36:27 +000027134# Set up the scripts for CONFIG_HEADERS section.
27135# No need to generate them if there are no CONFIG_HEADERS.
27136# This happens for instance with `./config.status Makefile'.
27137if test -n "$CONFIG_HEADERS"; then
27138cat >"$tmp/defines.awk" <<\_ACAWK ||
27139BEGIN {
27140_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027141
Benjamin Petersona8332062009-09-11 22:36:27 +000027142# Transform confdefs.h into an awk script `defines.awk', embedded as
27143# here-document in config.status, that substitutes the proper values into
27144# config.h.in to produce config.h.
27145
27146# Create a delimiter string that does not exist in confdefs.h, to ease
27147# handling of long lines.
27148ac_delim='%!_!# '
27149for ac_last_try in false false :; do
27150 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
27151 if test -z "$ac_t"; then
27152 break
27153 elif $ac_last_try; then
27154 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
27155$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
27156 { (exit 1); exit 1; }; }
27157 else
27158 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27159 fi
27160done
27161
27162# For the awk script, D is an array of macro values keyed by name,
27163# likewise P contains macro parameters if any. Preserve backslash
27164# newline sequences.
27165
27166ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27167sed -n '
27168s/.\{148\}/&'"$ac_delim"'/g
27169t rset
27170:rset
27171s/^[ ]*#[ ]*define[ ][ ]*/ /
27172t def
27173d
27174:def
27175s/\\$//
27176t bsnl
27177s/["\\]/\\&/g
27178s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27179D["\1"]=" \3"/p
27180s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
27181d
27182:bsnl
27183s/["\\]/\\&/g
27184s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27185D["\1"]=" \3\\\\\\n"\\/p
27186t cont
27187s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27188t cont
27189d
27190:cont
27191n
27192s/.\{148\}/&'"$ac_delim"'/g
27193t clear
27194:clear
27195s/\\$//
27196t bsnlc
27197s/["\\]/\\&/g; s/^/"/; s/$/"/p
27198d
27199:bsnlc
27200s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27201b cont
27202' <confdefs.h | sed '
27203s/'"$ac_delim"'/"\\\
27204"/g' >>$CONFIG_STATUS || ac_write_fail=1
27205
27206cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27207 for (key in D) D_is_set[key] = 1
27208 FS = ""
27209}
27210/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27211 line = \$ 0
27212 split(line, arg, " ")
27213 if (arg[1] == "#") {
27214 defundef = arg[2]
27215 mac1 = arg[3]
27216 } else {
27217 defundef = substr(arg[1], 2)
27218 mac1 = arg[2]
27219 }
27220 split(mac1, mac2, "(") #)
27221 macro = mac2[1]
27222 prefix = substr(line, 1, index(line, defundef) - 1)
27223 if (D_is_set[macro]) {
27224 # Preserve the white space surrounding the "#".
27225 print prefix "define", macro P[macro] D[macro]
27226 next
27227 } else {
27228 # Replace #undef with comments. This is necessary, for example,
27229 # in the case of _POSIX_SOURCE, which is predefined and required
27230 # on some systems where configure will not decide to define it.
27231 if (defundef == "undef") {
27232 print "/*", prefix defundef, macro, "*/"
27233 next
27234 }
27235 }
27236}
27237{ print }
27238_ACAWK
27239_ACEOF
27240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27241 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
27242$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
27243 { (exit 1); exit 1; }; }
27244fi # test -n "$CONFIG_HEADERS"
27245
27246
27247eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
27248shift
27249for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027250do
27251 case $ac_tag in
27252 :[FHLC]) ac_mode=$ac_tag; continue;;
27253 esac
27254 case $ac_mode$ac_tag in
27255 :[FHL]*:*);;
Benjamin Petersona8332062009-09-11 22:36:27 +000027256 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
27257$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027258 { (exit 1); exit 1; }; };;
27259 :[FH]-) ac_tag=-:-;;
27260 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27261 esac
27262 ac_save_IFS=$IFS
27263 IFS=:
27264 set x $ac_tag
27265 IFS=$ac_save_IFS
27266 shift
27267 ac_file=$1
27268 shift
27269
27270 case $ac_mode in
27271 :L) ac_source=$1;;
27272 :[FH])
27273 ac_file_inputs=
27274 for ac_f
27275 do
27276 case $ac_f in
27277 -) ac_f="$tmp/stdin";;
27278 *) # Look for the file first in the build tree, then in the source tree
27279 # (if the path is not absolute). The absolute path cannot be DOS-style,
27280 # because $ac_f cannot contain `:'.
27281 test -f "$ac_f" ||
27282 case $ac_f in
27283 [\\/$]*) false;;
27284 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27285 esac ||
Benjamin Petersona8332062009-09-11 22:36:27 +000027286 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27287$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027288 { (exit 1); exit 1; }; };;
27289 esac
Benjamin Petersona8332062009-09-11 22:36:27 +000027290 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27291 ac_file_inputs="$ac_file_inputs '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027292 done
27293
27294 # Let's still pretend it is `configure' which instantiates (i.e., don't
27295 # use $as_me), people would be surprised to read:
27296 # /* config.h. Generated by config.status. */
Benjamin Petersona8332062009-09-11 22:36:27 +000027297 configure_input='Generated from '`
27298 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27299 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027300 if test x"$ac_file" != x-; then
27301 configure_input="$ac_file. $configure_input"
Benjamin Petersona8332062009-09-11 22:36:27 +000027302 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
27303$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027304 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000027305 # Neutralize special characters interpreted by sed in replacement strings.
27306 case $configure_input in #(
27307 *\&* | *\|* | *\\* )
27308 ac_sed_conf_input=`$as_echo "$configure_input" |
27309 sed 's/[\\\\&|]/\\\\&/g'`;; #(
27310 *) ac_sed_conf_input=$configure_input;;
27311 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027312
27313 case $ac_tag in
Benjamin Petersona8332062009-09-11 22:36:27 +000027314 *:-:* | *:-) cat >"$tmp/stdin" \
27315 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27316$as_echo "$as_me: error: could not create $ac_file" >&2;}
27317 { (exit 1); exit 1; }; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027318 esac
27319 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027320 esac
27321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027322 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027323$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027324 X"$ac_file" : 'X\(//\)[^/]' \| \
27325 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027326 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Petersona8332062009-09-11 22:36:27 +000027327$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027328 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27329 s//\1/
27330 q
27331 }
27332 /^X\(\/\/\)[^/].*/{
27333 s//\1/
27334 q
27335 }
27336 /^X\(\/\/\)$/{
27337 s//\1/
27338 q
27339 }
27340 /^X\(\/\).*/{
27341 s//\1/
27342 q
27343 }
27344 s/.*/./; q'`
27345 { as_dir="$ac_dir"
27346 case $as_dir in #(
27347 -*) as_dir=./$as_dir;;
27348 esac
27349 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027350 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027351 while :; do
27352 case $as_dir in #(
Benjamin Petersona8332062009-09-11 22:36:27 +000027353 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027354 *) as_qdir=$as_dir;;
27355 esac
27356 as_dirs="'$as_qdir' $as_dirs"
27357 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027358$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027359 X"$as_dir" : 'X\(//\)[^/]' \| \
27360 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027361 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Petersona8332062009-09-11 22:36:27 +000027362$as_echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027363 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27364 s//\1/
27365 q
27366 }
27367 /^X\(\/\/\)[^/].*/{
27368 s//\1/
27369 q
27370 }
27371 /^X\(\/\/\)$/{
27372 s//\1/
27373 q
27374 }
27375 /^X\(\/\).*/{
27376 s//\1/
27377 q
27378 }
27379 s/.*/./; q'`
27380 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027382 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Petersona8332062009-09-11 22:36:27 +000027383 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27384$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027385 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027386 ac_builddir=.
27387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027388case "$ac_dir" in
27389.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27390*)
Benjamin Petersona8332062009-09-11 22:36:27 +000027391 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027392 # A ".." for each directory in $ac_dir_suffix.
Benjamin Petersona8332062009-09-11 22:36:27 +000027393 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027394 case $ac_top_builddir_sub in
27395 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27396 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27397 esac ;;
27398esac
27399ac_abs_top_builddir=$ac_pwd
27400ac_abs_builddir=$ac_pwd$ac_dir_suffix
27401# for backward compatibility:
27402ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027403
27404case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027405 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027406 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027407 ac_top_srcdir=$ac_top_builddir_sub
27408 ac_abs_top_srcdir=$ac_pwd ;;
27409 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027410 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027411 ac_top_srcdir=$srcdir
27412 ac_abs_top_srcdir=$srcdir ;;
27413 *) # Relative name.
27414 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27415 ac_top_srcdir=$ac_top_build_prefix$srcdir
27416 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027417esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027418ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027419
Martin v. Löwis11437992002-04-12 09:54:03 +000027420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027421 case $ac_mode in
27422 :F)
27423 #
27424 # CONFIG_FILE
27425 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027426
27427 case $INSTALL in
27428 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027429 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027430 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027431_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027432
Benjamin Petersona8332062009-09-11 22:36:27 +000027433cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027434# If the template does not know about datarootdir, expand it.
27435# FIXME: This hack should be removed a few years after 2.60.
27436ac_datarootdir_hack=; ac_datarootdir_seen=
27437
Benjamin Petersona8332062009-09-11 22:36:27 +000027438ac_sed_dataroot='
27439/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027440 p
27441 q
27442}
27443/@datadir@/p
27444/@docdir@/p
27445/@infodir@/p
27446/@localedir@/p
27447/@mandir@/p
Benjamin Petersona8332062009-09-11 22:36:27 +000027448'
27449case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027450*datarootdir*) ac_datarootdir_seen=yes;;
27451*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Benjamin Petersona8332062009-09-11 22:36:27 +000027452 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27453$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027454_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000027455cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027456 ac_datarootdir_hack='
27457 s&@datadir@&$datadir&g
27458 s&@docdir@&$docdir&g
27459 s&@infodir@&$infodir&g
27460 s&@localedir@&$localedir&g
27461 s&@mandir@&$mandir&g
27462 s&\\\${datarootdir}&$datarootdir&g' ;;
27463esac
27464_ACEOF
27465
27466# Neutralize VPATH when `$srcdir' = `.'.
27467# Shell code in configure.ac might set extrasub.
27468# FIXME: do we really want to maintain this feature?
Benjamin Petersona8332062009-09-11 22:36:27 +000027469cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27470ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027471$extrasub
27472_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +000027473cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027474:t
27475/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Benjamin Petersona8332062009-09-11 22:36:27 +000027476s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027477s&@top_builddir@&$ac_top_builddir_sub&;t t
Benjamin Petersona8332062009-09-11 22:36:27 +000027478s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027479s&@srcdir@&$ac_srcdir&;t t
27480s&@abs_srcdir@&$ac_abs_srcdir&;t t
27481s&@top_srcdir@&$ac_top_srcdir&;t t
27482s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27483s&@builddir@&$ac_builddir&;t t
27484s&@abs_builddir@&$ac_abs_builddir&;t t
27485s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27486s&@INSTALL@&$ac_INSTALL&;t t
27487$ac_datarootdir_hack
Benjamin Petersona8332062009-09-11 22:36:27 +000027488"
27489eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
27490 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27491$as_echo "$as_me: error: could not create $ac_file" >&2;}
27492 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027494test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27495 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27496 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Benjamin Petersona8332062009-09-11 22:36:27 +000027497 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027498which seems to be undefined. Please make sure it is defined." >&5
Benjamin Petersona8332062009-09-11 22:36:27 +000027499$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027500which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027502 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027503 case $ac_file in
Benjamin Petersona8332062009-09-11 22:36:27 +000027504 -) cat "$tmp/out" && rm -f "$tmp/out";;
27505 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
27506 esac \
27507 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27508$as_echo "$as_me: error: could not create $ac_file" >&2;}
27509 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027510 ;;
27511 :H)
27512 #
27513 # CONFIG_HEADER
27514 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027515 if test x"$ac_file" != x-; then
Benjamin Petersona8332062009-09-11 22:36:27 +000027516 {
27517 $as_echo "/* $configure_input */" \
27518 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
27519 } >"$tmp/config.h" \
27520 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27521$as_echo "$as_me: error: could not create $ac_file" >&2;}
27522 { (exit 1); exit 1; }; }
27523 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
27524 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27525$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027526 else
Benjamin Petersona8332062009-09-11 22:36:27 +000027527 rm -f "$ac_file"
27528 mv "$tmp/config.h" "$ac_file" \
27529 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27530$as_echo "$as_me: error: could not create $ac_file" >&2;}
27531 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027532 fi
27533 else
Benjamin Petersona8332062009-09-11 22:36:27 +000027534 $as_echo "/* $configure_input */" \
27535 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
27536 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
27537$as_echo "$as_me: error: could not create -" >&2;}
27538 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027539 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027540 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027542
27543 esac
27544
27545done # for ac_tag
27546
Guido van Rossum627b2d71993-12-24 10:39:16 +000027547
Martin v. Löwis11437992002-04-12 09:54:03 +000027548{ (exit 0); exit 0; }
27549_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027550chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027551ac_clean_files=$ac_clean_files_save
27552
Benjamin Petersona8332062009-09-11 22:36:27 +000027553test $ac_write_fail = 0 ||
27554 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
27555$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
27556 { (exit 1); exit 1; }; }
27557
Martin v. Löwis11437992002-04-12 09:54:03 +000027558
27559# configure is writing to config.log, and then calls config.status.
27560# config.status does its own redirection, appending to config.log.
27561# Unfortunately, on DOS this fails, as config.log is still kept open
27562# by configure, so config.status won't be able to write to it; its
27563# output is simply discarded. So we exec the FD to /dev/null,
27564# effectively closing config.log, so it can be properly (re)opened and
27565# appended to by config.status. When coming back to configure, we
27566# need to make the FD available again.
27567if test "$no_create" != yes; then
27568 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027569 ac_config_status_args=
27570 test "$silent" = yes &&
27571 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027572 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027573 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027574 exec 5>>config.log
27575 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27576 # would make configure fail if this is the last instruction.
27577 $ac_cs_success || { (exit 1); exit 1; }
27578fi
Benjamin Petersona8332062009-09-11 22:36:27 +000027579if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27580 { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27581$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27582fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027583
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027584
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027585echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027586if test ! -f Modules/Setup
27587then
27588 cp $srcdir/Modules/Setup.dist Modules/Setup
27589fi
27590
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027591echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027592if test ! -f Modules/Setup.local
27593then
27594 echo "# Edit this file for local setup changes" >Modules/Setup.local
27595fi
27596
27597echo "creating Makefile"
27598$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27599 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027600 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027601mv config.c Modules