blob: b9710be5750843a44a9a6179d9dbcc8c863ea9f8 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren3c064c12009-09-08 07:12:42 +00002# From configure.in Revision: 74682 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021 # Zsh 3.x and 4.x performs 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
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_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 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000619ac_subst_vars='SHELL
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000620PATH_SEPARATOR
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696GNULD
697RANLIB
698AR
699ARFLAGS
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
707UNIVERSAL_ARCH_FLAGS
708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001128 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001132# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001158 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 +00001159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001174 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001177 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 # Try the directory containing this script, then the parent directory.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001185 ac_confdir=`$as_dirname -- "$0" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001223 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001249\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001317 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001325 --enable-big-digits[=BITS]
1326 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001331 --with-universal-archs=ARCH
1332 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001333 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001334 --with-framework-name=FRAMEWORK
1335 specify an alternate name of the framework built
1336 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001337 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001338 --with-cxx-main=<compiler>
1339 compile main() and link python executable with C++
1340 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --with-suffix=.exe set executable suffix
1342 --with-pydebug build with Py_DEBUG defined
1343 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001344 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001345 --with-dbmliborder=db1:db2:...
1346 order to check db backends for dbm. Valid value is a
1347 colon separated string with the backend names
1348 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
1355 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
1359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001363 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001364 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1365 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367Some influential environment variables:
1368 CC C compiler command
1369 CFLAGS C compiler flags
1370 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1371 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 LIBS libraries to pass to the linker, e.g. -l<library>
1373 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1374 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 CPP C preprocessor
1376
1377Use these variables to override the choices made by `configure' or to help
1378it to find libraries and programs with nonstandard names/locations.
1379
Georg Brandle2e15612009-05-20 18:25:10 +00001380Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001383fi
1384
1385if test "$ac_init_help" = "recursive"; then
1386 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001388 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_builddir=.
1390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001391case "$ac_dir" in
1392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 case $ac_top_builddir_sub in
1398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1400 esac ;;
1401esac
1402ac_abs_top_builddir=$ac_pwd
1403ac_abs_builddir=$ac_pwd$ac_dir_suffix
1404# for backward compatibility:
1405ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001408 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 ac_top_srcdir=$ac_top_builddir_sub
1411 ac_abs_top_srcdir=$ac_pwd ;;
1412 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 ac_top_srcdir=$srcdir
1415 ac_abs_top_srcdir=$srcdir ;;
1416 *) # Relative name.
1417 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1418 ac_top_srcdir=$ac_top_build_prefix$srcdir
1419 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001420esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423 cd "$ac_dir" || { ac_status=$?; continue; }
1424 # Check for guested configure.
1425 if test -f "$ac_srcdir/configure.gnu"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1428 elif test -f "$ac_srcdir/configure"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001432 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 fi || ac_status=$?
1434 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 done
1436fi
1437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001439if $ac_init_version; then
1440 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001441python configure 3.2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001442generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014452002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This configure script is free software; the Free Software Foundation
1447gives unlimited permission to copy, distribute and modify it.
1448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This file contains any messages produced by compilers while
1453running configure, to aid debugging if configure makes a mistake.
1454
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001455It was created by python $as_me 3.2, which was
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001456generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458 $ $0 $@
1459
1460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001462{
1463cat <<_ASUNAME
1464## --------- ##
1465## Platform. ##
1466## --------- ##
1467
1468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1469uname -m = `(uname -m) 2>/dev/null || echo unknown`
1470uname -r = `(uname -r) 2>/dev/null || echo unknown`
1471uname -s = `(uname -s) 2>/dev/null || echo unknown`
1472uname -v = `(uname -v) 2>/dev/null || echo unknown`
1473
1474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1476
1477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1484
1485_ASUNAME
1486
1487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1488for as_dir in $PATH
1489do
1490 IFS=$as_save_IFS
1491 test -z "$as_dir" && as_dir=.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001492 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001493done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496} >&5
1497
1498cat >&5 <<_ACEOF
1499
1500
1501## ----------- ##
1502## Core tests. ##
1503## ----------- ##
1504
1505_ACEOF
1506
1507
1508# Keep a trace of the command line.
1509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001514ac_configure_args0=
1515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_must_keep_next=false
1517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001518do
Skip Montanaro6dead952003-09-25 14:50:04 +00001519 for ac_arg
1520 do
1521 case $ac_arg in
1522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1524 | -silent | --silent | --silen | --sile | --sil)
1525 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 *\'*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001527 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 esac
1529 case $ac_pass in
1530 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1531 2)
1532 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 case $ac_arg in
1537 *=* | --config-cache | -C | -disable-* | --disable-* \
1538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1540 | -with-* | --with-* | -without-* | --without-* | --x)
1541 case "$ac_configure_args0 " in
1542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1543 esac
1544 ;;
1545 -* ) ac_must_keep_next=true ;;
1546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 ;;
1550 esac
1551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001552done
Skip Montanaro6dead952003-09-25 14:50:04 +00001553$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1554$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 +00001555
1556# When interrupted or exit'd, cleanup temporary files, and complete
1557# config.log. We remove comments because anyway the quotes in there
1558# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559# WARNING: Use '\'' to represent an apostrophe within the trap.
1560# 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 +00001561trap 'exit_status=$?
1562 # Save into config.log some information that might help in debugging.
1563 {
1564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001565
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 cat <<\_ASBOX
1567## ---------------- ##
1568## Cache variables. ##
1569## ---------------- ##
1570_ASBOX
1571 echo
1572 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573(
1574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1575 eval ac_val=\$$ac_var
1576 case $ac_val in #(
1577 *${as_nl}*)
1578 case $ac_var in #(
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001579 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1580echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 esac
1582 case $ac_var in #(
1583 _ | IFS | as_nl) ;; #(
1584 *) $as_unset $ac_var ;;
1585 esac ;;
1586 esac
1587 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1590 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 "s/'\''/'\''\\\\'\'''\''/g;
1593 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1594 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001595 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 esac |
1599 sort
1600)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001602
1603 cat <<\_ASBOX
1604## ----------------- ##
1605## Output variables. ##
1606## ----------------- ##
1607_ASBOX
1608 echo
1609 for ac_var in $ac_subst_vars
1610 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 eval ac_val=\$$ac_var
1612 case $ac_val in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001615 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001616 done | sort
1617 echo
1618
1619 if test -n "$ac_subst_files"; then
1620 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621## ------------------- ##
1622## File substitutions. ##
1623## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001624_ASBOX
1625 echo
1626 for ac_var in $ac_subst_files
1627 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 eval ac_val=\$$ac_var
1629 case $ac_val in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001630 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001632 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001633 done | sort
1634 echo
1635 fi
1636
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 if test -s confdefs.h; then
1638 cat <<\_ASBOX
1639## ----------- ##
1640## confdefs.h. ##
1641## ----------- ##
1642_ASBOX
1643 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 echo
1646 fi
1647 test "$ac_signal" != 0 &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001648 echo "$as_me: caught signal $ac_signal"
1649 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 rm -f core *.core core.conftest.* &&
1652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001655for ac_signal in 1 2 13 15; do
1656 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1657done
1658ac_signal=0
1659
1660# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# Predefined preprocessor variables.
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_NAME "$PACKAGE_NAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_VERSION "$PACKAGE_VERSION"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_STRING "$PACKAGE_STRING"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1687_ACEOF
1688
1689
1690# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001691# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692if test -n "$CONFIG_SITE"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001693 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694elif test "x$prefix" != xNONE; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001695 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001697 set x "$ac_default_prefix/share/config.site" \
1698 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001700shift
1701for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 if test -r "$ac_site_file"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001704 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1705echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 . "$ac_site_file"
1708 fi
1709done
1710
1711if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 # Some versions of bash will fail to source /dev/null (special
1713 # files actually), so we avoid doing that.
1714 if test -f "$cache_file"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001715 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1716echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 esac
1721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001723 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1724echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 >$cache_file
1726fi
1727
1728# Check that the precious variables saved in the cache have kept the same
1729# value.
1730ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1733 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 case $ac_old_set,$ac_new_set in
1737 set,)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1739echo "$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 +00001740 ac_cache_corrupted=: ;;
1741 ,set)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_cache_corrupted=: ;;
1745 ,);;
1746 *)
1747 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1751echo "$as_me: former value: $ac_old_val" >&2;}
1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1753echo "$as_me: current value: $ac_new_val" >&2;}
1754 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 fi;;
1756 esac
1757 # Pass precious variables to config.status.
1758 if test "$ac_new_set" = set; then
1759 case $ac_new_val in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 *) ac_arg=$ac_var=$ac_new_val ;;
1762 esac
1763 case " $ac_configure_args " in
1764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1765 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1766 esac
1767 fi
1768done
1769if $ac_cache_corrupted; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001774 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775fi
1776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
Guido van Rossum7f43da71994-08-01 12:15:30 +00001801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807
Michael W. Hudson54241132001-12-07 15:38:26 +00001808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001810
1811
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
Benjamin Petersond23f8222009-04-05 19:13:16 +00001813if test "$prefix" != "/"; then
1814 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1815fi
1816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
1819
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001821
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001822# We don't use PACKAGE_ variables, and they cause conflicts
1823# with other autoconf-based packages that include Python.h
1824grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1825rm confdefs.h
1826mv confdefs.h.new confdefs.h
1827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001829VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwis1142de32002-03-29 16:28:31 +00001831
1832SOVERSION=1.0
1833
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001834# The later defininition of _XOPEN_SOURCE disables certain features
1835# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1836
1837cat >>confdefs.h <<\_ACEOF
1838#define _GNU_SOURCE 1
1839_ACEOF
1840
1841
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001842# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1843# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1844# them.
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _NETBSD_SOURCE 1
1848_ACEOF
1849
1850
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define __BSD_VISIBLE 1
1857_ACEOF
1858
1859
Martin v. Löwisd6320502004-08-12 13:45:08 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1862
1863cat >>confdefs.h <<\_ACEOF
1864#define _BSD_TYPES 1
1865_ACEOF
1866
1867
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001868# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1869# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1870# them.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _DARWIN_C_SOURCE 1
1874_ACEOF
1875
1876
1877
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001878define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001879
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001880# Arguments passed to configure.
1881
1882CONFIG_ARGS="$ac_configure_args"
1883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001884# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001885if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887 case $enableval in
1888 yes)
1889 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1890 ;;
1891 esac
1892 case $enableval in
1893 no)
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896 ;;
1897 *)
1898 UNIVERSALSDK=$enableval
1899 ;;
1900 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001901
Thomas Wouters477c8d52006-05-27 19:21:47 +00001902else
1903
1904 UNIVERSALSDK=
1905 enable_universalsdk=
1906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001907fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908
1909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001910
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001911
1912
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001913UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001914{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1915echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001916
1917# Check whether --with-universal-archs was given.
1918if test "${with_universal_archs+set}" = set; then
1919 withval=$with_universal_archs;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001920 { echo "$as_me:$LINENO: result: $withval" >&5
1921echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001922 UNIVERSAL_ARCHS="$withval"
1923
1924else
1925
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001926 { echo "$as_me:$LINENO: result: 32-bit" >&5
1927echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001928
1929fi
1930
1931
1932
1933
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001934
1935# Check whether --with-framework-name was given.
1936if test "${with_framework_name+set}" = set; then
1937 withval=$with_framework_name;
1938 PYTHONFRAMEWORK=${withval}
1939 PYTHONFRAMEWORKDIR=${withval}.framework
1940 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1941
1942else
1943
1944 PYTHONFRAMEWORK=Python
1945 PYTHONFRAMEWORKDIR=Python.framework
1946 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1947
1948fi
1949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001950# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001951if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001952 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001953 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001955 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001956 esac
1957 case $enableval in
1958 no)
1959 PYTHONFRAMEWORK=
1960 PYTHONFRAMEWORKDIR=no-framework
1961 PYTHONFRAMEWORKPREFIX=
1962 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001963 FRAMEWORKINSTALLFIRST=
1964 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001965 FRAMEWORKALTINSTALLFIRST=
1966 FRAMEWORKALTINSTALLLAST=
1967 if test "x${prefix}" = "xNONE"; then
1968 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1969 else
1970 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1971 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001972 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001973 ;;
1974 *)
1975 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001977 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001978 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001979 if test "$UNIVERSAL_ARCHS" = "all"
1980 then
1981 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001982 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001983 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1986 fi
1987
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001988 if test "x${prefix}" = "xNONE" ; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001995 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001999 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002000
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
2017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024 if test "$UNIVERSAL_ARCHS" = "all"
2025 then
2026 FRAMEWORKINSTALLLAST=update4wayuniversal
2027 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2028 fi
2029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002030fi
2031
Thomas Wouters477c8d52006-05-27 19:21:47 +00002032
2033
Michael W. Hudson54241132001-12-07 15:38:26 +00002034
2035
2036
2037
Jack Jansene578a632001-08-15 01:27:14 +00002038
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002039
2040
2041
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002042
Jack Jansene578a632001-08-15 01:27:14 +00002043##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002044## AC_HELP_STRING(--with-dyld,
2045## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002046##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002047# Set name for machine-dependent library files
2048
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002049{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2050echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051if test -z "$MACHDEP"
2052then
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002054 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2055 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002056 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002060 ac_md_system=`echo $ac_sys_system |
2061 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2062 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002063 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002065
Guido van Rossum07397971997-04-29 21:49:50 +00002066 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002067 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002068 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002069 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002070 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002071 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072 esac
2073fi
Guido van Rossum91922671997-10-09 20:24:13 +00002074
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002075# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2076# disable features if it is defined, without any means to access these
2077# features as extensions. For these systems, we skip the definition of
2078# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2079# some feature, make sure there is no alternative way to access this
2080# feature. Also, when using wildcards, make sure you have verified the
2081# need for not defining _XOPEN_SOURCE on all systems matching the
2082# wildcard, and that the wildcard does not include future systems
2083# (which may remove their limitations).
2084case $ac_sys_system/$ac_sys_release in
2085 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2086 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002087 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002088 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002089 define_xopen_source=no
2090 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2091 # also defined. This can be overridden by defining _BSD_SOURCE
2092 # As this has a different meaning on Linux, only define it on OpenBSD
2093
2094cat >>confdefs.h <<\_ACEOF
2095#define _BSD_SOURCE 1
2096_ACEOF
2097
2098 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002099 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2100 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2101 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002102 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 +00002103 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002104 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2105 # of union __?sigval. Reported by Stuart Bishop.
2106 SunOS/5.6)
2107 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002108 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2109 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002110 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002111 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002112 define_xopen_source=no;;
2113 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002115 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002116 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002117 # On FreeBSD 4, the math functions C89 does not cover are never defined
2118 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2119 FreeBSD/4.*)
2120 define_xopen_source=no;;
2121 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2122 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2123 # identifies itself as Darwin/7.*
2124 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # disables platform specific features beyond repair.
2126 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2127 # has no effect, don't bother defining them
2128 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002133 AIX/4)
2134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 AIX/5)
2136 if test `uname -r` -eq 1; then
2137 define_xopen_source=no
2138 fi
2139 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2141 # defining NI_NUMERICHOST.
2142 QNX/6.3.2)
2143 define_xopen_source=no
2144 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002146esac
2147
2148if test $define_xopen_source = yes
2149then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002150 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2151 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002152 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2153 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002155 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002156
2157cat >>confdefs.h <<\_ACEOF
2158#define _XOPEN_SOURCE 500
2159_ACEOF
2160
2161 ;;
2162 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002163
2164cat >>confdefs.h <<\_ACEOF
2165#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002166_ACEOF
2167
Skip Montanarof0d5f792004-08-15 14:08:23 +00002168 ;;
2169 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002170
2171 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2172 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2173 # several APIs are not declared. Since this is also needed in some
2174 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002175 # except for Solaris 10, where it must not be defined,
2176 # as it implies XPG4.2
2177 case $ac_sys_system/$ac_sys_release in
2178 SunOS/5.10)
2179 ;;
2180 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181
2182cat >>confdefs.h <<\_ACEOF
2183#define _XOPEN_SOURCE_EXTENDED 1
2184_ACEOF
2185
Martin v. Löwis7dece662005-11-26 11:38:24 +00002186 ;;
2187 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002189
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002190cat >>confdefs.h <<\_ACEOF
2191#define _POSIX_C_SOURCE 200112L
2192_ACEOF
2193
2194
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002195fi
2196
Guido van Rossum91922671997-10-09 20:24:13 +00002197#
2198# SGI compilers allow the specification of the both the ABI and the
2199# ISA on the command line. Depending on the values of these switches,
2200# different and often incompatable code will be generated.
2201#
2202# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2203# thus supply support for various ABI/ISA combinations. The MACHDEP
2204# variable is also adjusted.
2205#
2206
2207if test ! -z "$SGI_ABI"
2208then
2209 CC="cc $SGI_ABI"
2210 LDFLAGS="$SGI_ABI $LDFLAGS"
2211 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2212fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002213{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2214echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002215
Jack Jansen6b08a402004-06-03 12:41:45 +00002216# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2217# it may influence the way we can build extensions, so distutils
2218# needs to check it
2219
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220
Jack Jansen6b08a402004-06-03 12:41:45 +00002221CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002222EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002223
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002224{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2225echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002226ac_sys_machine=`uname -m`
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002227{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2228echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002229
Guido van Rossum627b2d71993-12-24 10:39:16 +00002230# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002231
2232# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2233# for debug/optimization stuff. BASECFLAGS is for flags that are required
2234# just to get things to compile and link. Users are free to override OPT
2235# when running configure or make. The build should not break if they do.
2236# BASECFLAGS should generally not be messed with, however.
2237
2238# XXX shouldn't some/most/all of this code be merged with the stuff later
2239# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002240{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2241echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002243# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002244if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002245 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002246 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002247 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002248 without_gcc=yes;;
2249 yes) CC=gcc
2250 without_gcc=no;;
2251 *) CC=$withval
2252 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002253 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002254else
Martin v. Löwis11437992002-04-12 09:54:03 +00002255
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002256 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002257 AIX*) CC=cc_r
2258 without_gcc=;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002259 Monterey*)
2260 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002261 without_gcc=;;
2262 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002263 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002264fi
2265
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002266{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2267echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002268
Guido van Rossum8b131c51995-03-09 14:10:13 +00002269# If the user switches compilers, we can't believe the cache
2270if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2271then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002272 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002273(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002274echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002275(it is also a good idea to do 'make clean' before compiling)" >&2;}
2276 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002277fi
2278
Martin v. Löwis11437992002-04-12 09:54:03 +00002279ac_ext=c
2280ac_cpp='$CPP $CPPFLAGS'
2281ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2282ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2283ac_compiler_gnu=$ac_cv_c_compiler_gnu
2284if test -n "$ac_tool_prefix"; then
2285 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2286set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002287{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2288echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002289if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002290 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002291else
2292 if test -n "$CC"; then
2293 ac_cv_prog_CC="$CC" # Let the user override the test.
2294else
Martin v. Löwis11437992002-04-12 09:54:03 +00002295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2296for as_dir in $PATH
2297do
2298 IFS=$as_save_IFS
2299 test -z "$as_dir" && as_dir=.
2300 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002301 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 +00002302 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002303 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002304 break 2
2305 fi
2306done
2307done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002308IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002309
Jack Jansendd19cf82001-12-06 22:36:17 +00002310fi
2311fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002312CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002313if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002314 { echo "$as_me:$LINENO: result: $CC" >&5
2315echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002316else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002317 { echo "$as_me:$LINENO: result: no" >&5
2318echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002319fi
2320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002321
Martin v. Löwis11437992002-04-12 09:54:03 +00002322fi
2323if test -z "$ac_cv_prog_CC"; then
2324 ac_ct_CC=$CC
2325 # Extract the first word of "gcc", so it can be a program name with args.
2326set dummy gcc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002327{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2328echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002329if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002330 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002331else
2332 if test -n "$ac_ct_CC"; then
2333 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2334else
2335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2336for as_dir in $PATH
2337do
2338 IFS=$as_save_IFS
2339 test -z "$as_dir" && as_dir=.
2340 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002341 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 +00002342 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002343 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002344 break 2
2345 fi
2346done
2347done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002349
2350fi
2351fi
2352ac_ct_CC=$ac_cv_prog_ac_ct_CC
2353if test -n "$ac_ct_CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002354 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2355echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002356else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002357 { echo "$as_me:$LINENO: result: no" >&5
2358echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002359fi
2360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002361 if test "x$ac_ct_CC" = x; then
2362 CC=""
2363 else
2364 case $cross_compiling:$ac_tool_warned in
2365yes:)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002366{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2367whose name does not start with the host triplet. If you think this
2368configuration is useful to you, please write to autoconf@gnu.org." >&5
2369echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2370whose name does not start with the host triplet. If you think this
2371configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372ac_tool_warned=yes ;;
2373esac
2374 CC=$ac_ct_CC
2375 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002376else
2377 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002378fi
2379
Jack Jansendd19cf82001-12-06 22:36:17 +00002380if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381 if test -n "$ac_tool_prefix"; then
2382 # 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 +00002383set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002384{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2385echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002386if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002387 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002388else
2389 if test -n "$CC"; then
2390 ac_cv_prog_CC="$CC" # Let the user override the test.
2391else
Martin v. Löwis11437992002-04-12 09:54:03 +00002392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2393for as_dir in $PATH
2394do
2395 IFS=$as_save_IFS
2396 test -z "$as_dir" && as_dir=.
2397 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002398 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 +00002399 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002400 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002401 break 2
2402 fi
2403done
2404done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002405IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002406
2407fi
2408fi
2409CC=$ac_cv_prog_CC
2410if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002411 { echo "$as_me:$LINENO: result: $CC" >&5
2412echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002414 { echo "$as_me:$LINENO: result: no" >&5
2415echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002416fi
2417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418
Martin v. Löwis11437992002-04-12 09:54:03 +00002419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002420fi
2421if test -z "$CC"; then
2422 # Extract the first word of "cc", so it can be a program name with args.
2423set dummy cc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002424{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2425echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002426if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002427 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002428else
2429 if test -n "$CC"; then
2430 ac_cv_prog_CC="$CC" # Let the user override the test.
2431else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002432 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2434for as_dir in $PATH
2435do
2436 IFS=$as_save_IFS
2437 test -z "$as_dir" && as_dir=.
2438 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439 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 +00002440 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2441 ac_prog_rejected=yes
2442 continue
2443 fi
2444 ac_cv_prog_CC="cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002445 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 break 2
2447 fi
2448done
2449done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002450IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002451
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002452if test $ac_prog_rejected = yes; then
2453 # We found a bogon in the path, so make sure we never use it.
2454 set dummy $ac_cv_prog_CC
2455 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002457 # We chose a different compiler from the bogus one.
2458 # However, it has the same basename, so the bogon will be chosen
2459 # first if we set CC to just the basename; use the full file name.
2460 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462 fi
2463fi
2464fi
2465fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002466CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002467if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002468 { echo "$as_me:$LINENO: result: $CC" >&5
2469echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002470else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002471 { echo "$as_me:$LINENO: result: no" >&5
2472echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002473fi
2474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475
Martin v. Löwis11437992002-04-12 09:54:03 +00002476fi
2477if test -z "$CC"; then
2478 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 do
2481 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2482set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002483{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2484echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002485if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002487else
2488 if test -n "$CC"; then
2489 ac_cv_prog_CC="$CC" # Let the user override the test.
2490else
Martin v. Löwis11437992002-04-12 09:54:03 +00002491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2492for as_dir in $PATH
2493do
2494 IFS=$as_save_IFS
2495 test -z "$as_dir" && as_dir=.
2496 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 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 +00002498 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002499 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002501 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002502done
2503done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
2506fi
2507fi
2508CC=$ac_cv_prog_CC
2509if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002510 { echo "$as_me:$LINENO: result: $CC" >&5
2511echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002512else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002513 { echo "$as_me:$LINENO: result: no" >&5
2514echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002515fi
2516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 test -n "$CC" && break
2519 done
2520fi
2521if test -z "$CC"; then
2522 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002524do
2525 # Extract the first word of "$ac_prog", so it can be a program name with args.
2526set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002527{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2528echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002529if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002530 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002531else
2532 if test -n "$ac_ct_CC"; then
2533 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2534else
2535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2536for as_dir in $PATH
2537do
2538 IFS=$as_save_IFS
2539 test -z "$as_dir" && as_dir=.
2540 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 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 +00002542 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002543 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 break 2
2545 fi
2546done
2547done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550fi
2551fi
2552ac_ct_CC=$ac_cv_prog_ac_ct_CC
2553if test -n "$ac_ct_CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002554 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2555echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002556else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002557 { echo "$as_me:$LINENO: result: no" >&5
2558echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002559fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 test -n "$ac_ct_CC" && break
2563done
Michael W. Hudson54241132001-12-07 15:38:26 +00002564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 if test "x$ac_ct_CC" = x; then
2566 CC=""
2567 else
2568 case $cross_compiling:$ac_tool_warned in
2569yes:)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002570{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2571whose name does not start with the host triplet. If you think this
2572configuration is useful to you, please write to autoconf@gnu.org." >&5
2573echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2574whose name does not start with the host triplet. If you think this
2575configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576ac_tool_warned=yes ;;
2577esac
2578 CC=$ac_ct_CC
2579 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002580fi
2581
2582fi
2583
2584
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002585test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002586See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002587echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002588See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002589 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002590
2591# Provide some information about the compiler.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002592echo "$as_me:$LINENO: checking for C compiler version" >&5
2593ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594{ (ac_try="$ac_compiler --version >&5"
2595case "(($ac_try" in
2596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2597 *) ac_try_echo=$ac_try;;
2598esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604{ (ac_try="$ac_compiler -v >&5"
2605case "(($ac_try" in
2606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2607 *) ac_try_echo=$ac_try;;
2608esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614{ (ac_try="$ac_compiler -V >&5"
2615case "(($ac_try" in
2616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2617 *) ac_try_echo=$ac_try;;
2618esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 (exit $ac_status); }
2624
2625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002626/* confdefs.h. */
2627_ACEOF
2628cat confdefs.h >>conftest.$ac_ext
2629cat >>conftest.$ac_ext <<_ACEOF
2630/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002631
Martin v. Löwis11437992002-04-12 09:54:03 +00002632int
2633main ()
2634{
2635
2636 ;
2637 return 0;
2638}
2639_ACEOF
2640ac_clean_files_save=$ac_clean_files
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002641ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002642# Try to create an executable without -o first, disregard a.out.
2643# It will help us diagnose broken compilers, and finding out an intuition
2644# of exeext.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002645{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2646echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2647ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2648#
2649# List of possible output files, starting from the most likely.
2650# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2651# only as a last resort. b.out is created by i960 compilers.
2652ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2653#
2654# The IRIX 6 linker writes into existing files which may not be
2655# executable, retaining their permissions. Remove them first so a
2656# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657ac_rmfiles=
2658for ac_file in $ac_files
2659do
2660 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002661 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2663 esac
2664done
2665rm -f $ac_rmfiles
2666
2667if { (ac_try="$ac_link_default"
2668case "(($ac_try" in
2669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2670 *) ac_try_echo=$ac_try;;
2671esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002677 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2678# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2679# in a Makefile. We should not override ac_cv_exeext if it was cached,
2680# so that the user can short-circuit this test for compilers unknown to
2681# Autoconf.
2682for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002683do
2684 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002686 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002687 ;;
2688 [ab].out )
2689 # We found the default executable, but exeext='' is most
2690 # certainly right.
2691 break;;
2692 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2694 then :; else
2695 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2696 fi
2697 # We set ac_cv_exeext here because the later test for it is not
2698 # safe: cross compilers may not add the suffix if given an `-o'
2699 # argument, so we may need to know it at that point already.
2700 # Even if this section looks crufty: it has the advantage of
2701 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002702 break;;
2703 * )
2704 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 esac
2706done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707test "$ac_cv_exeext" = no && ac_cv_exeext=
2708
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002709else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002710 ac_file=''
2711fi
2712
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002713{ echo "$as_me:$LINENO: result: $ac_file" >&5
2714echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002715if test -z "$ac_file"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002717sed 's/^/| /' conftest.$ac_ext >&5
2718
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002719{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002720See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002721echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002722See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002723 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002724fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002725
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002726ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002728# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002729# the compiler is broken, or we cross compile.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002730{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2731echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002732# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2733# If not cross compiling, check that we can run a simple program.
2734if test "$cross_compiling" != yes; then
2735 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736 { (case "(($ac_try" in
2737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2738 *) ac_try_echo=$ac_try;;
2739esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002741 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 (exit $ac_status); }; }; then
2745 cross_compiling=no
2746 else
2747 if test "$cross_compiling" = maybe; then
2748 cross_compiling=yes
2749 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002750 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002751If you meant to cross compile, use \`--host'.
2752See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002753echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002754If you meant to cross compile, use \`--host'.
2755See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002756 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002757 fi
2758 fi
2759fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002760{ echo "$as_me:$LINENO: result: yes" >&5
2761echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002763rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002764ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002766# the compiler is broken, or we cross compile.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002767{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2768echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2769{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2770echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002771
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002772{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2773echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774if { (ac_try="$ac_link"
2775case "(($ac_try" in
2776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2777 *) ac_try_echo=$ac_try;;
2778esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002780 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002781 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002783 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002784 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2785# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2786# work properly (i.e., refer to `conftest.exe'), while it won't with
2787# `rm'.
2788for ac_file in conftest.exe conftest conftest.*; do
2789 test -f "$ac_file" || continue
2790 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002791 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002792 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2793 break;;
2794 * ) break;;
2795 esac
2796done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002798 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002799See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002800echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002801See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002802 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002803fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002804
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002805rm -f conftest$ac_cv_exeext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002806{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2807echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002808
2809rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002810EXEEXT=$ac_cv_exeext
2811ac_exeext=$EXEEXT
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002812{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2813echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002814if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002815 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002816else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002817 cat >conftest.$ac_ext <<_ACEOF
2818/* confdefs.h. */
2819_ACEOF
2820cat confdefs.h >>conftest.$ac_ext
2821cat >>conftest.$ac_ext <<_ACEOF
2822/* end confdefs.h. */
2823
2824int
2825main ()
2826{
2827
2828 ;
2829 return 0;
2830}
2831_ACEOF
2832rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002833if { (ac_try="$ac_compile"
2834case "(($ac_try" in
2835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2836 *) ac_try_echo=$ac_try;;
2837esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002839 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002843 for ac_file in conftest.o conftest.obj conftest.*; do
2844 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002845 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002846 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002847 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2848 break;;
2849 esac
2850done
2851else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002853sed 's/^/| /' conftest.$ac_ext >&5
2854
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002855{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002856See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002857echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002858See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002859 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002860fi
2861
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002862rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002863fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002864{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2865echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002866OBJEXT=$ac_cv_objext
2867ac_objext=$OBJEXT
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002868{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2869echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002870if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002871 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002872else
2873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002874/* confdefs.h. */
2875_ACEOF
2876cat confdefs.h >>conftest.$ac_ext
2877cat >>conftest.$ac_ext <<_ACEOF
2878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002879
Martin v. Löwis11437992002-04-12 09:54:03 +00002880int
2881main ()
2882{
2883#ifndef __GNUC__
2884 choke me
2885#endif
2886
2887 ;
2888 return 0;
2889}
2890_ACEOF
2891rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002892if { (ac_try="$ac_compile"
2893case "(($ac_try" in
2894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2895 *) ac_try_echo=$ac_try;;
2896esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002900 grep -v '^ *+' conftest.er1 >conftest.err
2901 rm -f conftest.er1
2902 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002904 (exit $ac_status); } && {
2905 test -z "$ac_c_werror_flag" ||
2906 test ! -s conftest.err
2907 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 ac_compiler_gnu=yes
2909else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002911sed 's/^/| /' conftest.$ac_ext >&5
2912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002913 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002915
2916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002917ac_cv_c_compiler_gnu=$ac_compiler_gnu
2918
2919fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002920{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2921echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2922GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002923ac_test_CFLAGS=${CFLAGS+set}
2924ac_save_CFLAGS=$CFLAGS
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002925{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2926echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002927if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002928 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002929else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002930 ac_save_c_werror_flag=$ac_c_werror_flag
2931 ac_c_werror_flag=yes
2932 ac_cv_prog_cc_g=no
2933 CFLAGS="-g"
2934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002935/* confdefs.h. */
2936_ACEOF
2937cat confdefs.h >>conftest.$ac_ext
2938cat >>conftest.$ac_ext <<_ACEOF
2939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
Martin v. Löwis11437992002-04-12 09:54:03 +00002941int
2942main ()
2943{
2944
2945 ;
2946 return 0;
2947}
2948_ACEOF
2949rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002950if { (ac_try="$ac_compile"
2951case "(($ac_try" in
2952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2953 *) ac_try_echo=$ac_try;;
2954esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002958 grep -v '^ *+' conftest.er1 >conftest.err
2959 rm -f conftest.er1
2960 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962 (exit $ac_status); } && {
2963 test -z "$ac_c_werror_flag" ||
2964 test ! -s conftest.err
2965 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002966 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002967else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002969sed 's/^/| /' conftest.$ac_ext >&5
2970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002971 CFLAGS=""
2972 cat >conftest.$ac_ext <<_ACEOF
2973/* confdefs.h. */
2974_ACEOF
2975cat confdefs.h >>conftest.$ac_ext
2976cat >>conftest.$ac_ext <<_ACEOF
2977/* end confdefs.h. */
2978
2979int
2980main ()
2981{
2982
2983 ;
2984 return 0;
2985}
2986_ACEOF
2987rm -f conftest.$ac_objext
2988if { (ac_try="$ac_compile"
2989case "(($ac_try" in
2990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2991 *) ac_try_echo=$ac_try;;
2992esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002994 (eval "$ac_compile") 2>conftest.er1
2995 ac_status=$?
2996 grep -v '^ *+' conftest.er1 >conftest.err
2997 rm -f conftest.er1
2998 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000 (exit $ac_status); } && {
3001 test -z "$ac_c_werror_flag" ||
3002 test ! -s conftest.err
3003 } && test -s conftest.$ac_objext; then
3004 :
3005else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003006 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007sed 's/^/| /' conftest.$ac_ext >&5
3008
3009 ac_c_werror_flag=$ac_save_c_werror_flag
3010 CFLAGS="-g"
3011 cat >conftest.$ac_ext <<_ACEOF
3012/* confdefs.h. */
3013_ACEOF
3014cat confdefs.h >>conftest.$ac_ext
3015cat >>conftest.$ac_ext <<_ACEOF
3016/* end confdefs.h. */
3017
3018int
3019main ()
3020{
3021
3022 ;
3023 return 0;
3024}
3025_ACEOF
3026rm -f conftest.$ac_objext
3027if { (ac_try="$ac_compile"
3028case "(($ac_try" in
3029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3030 *) ac_try_echo=$ac_try;;
3031esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003033 (eval "$ac_compile") 2>conftest.er1
3034 ac_status=$?
3035 grep -v '^ *+' conftest.er1 >conftest.err
3036 rm -f conftest.er1
3037 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039 (exit $ac_status); } && {
3040 test -z "$ac_c_werror_flag" ||
3041 test ! -s conftest.err
3042 } && test -s conftest.$ac_objext; then
3043 ac_cv_prog_cc_g=yes
3044else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003045 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046sed 's/^/| /' conftest.$ac_ext >&5
3047
3048
Guido van Rossum627b2d71993-12-24 10:39:16 +00003049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
3051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003053
3054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3055fi
3056
3057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3058 ac_c_werror_flag=$ac_save_c_werror_flag
3059fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003060{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3061echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003062if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003063 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003064elif test $ac_cv_prog_cc_g = yes; then
3065 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003066 CFLAGS="-g -O2"
3067 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003068 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003069 fi
3070else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003071 if test "$GCC" = yes; then
3072 CFLAGS="-O2"
3073 else
3074 CFLAGS=
3075 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003076fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003077{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3078echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003080 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003081else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003082 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003083ac_save_CC=$CC
3084cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003085/* confdefs.h. */
3086_ACEOF
3087cat confdefs.h >>conftest.$ac_ext
3088cat >>conftest.$ac_ext <<_ACEOF
3089/* end confdefs.h. */
3090#include <stdarg.h>
3091#include <stdio.h>
3092#include <sys/types.h>
3093#include <sys/stat.h>
3094/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3095struct buf { int x; };
3096FILE * (*rcsopen) (struct buf *, struct stat *, int);
3097static char *e (p, i)
3098 char **p;
3099 int i;
3100{
3101 return p[i];
3102}
3103static char *f (char * (*g) (char **, int), char **p, ...)
3104{
3105 char *s;
3106 va_list v;
3107 va_start (v,p);
3108 s = g (p, va_arg (v,int));
3109 va_end (v);
3110 return s;
3111}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003112
3113/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3114 function prototypes and stuff, but not '\xHH' hex character constants.
3115 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003117 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3118 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003120int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3123 inside strings and character constants. */
3124#define FOO(x) 'x'
3125int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3126
Skip Montanaro6dead952003-09-25 14:50:04 +00003127int test (int i, double x);
3128struct s1 {int (*f) (int a);};
3129struct s2 {int (*f) (double a);};
3130int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3131int argc;
3132char **argv;
3133int
3134main ()
3135{
3136return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3137 ;
3138 return 0;
3139}
3140_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3142 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003143do
3144 CC="$ac_save_CC $ac_arg"
3145 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146if { (ac_try="$ac_compile"
3147case "(($ac_try" in
3148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3149 *) ac_try_echo=$ac_try;;
3150esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003154 grep -v '^ *+' conftest.er1 >conftest.err
3155 rm -f conftest.er1
3156 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158 (exit $ac_status); } && {
3159 test -z "$ac_c_werror_flag" ||
3160 test ! -s conftest.err
3161 } && test -s conftest.$ac_objext; then
3162 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003163else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003165sed 's/^/| /' conftest.$ac_ext >&5
3166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003167
Skip Montanaro6dead952003-09-25 14:50:04 +00003168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169
3170rm -f core conftest.err conftest.$ac_objext
3171 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003172done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003174CC=$ac_save_CC
3175
3176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177# AC_CACHE_VAL
3178case "x$ac_cv_prog_cc_c89" in
3179 x)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003180 { echo "$as_me:$LINENO: result: none needed" >&5
3181echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182 xno)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003183 { echo "$as_me:$LINENO: result: unsupported" >&5
3184echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003185 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003187 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3188echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003189esac
3190
Skip Montanaro6dead952003-09-25 14:50:04 +00003191
Martin v. Löwis11437992002-04-12 09:54:03 +00003192ac_ext=c
3193ac_cpp='$CPP $CPPFLAGS'
3194ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3195ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3196ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003197
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003198
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003199
3200
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003201{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3202echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003205if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003207
3208 case $withval in
3209 no) with_cxx_main=no
3210 MAINCC='$(CC)';;
3211 yes) with_cxx_main=yes
3212 MAINCC='$(CXX)';;
3213 *) with_cxx_main=yes
3214 MAINCC=$withval
3215 if test -z "$CXX"
3216 then
3217 CXX=$withval
3218 fi;;
3219 esac
3220else
3221
3222 with_cxx_main=no
3223 MAINCC='$(CC)'
3224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003227{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3228echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229
3230preset_cxx="$CXX"
3231if test -z "$CXX"
3232then
3233 case "$CC" in
3234 gcc) # Extract the first word of "g++", so it can be a program name with args.
3235set dummy g++; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003236{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003238if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003239 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003240else
3241 case $CXX in
3242 [\\/]* | ?:[\\/]*)
3243 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3244 ;;
3245 *)
3246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3247for as_dir in notfound
3248do
3249 IFS=$as_save_IFS
3250 test -z "$as_dir" && as_dir=.
3251 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003252 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 +00003253 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003255 break 2
3256 fi
3257done
3258done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003260
3261 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3262 ;;
3263esac
3264fi
3265CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003266if test -n "$CXX"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003267 { echo "$as_me:$LINENO: result: $CXX" >&5
3268echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003269else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003270 { echo "$as_me:$LINENO: result: no" >&5
3271echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003274 ;;
3275 cc) # Extract the first word of "c++", so it can be a program name with args.
3276set dummy c++; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003279if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003280 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003281else
3282 case $CXX in
3283 [\\/]* | ?:[\\/]*)
3284 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3285 ;;
3286 *)
3287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3288for as_dir in notfound
3289do
3290 IFS=$as_save_IFS
3291 test -z "$as_dir" && as_dir=.
3292 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293 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 +00003294 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003296 break 2
3297 fi
3298done
3299done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003300IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003301
3302 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3303 ;;
3304esac
3305fi
3306CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003307if test -n "$CXX"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003308 { echo "$as_me:$LINENO: result: $CXX" >&5
3309echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003310else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003311 { echo "$as_me:$LINENO: result: no" >&5
3312echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003315 ;;
3316 esac
3317 if test "$CXX" = "notfound"
3318 then
3319 CXX=""
3320 fi
3321fi
3322if test -z "$CXX"
3323then
3324 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3325do
3326 # Extract the first word of "$ac_prog", so it can be a program name with args.
3327set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003328{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3329echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003330if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003331 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003332else
3333 if test -n "$CXX"; then
3334 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3335else
3336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3337for as_dir in $PATH
3338do
3339 IFS=$as_save_IFS
3340 test -z "$as_dir" && as_dir=.
3341 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342 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 +00003343 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003344 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003345 break 2
3346 fi
3347done
3348done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003350
3351fi
3352fi
3353CXX=$ac_cv_prog_CXX
3354if test -n "$CXX"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003355 { echo "$as_me:$LINENO: result: $CXX" >&5
3356echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003357else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003358 { echo "$as_me:$LINENO: result: no" >&5
3359echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360fi
3361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003362
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003363 test -n "$CXX" && break
3364done
3365test -n "$CXX" || CXX="notfound"
3366
3367 if test "$CXX" = "notfound"
3368 then
3369 CXX=""
3370 fi
3371fi
3372if test "$preset_cxx" != "$CXX"
3373then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003374 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375
3376 By default, distutils will build C++ extension modules with \"$CXX\".
3377 If this is not intended, then set CXX on the configure command line.
3378 " >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003379echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003380
3381 By default, distutils will build C++ extension modules with \"$CXX\".
3382 If this is not intended, then set CXX on the configure command line.
3383 " >&2;}
3384fi
3385
3386
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003387# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003388
3389ac_ext=c
3390ac_cpp='$CPP $CPPFLAGS'
3391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3393ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003394{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3395echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003396# On Suns, sometimes $CPP names a directory.
3397if test -n "$CPP" && test -d "$CPP"; then
3398 CPP=
3399fi
3400if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003402 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003403else
Martin v. Löwis11437992002-04-12 09:54:03 +00003404 # Double quotes because CPP needs to be expanded
3405 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3406 do
3407 ac_preproc_ok=false
3408for ac_c_preproc_warn_flag in '' yes
3409do
3410 # Use a header file that comes with gcc, so configuring glibc
3411 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003412 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3413 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003414 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 # not just through cpp. "Syntax error" is here to catch this case.
3416 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003417/* confdefs.h. */
3418_ACEOF
3419cat confdefs.h >>conftest.$ac_ext
3420cat >>conftest.$ac_ext <<_ACEOF
3421/* end confdefs.h. */
3422#ifdef __STDC__
3423# include <limits.h>
3424#else
3425# include <assert.h>
3426#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003427 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003428_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003429if { (ac_try="$ac_cpp conftest.$ac_ext"
3430case "(($ac_try" in
3431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3432 *) ac_try_echo=$ac_try;;
3433esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003435 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003436 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003437 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003438 rm -f conftest.er1
3439 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003441 (exit $ac_status); } >/dev/null && {
3442 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3443 test ! -s conftest.err
3444 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003445 :
3446else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003448sed 's/^/| /' conftest.$ac_ext >&5
3449
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 # Broken: fails on valid input.
3451continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453
Martin v. Löwis11437992002-04-12 09:54:03 +00003454rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 # can be detected and how.
3458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003459/* confdefs.h. */
3460_ACEOF
3461cat confdefs.h >>conftest.$ac_ext
3462cat >>conftest.$ac_ext <<_ACEOF
3463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003464#include <ac_nonexistent.h>
3465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466if { (ac_try="$ac_cpp conftest.$ac_ext"
3467case "(($ac_try" in
3468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3469 *) ac_try_echo=$ac_try;;
3470esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003474 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 rm -f conftest.er1
3476 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 (exit $ac_status); } >/dev/null && {
3479 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3480 test ! -s conftest.err
3481 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 # Broken: success on invalid input.
3483continue
3484else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003486sed 's/^/| /' conftest.$ac_ext >&5
3487
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 # Passes both tests.
3489ac_preproc_ok=:
3490break
3491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003492
Martin v. Löwis11437992002-04-12 09:54:03 +00003493rm -f conftest.err conftest.$ac_ext
3494
3495done
3496# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3497rm -f conftest.err conftest.$ac_ext
3498if $ac_preproc_ok; then
3499 break
3500fi
3501
3502 done
3503 ac_cv_prog_CPP=$CPP
3504
3505fi
3506 CPP=$ac_cv_prog_CPP
3507else
3508 ac_cv_prog_CPP=$CPP
3509fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003510{ echo "$as_me:$LINENO: result: $CPP" >&5
3511echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003512ac_preproc_ok=false
3513for ac_c_preproc_warn_flag in '' yes
3514do
3515 # Use a header file that comes with gcc, so configuring glibc
3516 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003517 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3518 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 # On the NeXT, cc -E runs the code through the compiler's parser,
3520 # not just through cpp. "Syntax error" is here to catch this case.
3521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003522/* confdefs.h. */
3523_ACEOF
3524cat confdefs.h >>conftest.$ac_ext
3525cat >>conftest.$ac_ext <<_ACEOF
3526/* end confdefs.h. */
3527#ifdef __STDC__
3528# include <limits.h>
3529#else
3530# include <assert.h>
3531#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003532 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003533_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003534if { (ac_try="$ac_cpp conftest.$ac_ext"
3535case "(($ac_try" in
3536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3537 *) ac_try_echo=$ac_try;;
3538esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003540 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003542 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 rm -f conftest.er1
3544 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546 (exit $ac_status); } >/dev/null && {
3547 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3548 test ! -s conftest.err
3549 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 :
3551else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003553sed 's/^/| /' conftest.$ac_ext >&5
3554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 # Broken: fails on valid input.
3556continue
3557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558
Martin v. Löwis11437992002-04-12 09:54:03 +00003559rm -f conftest.err conftest.$ac_ext
3560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003561 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 # can be detected and how.
3563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003564/* confdefs.h. */
3565_ACEOF
3566cat confdefs.h >>conftest.$ac_ext
3567cat >>conftest.$ac_ext <<_ACEOF
3568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003569#include <ac_nonexistent.h>
3570_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571if { (ac_try="$ac_cpp conftest.$ac_ext"
3572case "(($ac_try" in
3573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3574 *) ac_try_echo=$ac_try;;
3575esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003579 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 rm -f conftest.er1
3581 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583 (exit $ac_status); } >/dev/null && {
3584 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3585 test ! -s conftest.err
3586 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 # Broken: success on invalid input.
3588continue
3589else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003591sed 's/^/| /' conftest.$ac_ext >&5
3592
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 # Passes both tests.
3594ac_preproc_ok=:
3595break
3596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597
Martin v. Löwis11437992002-04-12 09:54:03 +00003598rm -f conftest.err conftest.$ac_ext
3599
3600done
3601# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3602rm -f conftest.err conftest.$ac_ext
3603if $ac_preproc_ok; then
3604 :
3605else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003606 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003607See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003608echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003609See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003610 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003611fi
3612
3613ac_ext=c
3614ac_cpp='$CPP $CPPFLAGS'
3615ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3616ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3617ac_compiler_gnu=$ac_cv_c_compiler_gnu
3618
3619
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003620{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3621echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003623 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003624else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003625 # Extract the first word of "grep ggrep" to use in msg output
3626if test -z "$GREP"; then
3627set dummy grep ggrep; ac_prog_name=$2
3628if test "${ac_cv_path_GREP+set}" = set; then
3629 echo $ECHO_N "(cached) $ECHO_C" >&6
3630else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631 ac_path_GREP_found=false
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003632# Loop through the user's path and test for each of PROGNAME-LIST
3633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3635do
3636 IFS=$as_save_IFS
3637 test -z "$as_dir" && as_dir=.
3638 for ac_prog in grep ggrep; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003639 for ac_exec_ext in '' $ac_executable_extensions; do
3640 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3641 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3642 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643 # Check for GNU $ac_path_GREP
3644case `"$ac_path_GREP" --version 2>&1` in
3645*GNU*)
3646 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3647*)
3648 ac_count=0
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003649 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650 while :
3651 do
3652 cat "conftest.in" "conftest.in" >"conftest.tmp"
3653 mv "conftest.tmp" "conftest.in"
3654 cp "conftest.in" "conftest.nl"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003655 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3657 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3658 ac_count=`expr $ac_count + 1`
3659 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3660 # Best one so far, save it but keep looking for a better one
3661 ac_cv_path_GREP="$ac_path_GREP"
3662 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003663 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664 # 10*(2^10) chars as input seems more than enough
3665 test $ac_count -gt 10 && break
3666 done
3667 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3668esac
3669
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003670
3671 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 done
3673done
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003674
3675done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676IFS=$as_save_IFS
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003677
3678
3679fi
3680
3681GREP="$ac_cv_path_GREP"
3682if test -z "$GREP"; then
3683 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3684echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003686fi
3687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688else
3689 ac_cv_path_GREP=$GREP
3690fi
3691
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003694{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3695echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696 GREP="$ac_cv_path_GREP"
3697
3698
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003699{ echo "$as_me:$LINENO: checking for egrep" >&5
3700echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003702 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703else
3704 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3705 then ac_cv_path_EGREP="$GREP -E"
3706 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003707 # Extract the first word of "egrep" to use in msg output
3708if test -z "$EGREP"; then
3709set dummy egrep; ac_prog_name=$2
3710if test "${ac_cv_path_EGREP+set}" = set; then
3711 echo $ECHO_N "(cached) $ECHO_C" >&6
3712else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713 ac_path_EGREP_found=false
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003714# Loop through the user's path and test for each of PROGNAME-LIST
3715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003716for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3717do
3718 IFS=$as_save_IFS
3719 test -z "$as_dir" && as_dir=.
3720 for ac_prog in egrep; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003721 for ac_exec_ext in '' $ac_executable_extensions; do
3722 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3723 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3724 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 # Check for GNU $ac_path_EGREP
3726case `"$ac_path_EGREP" --version 2>&1` in
3727*GNU*)
3728 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3729*)
3730 ac_count=0
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003731 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732 while :
3733 do
3734 cat "conftest.in" "conftest.in" >"conftest.tmp"
3735 mv "conftest.tmp" "conftest.in"
3736 cp "conftest.in" "conftest.nl"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003737 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3739 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3740 ac_count=`expr $ac_count + 1`
3741 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3742 # Best one so far, save it but keep looking for a better one
3743 ac_cv_path_EGREP="$ac_path_EGREP"
3744 ac_path_EGREP_max=$ac_count
3745 fi
3746 # 10*(2^10) chars as input seems more than enough
3747 test $ac_count -gt 10 && break
3748 done
3749 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3750esac
3751
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003752
3753 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754 done
3755done
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003756
3757done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758IFS=$as_save_IFS
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003759
3760
3761fi
3762
3763EGREP="$ac_cv_path_EGREP"
3764if test -z "$EGREP"; then
3765 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3766echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003768fi
3769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770else
3771 ac_cv_path_EGREP=$EGREP
3772fi
3773
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775 fi
3776fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003777{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3778echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003780
3781
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003782
3783{ echo "$as_me:$LINENO: checking for AIX" >&5
3784echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3785cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003786/* confdefs.h. */
3787_ACEOF
3788cat confdefs.h >>conftest.$ac_ext
3789cat >>conftest.$ac_ext <<_ACEOF
3790/* end confdefs.h. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003791#ifdef _AIX
3792 yes
Antoine Pitrou20327222009-05-24 20:39:11 +00003793#endif
3794
Antoine Pitrou20327222009-05-24 20:39:11 +00003795_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3797 $EGREP "yes" >/dev/null 2>&1; then
3798 { echo "$as_me:$LINENO: result: yes" >&5
3799echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003800cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003801#define _ALL_SOURCE 1
3802_ACEOF
3803
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003804else
3805 { echo "$as_me:$LINENO: result: no" >&5
3806echo "${ECHO_T}no" >&6; }
3807fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00003808rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003809
3810
3811
3812# Check for unsupported systems
3813case $ac_sys_system/$ac_sys_release in
3814atheos*|Linux*/1*)
3815 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3816 echo See README for details.
3817 exit 1;;
3818esac
3819
3820
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003821{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3822echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003823
3824# Check whether --with-suffix was given.
3825if test "${with_suffix+set}" = set; then
3826 withval=$with_suffix;
3827 case $withval in
3828 no) EXEEXT=;;
3829 yes) EXEEXT=.exe;;
3830 *) EXEEXT=$withval;;
3831 esac
3832fi
3833
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003834{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3835echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003836
3837# Test whether we're running on a non-case-sensitive system, in which
3838# case we give a warning if no ext is given
3839
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003840{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3841echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003842if test ! -d CaseSensitiveTestDir; then
3843mkdir CaseSensitiveTestDir
3844fi
3845
3846if test -d casesensitivetestdir
3847then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003848 { echo "$as_me:$LINENO: result: yes" >&5
3849echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003850 BUILDEXEEXT=.exe
3851else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003852 { echo "$as_me:$LINENO: result: no" >&5
3853echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003854 BUILDEXEEXT=$EXEEXT
3855fi
3856rmdir CaseSensitiveTestDir
3857
3858case $MACHDEP in
3859bsdos*)
3860 case $CC in
3861 gcc) CC="$CC -D_HAVE_BSDI";;
3862 esac;;
3863esac
3864
3865case $ac_sys_system in
3866hp*|HP*)
3867 case $CC in
3868 cc|*/cc) CC="$CC -Ae";;
3869 esac;;
3870Monterey*)
3871 case $CC in
3872 cc) CC="$CC -Wl,-Bexport";;
3873 esac;;
3874SunOS*)
3875 # Some functions have a prototype only with that define, e.g. confstr
3876
3877cat >>confdefs.h <<\_ACEOF
3878#define __EXTENSIONS__ 1
3879_ACEOF
3880
3881 ;;
3882esac
3883
3884
3885
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003886{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3887echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003888if test -z "$LIBRARY"
3889then
3890 LIBRARY='libpython$(VERSION).a'
3891fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003892{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3893echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003894
3895# LDLIBRARY is the name of the library to link against (as opposed to the
3896# name of the library into which to insert object files). BLDLIBRARY is also
3897# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3898# is blank as the main program is not linked directly against LDLIBRARY.
3899# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3900# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3901# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3902# DLLLIBRARY is the shared (i.e., DLL) library.
3903#
3904# RUNSHARED is used to run shared python without installed libraries
3905#
3906# INSTSONAME is the name of the shared library that will be use to install
3907# on the system - some systems like version suffix, others don't
3908
3909
3910
3911
3912
3913
3914LDLIBRARY="$LIBRARY"
3915BLDLIBRARY='$(LDLIBRARY)'
3916INSTSONAME='$(LDLIBRARY)'
3917DLLLIBRARY=''
3918LDLIBRARYDIR=''
3919RUNSHARED=''
3920
3921# LINKCC is the command that links the python executable -- default is $(CC).
3922# If CXX is set, and if it is needed to link a main function that was
3923# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3924# python might then depend on the C++ runtime
3925# This is altered for AIX in order to build the export list before
3926# linking.
3927
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003928{ echo "$as_me:$LINENO: checking LINKCC" >&5
3929echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003930if test -z "$LINKCC"
3931then
3932 LINKCC='$(PURIFY) $(MAINCC)'
3933 case $ac_sys_system in
3934 AIX*)
3935 exp_extra="\"\""
3936 if test $ac_sys_release -ge 5 -o \
3937 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3938 exp_extra="."
3939 fi
3940 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
3941 Monterey64*)
3942 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
3943 QNX*)
3944 # qcc must be used because the other compilers do not
3945 # support -N.
3946 LINKCC=qcc;;
3947 esac
3948fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003949{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3950echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003951
3952# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3953# make sure we default having it set to "no": this is used by
3954# distutils.unixccompiler to know if it should add --enable-new-dtags
3955# to linker command lines, and failing to detect GNU ld simply results
3956# in the same bahaviour as before.
3957
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003958{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3959echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003960ac_prog=ld
3961if test "$GCC" = yes; then
3962 ac_prog=`$CC -print-prog-name=ld`
3963fi
3964case `"$ac_prog" -V 2>&1 < /dev/null` in
3965 *GNU*)
3966 GNULD=yes;;
3967 *)
3968 GNULD=no;;
3969esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003970{ echo "$as_me:$LINENO: result: $GNULD" >&5
3971echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003972
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003973{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3974echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003975# Check whether --enable-shared was given.
3976if test "${enable_shared+set}" = set; then
3977 enableval=$enable_shared;
3978fi
3979
3980
3981if test -z "$enable_shared"
3982then
3983 case $ac_sys_system in
3984 CYGWIN* | atheos*)
3985 enable_shared="yes";;
3986 *)
3987 enable_shared="no";;
3988 esac
3989fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003990{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3991echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003992
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003993{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3994echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003995# Check whether --enable-profiling was given.
3996if test "${enable_profiling+set}" = set; then
3997 enableval=$enable_profiling; ac_save_cc="$CC"
3998 CC="$CC -pg"
3999 if test "$cross_compiling" = yes; then
4000 ac_enable_profiling="no"
4001else
4002 cat >conftest.$ac_ext <<_ACEOF
4003/* confdefs.h. */
4004_ACEOF
4005cat confdefs.h >>conftest.$ac_ext
4006cat >>conftest.$ac_ext <<_ACEOF
4007/* end confdefs.h. */
4008int main() { return 0; }
4009_ACEOF
4010rm -f conftest$ac_exeext
4011if { (ac_try="$ac_link"
4012case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004017 (eval "$ac_link") 2>&5
4018 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4021 { (case "(($ac_try" in
4022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023 *) ac_try_echo=$ac_try;;
4024esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004026 (eval "$ac_try") 2>&5
4027 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004029 (exit $ac_status); }; }; then
4030 ac_enable_profiling="yes"
4031else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004032 echo "$as_me: program exited with status $ac_status" >&5
4033echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004034sed 's/^/| /' conftest.$ac_ext >&5
4035
4036( exit $ac_status )
4037ac_enable_profiling="no"
4038fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4040fi
4041
4042
4043 CC="$ac_save_cc"
4044fi
4045
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004046{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4047echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004048
4049case "$ac_enable_profiling" in
4050 "yes")
4051 BASECFLAGS="-pg $BASECFLAGS"
4052 LDFLAGS="-pg $LDFLAGS"
4053 ;;
4054esac
4055
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004056{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4057echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004058
4059# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4060# library that we build, but we do not want to link against it (we
4061# will find it with a -framework option). For this reason there is an
4062# extra variable BLDLIBRARY against which Python and the extension
4063# modules are linked, BLDLIBRARY. This is normally the same as
4064# LDLIBRARY, but empty for MacOSX framework builds.
4065if test "$enable_framework"
4066then
4067 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4068 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4069 BLDLIBRARY=''
4070else
4071 BLDLIBRARY='$(LDLIBRARY)'
4072fi
4073
4074# Other platforms follow
4075if test $enable_shared = "yes"; then
4076
4077cat >>confdefs.h <<\_ACEOF
4078#define Py_ENABLE_SHARED 1
4079_ACEOF
4080
4081 case $ac_sys_system in
4082 CYGWIN*)
4083 LDLIBRARY='libpython$(VERSION).dll.a'
4084 DLLLIBRARY='libpython$(VERSION).dll'
4085 ;;
4086 SunOS*)
4087 LDLIBRARY='libpython$(VERSION).so'
4088 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4089 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4090 INSTSONAME="$LDLIBRARY".$SOVERSION
4091 ;;
4092 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4093 LDLIBRARY='libpython$(VERSION).so'
4094 BLDLIBRARY='-L. -lpython$(VERSION)'
4095 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4096 case $ac_sys_system in
4097 FreeBSD*)
4098 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4099 ;;
4100 esac
4101 INSTSONAME="$LDLIBRARY".$SOVERSION
4102 ;;
4103 hp*|HP*)
4104 case `uname -m` in
4105 ia64)
4106 LDLIBRARY='libpython$(VERSION).so'
4107 ;;
4108 *)
4109 LDLIBRARY='libpython$(VERSION).sl'
4110 ;;
4111 esac
4112 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4113 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4114 ;;
4115 OSF*)
4116 LDLIBRARY='libpython$(VERSION).so'
4117 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4118 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4119 ;;
4120 atheos*)
4121 LDLIBRARY='libpython$(VERSION).so'
4122 BLDLIBRARY='-L. -lpython$(VERSION)'
4123 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4124 ;;
4125 Darwin*)
4126 LDLIBRARY='libpython$(VERSION).dylib'
4127 BLDLIBRARY='-L. -lpython$(VERSION)'
4128 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4129 ;;
4130
4131 esac
4132else # shared is disabled
4133 case $ac_sys_system in
4134 CYGWIN*)
4135 BLDLIBRARY='$(LIBRARY)'
4136 LDLIBRARY='libpython$(VERSION).dll.a'
4137 ;;
4138 esac
4139fi
4140
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004141{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4142echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004143
4144if test -n "$ac_tool_prefix"; then
4145 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4146set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004147{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4148echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004149if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004150 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004151else
4152 if test -n "$RANLIB"; then
4153 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4154else
4155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4156for as_dir in $PATH
4157do
4158 IFS=$as_save_IFS
4159 test -z "$as_dir" && as_dir=.
4160 for ac_exec_ext in '' $ac_executable_extensions; do
4161 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4162 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004163 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004164 break 2
4165 fi
4166done
4167done
4168IFS=$as_save_IFS
4169
4170fi
4171fi
4172RANLIB=$ac_cv_prog_RANLIB
4173if test -n "$RANLIB"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004174 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4175echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004176else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004177 { echo "$as_me:$LINENO: result: no" >&5
4178echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004179fi
4180
4181
4182fi
4183if test -z "$ac_cv_prog_RANLIB"; then
4184 ac_ct_RANLIB=$RANLIB
4185 # Extract the first word of "ranlib", so it can be a program name with args.
4186set dummy ranlib; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004187{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4188echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004189if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004190 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004191else
4192 if test -n "$ac_ct_RANLIB"; then
4193 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4194else
4195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4196for as_dir in $PATH
4197do
4198 IFS=$as_save_IFS
4199 test -z "$as_dir" && as_dir=.
4200 for ac_exec_ext in '' $ac_executable_extensions; do
4201 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4202 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004203 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004204 break 2
4205 fi
4206done
4207done
4208IFS=$as_save_IFS
4209
4210fi
4211fi
4212ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4213if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004214 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4215echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004216else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004217 { echo "$as_me:$LINENO: result: no" >&5
4218echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004219fi
4220
4221 if test "x$ac_ct_RANLIB" = x; then
4222 RANLIB=":"
4223 else
4224 case $cross_compiling:$ac_tool_warned in
4225yes:)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004226{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4227whose name does not start with the host triplet. If you think this
4228configuration is useful to you, please write to autoconf@gnu.org." >&5
4229echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4230whose name does not start with the host triplet. If you think this
4231configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004232ac_tool_warned=yes ;;
4233esac
4234 RANLIB=$ac_ct_RANLIB
4235 fi
4236else
4237 RANLIB="$ac_cv_prog_RANLIB"
4238fi
4239
4240
4241for ac_prog in ar aal
4242do
4243 # Extract the first word of "$ac_prog", so it can be a program name with args.
4244set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004245{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4246echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004247if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004248 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004249else
4250 if test -n "$AR"; then
4251 ac_cv_prog_AR="$AR" # Let the user override the test.
4252else
4253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4254for as_dir in $PATH
4255do
4256 IFS=$as_save_IFS
4257 test -z "$as_dir" && as_dir=.
4258 for ac_exec_ext in '' $ac_executable_extensions; do
4259 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4260 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004261 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004262 break 2
4263 fi
4264done
4265done
4266IFS=$as_save_IFS
4267
4268fi
4269fi
4270AR=$ac_cv_prog_AR
4271if test -n "$AR"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004272 { echo "$as_me:$LINENO: result: $AR" >&5
4273echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004274else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004275 { echo "$as_me:$LINENO: result: no" >&5
4276echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004277fi
4278
4279
4280 test -n "$AR" && break
4281done
4282test -n "$AR" || AR="ar"
4283
4284
4285# tweak ARFLAGS only if the user didn't set it on the command line
4286
4287if test -z "$ARFLAGS"
4288then
4289 ARFLAGS="rc"
4290fi
4291
4292
4293# Extract the first word of "svnversion", so it can be a program name with args.
4294set dummy svnversion; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004295{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004297if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004298 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004299else
4300 if test -n "$SVNVERSION"; then
4301 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4302else
4303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304for as_dir in $PATH
4305do
4306 IFS=$as_save_IFS
4307 test -z "$as_dir" && as_dir=.
4308 for ac_exec_ext in '' $ac_executable_extensions; do
4309 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4310 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004311 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004312 break 2
4313 fi
4314done
4315done
4316IFS=$as_save_IFS
4317
4318 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4319fi
4320fi
4321SVNVERSION=$ac_cv_prog_SVNVERSION
4322if test -n "$SVNVERSION"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004323 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4324echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004325else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004326 { echo "$as_me:$LINENO: result: no" >&5
4327echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004328fi
4329
4330
4331if test $SVNVERSION = found
4332then
4333 SVNVERSION="svnversion \$(srcdir)"
4334else
4335 SVNVERSION="echo Unversioned directory"
4336fi
4337
4338case $MACHDEP in
4339bsdos*|hp*|HP*)
4340 # install -d does not work on BSDI or HP-UX
4341 if test -z "$INSTALL"
4342 then
4343 INSTALL="${srcdir}/install-sh -c"
4344 fi
4345esac
4346ac_aux_dir=
4347for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4348 if test -f "$ac_dir/install-sh"; then
4349 ac_aux_dir=$ac_dir
4350 ac_install_sh="$ac_aux_dir/install-sh -c"
4351 break
4352 elif test -f "$ac_dir/install.sh"; then
4353 ac_aux_dir=$ac_dir
4354 ac_install_sh="$ac_aux_dir/install.sh -c"
4355 break
4356 elif test -f "$ac_dir/shtool"; then
4357 ac_aux_dir=$ac_dir
4358 ac_install_sh="$ac_aux_dir/shtool install -c"
4359 break
4360 fi
4361done
4362if test -z "$ac_aux_dir"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004363 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4364echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004365 { (exit 1); exit 1; }; }
4366fi
4367
4368# These three variables are undocumented and unsupported,
4369# and are intended to be withdrawn in a future Autoconf release.
4370# They can cause serious problems if a builder's source tree is in a directory
4371# whose full name contains unusual characters.
4372ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4373ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4374ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4375
4376
4377# Find a good install program. We prefer a C program (faster),
4378# so one script is as good as another. But avoid the broken or
4379# incompatible versions:
4380# SysV /etc/install, /usr/sbin/install
4381# SunOS /usr/etc/install
4382# IRIX /sbin/install
4383# AIX /bin/install
4384# AmigaOS /C/install, which installs bootblocks on floppy discs
4385# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4386# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4387# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4388# OS/2's system install, which has a completely different semantic
4389# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004390{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4391echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004392if test -z "$INSTALL"; then
4393if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004394 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004395else
4396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4397for as_dir in $PATH
4398do
4399 IFS=$as_save_IFS
4400 test -z "$as_dir" && as_dir=.
4401 # Account for people who put trailing slashes in PATH elements.
4402case $as_dir/ in
4403 ./ | .// | /cC/* | \
4404 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4405 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4406 /usr/ucb/* ) ;;
4407 *)
4408 # OSF1 and SCO ODT 3.0 have their own names for install.
4409 # Don't use installbsd from OSF since it installs stuff as root
4410 # by default.
4411 for ac_prog in ginstall scoinst install; do
4412 for ac_exec_ext in '' $ac_executable_extensions; do
4413 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4414 if test $ac_prog = install &&
4415 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4416 # AIX install. It has an incompatible calling convention.
4417 :
4418 elif test $ac_prog = install &&
4419 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4420 # program-specific install script used by HP pwplus--don't use.
4421 :
4422 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004423 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4424 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004425 fi
4426 fi
4427 done
4428 done
4429 ;;
4430esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004431done
4432IFS=$as_save_IFS
4433
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004434
4435fi
4436 if test "${ac_cv_path_install+set}" = set; then
4437 INSTALL=$ac_cv_path_install
4438 else
4439 # As a last resort, use the slow shell script. Don't cache a
4440 # value for INSTALL within a source directory, because that will
4441 # break other packages using the cache if that directory is
4442 # removed, or if the value is a relative name.
4443 INSTALL=$ac_install_sh
4444 fi
4445fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004446{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4447echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004448
4449# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4450# It thinks the first close brace ends the variable substitution.
4451test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4452
4453test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4454
4455test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4456
4457
4458# Not every filesystem supports hard links
4459
4460if test -z "$LN" ; then
4461 case $ac_sys_system in
4462 CYGWIN*) LN="ln -s";;
4463 atheos*) LN="ln -s";;
4464 *) LN=ln;;
4465 esac
4466fi
4467
4468# Check for --with-pydebug
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004469{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4470echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004471
4472# Check whether --with-pydebug was given.
4473if test "${with_pydebug+set}" = set; then
4474 withval=$with_pydebug;
4475if test "$withval" != no
4476then
4477
4478cat >>confdefs.h <<\_ACEOF
4479#define Py_DEBUG 1
4480_ACEOF
4481
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004482 { echo "$as_me:$LINENO: result: yes" >&5
4483echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004484 Py_DEBUG='true'
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004485else { echo "$as_me:$LINENO: result: no" >&5
4486echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004487fi
4488else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004489 { echo "$as_me:$LINENO: result: no" >&5
4490echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004491fi
4492
4493
4494# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4495# merged with this chunk of code?
4496
4497# Optimizer/debugger flags
4498# ------------------------
4499# (The following bit of code is complicated enough - please keep things
4500# indented properly. Just pretend you're editing Python code. ;-)
4501
4502# There are two parallel sets of case statements below, one that checks to
4503# see if OPT was set and one that does BASECFLAGS setting based upon
4504# compiler and platform. BASECFLAGS tweaks need to be made even if the
4505# user set OPT.
4506
4507# tweak OPT based on compiler and platform, only if the user didn't set
4508# it on the command line
4509
4510if test -z "$OPT"
4511then
4512 case $GCC in
4513 yes)
4514 if test "$CC" != 'g++' ; then
4515 STRICT_PROTO="-Wstrict-prototypes"
4516 fi
4517 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4518 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4519 WRAP="-fwrapv"
4520 fi
4521 case $ac_cv_prog_cc_g in
4522 yes)
4523 if test "$Py_DEBUG" = 'true' ; then
4524 # Optimization messes up debuggers, so turn it off for
4525 # debug builds.
4526 OPT="-g -Wall $STRICT_PROTO"
4527 else
4528 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4529 fi
4530 ;;
4531 *)
4532 OPT="-O3 -Wall $STRICT_PROTO"
4533 ;;
4534 esac
4535 case $ac_sys_system in
4536 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4537 ;;
4538 esac
4539 ;;
4540
4541 *)
4542 OPT="-O"
4543 ;;
4544 esac
4545
4546 # The current (beta) Monterey compiler dies with optimizations
4547 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
4548 case $ac_sys_system in
4549 Monterey*)
4550 OPT=""
4551 ;;
4552 esac
4553
4554fi
4555
4556
4557
4558# The -arch flags for universal builds on OSX
4559UNIVERSAL_ARCH_FLAGS=
4560
4561
4562# tweak BASECFLAGS based on compiler and platform
4563case $GCC in
4564yes)
4565 # Python violates C99 rules, by casting between incompatible
4566 # pointer types. GCC may generate bad code as a result of that,
4567 # so use -fno-strict-aliasing if supported.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004568 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4569echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004570 ac_save_cc="$CC"
4571 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004572 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4573 echo $ECHO_N "(cached) $ECHO_C" >&6
4574else
4575 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004576 ac_cv_no_strict_aliasing_ok=no
4577else
4578 cat >conftest.$ac_ext <<_ACEOF
4579/* confdefs.h. */
4580_ACEOF
4581cat confdefs.h >>conftest.$ac_ext
4582cat >>conftest.$ac_ext <<_ACEOF
4583/* end confdefs.h. */
4584int main() { return 0; }
4585_ACEOF
4586rm -f conftest$ac_exeext
4587if { (ac_try="$ac_link"
4588case "(($ac_try" in
4589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4590 *) ac_try_echo=$ac_try;;
4591esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004593 (eval "$ac_link") 2>&5
4594 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004596 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4597 { (case "(($ac_try" in
4598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4599 *) ac_try_echo=$ac_try;;
4600esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004602 (eval "$ac_try") 2>&5
4603 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004605 (exit $ac_status); }; }; then
4606 ac_cv_no_strict_aliasing_ok=yes
4607else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004608 echo "$as_me: program exited with status $ac_status" >&5
4609echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004610sed 's/^/| /' conftest.$ac_ext >&5
4611
4612( exit $ac_status )
4613ac_cv_no_strict_aliasing_ok=no
4614fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4616fi
4617
4618
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004619fi
4620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004621 CC="$ac_save_cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004622 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4623echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004624 if test $ac_cv_no_strict_aliasing_ok = yes
4625 then
4626 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4627 fi
4628
4629 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4630 # support. Without this, treatment of subnormals doesn't follow
4631 # the standard.
4632 case $ac_sys_machine in
4633 alpha*)
4634 BASECFLAGS="$BASECFLAGS -mieee"
4635 ;;
4636 esac
4637
4638 case $ac_sys_system in
4639 SCO_SV*)
4640 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4641 ;;
4642 # is there any other compiler on Darwin besides gcc?
4643 Darwin*)
4644 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4645 # used to be here, but non-Apple gcc doesn't accept them.
4646
4647
4648 if test "${enable_universalsdk}"; then
4649 UNIVERSAL_ARCH_FLAGS=""
4650 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4651 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4652 ARCH_RUN_32BIT=""
4653
4654 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4655 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004656 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004657
4658 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4659 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4660 ARCH_RUN_32BIT="arch -i386 -ppc"
4661
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004662 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4663 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4664 ARCH_RUN_32BIT="arch -i386"
4665
4666 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4667 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4668 ARCH_RUN_32BIT="arch -i386 -ppc"
4669
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004670 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004671 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4672echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004673 { (exit 1); exit 1; }; }
4674
4675 fi
4676
4677
4678 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4679 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4680 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4681 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4682 fi
4683 fi
4684
4685 # Calculate the right deployment target for this build.
4686 #
4687 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4688 if test ${cur_target} '>' 10.2; then
4689 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004690 if test ${enable_universalsdk}; then
4691 if test "${UNIVERSAL_ARCHS}" = "all"; then
4692 # Ensure that the default platform for a
4693 # 4-way universal build is OSX 10.5,
4694 # that's the first OS release where
4695 # 4-way builds make sense.
4696 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004697
4698 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4699 cur_target='10.5'
4700
4701 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4702 cur_target='10.5'
4703
4704 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4705 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004706 fi
4707 else
4708 if test `arch` = "i386"; then
4709 # On Intel macs default to a deployment
4710 # target of 10.4, that's the first OSX
4711 # release with Intel support.
4712 cur_target="10.4"
4713 fi
4714 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004715 fi
4716 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4717
4718 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4719 # environment with a value that is the same as what we'll use
4720 # in the Makefile to ensure that we'll get the same compiler
4721 # environment during configure and build time.
4722 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4723 export MACOSX_DEPLOYMENT_TARGET
4724 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4725
4726 ;;
4727 OSF*)
4728 BASECFLAGS="$BASECFLAGS -mieee"
4729 ;;
4730 esac
4731 ;;
4732
4733*)
4734 case $ac_sys_system in
4735 OpenUNIX*|UnixWare*)
4736 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4737 ;;
4738 OSF*)
4739 BASECFLAGS="$BASECFLAGS -ieee -std"
4740 ;;
4741 SCO_SV*)
4742 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4743 ;;
4744 esac
4745 ;;
4746esac
4747
4748if test "$Py_DEBUG" = 'true'; then
4749 :
4750else
4751 OPT="-DNDEBUG $OPT"
4752fi
4753
4754if test "$ac_arch_flags"
4755then
4756 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4757fi
4758
4759# disable check for icc since it seems to pass, but generates a warning
4760if test "$CC" = icc
4761then
4762 ac_cv_opt_olimit_ok=no
4763fi
4764
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004765{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4766echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004768 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769else
4770 ac_save_cc="$CC"
4771CC="$CC -OPT:Olimit=0"
4772if test "$cross_compiling" = yes; then
4773 ac_cv_opt_olimit_ok=no
4774else
4775 cat >conftest.$ac_ext <<_ACEOF
4776/* confdefs.h. */
4777_ACEOF
4778cat confdefs.h >>conftest.$ac_ext
4779cat >>conftest.$ac_ext <<_ACEOF
4780/* end confdefs.h. */
4781int main() { return 0; }
4782_ACEOF
4783rm -f conftest$ac_exeext
4784if { (ac_try="$ac_link"
4785case "(($ac_try" in
4786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4787 *) ac_try_echo=$ac_try;;
4788esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790 (eval "$ac_link") 2>&5
4791 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4794 { (case "(($ac_try" in
4795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4796 *) ac_try_echo=$ac_try;;
4797esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004799 (eval "$ac_try") 2>&5
4800 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004802 (exit $ac_status); }; }; then
4803 ac_cv_opt_olimit_ok=yes
4804else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004805 echo "$as_me: program exited with status $ac_status" >&5
4806echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004807sed 's/^/| /' conftest.$ac_ext >&5
4808
4809( exit $ac_status )
4810ac_cv_opt_olimit_ok=no
4811fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4813fi
4814
4815
4816CC="$ac_save_cc"
4817fi
4818
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004819{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4820echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821if test $ac_cv_opt_olimit_ok = yes; then
4822 case $ac_sys_system in
4823 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4824 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4825 # environment?
4826 Darwin*)
4827 ;;
4828 *)
4829 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4830 ;;
4831 esac
4832else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004833 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4834echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004836 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837else
4838 ac_save_cc="$CC"
4839 CC="$CC -Olimit 1500"
4840 if test "$cross_compiling" = yes; then
4841 ac_cv_olimit_ok=no
4842else
4843 cat >conftest.$ac_ext <<_ACEOF
4844/* confdefs.h. */
4845_ACEOF
4846cat confdefs.h >>conftest.$ac_ext
4847cat >>conftest.$ac_ext <<_ACEOF
4848/* end confdefs.h. */
4849int main() { return 0; }
4850_ACEOF
4851rm -f conftest$ac_exeext
4852if { (ac_try="$ac_link"
4853case "(($ac_try" in
4854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4855 *) ac_try_echo=$ac_try;;
4856esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858 (eval "$ac_link") 2>&5
4859 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4862 { (case "(($ac_try" in
4863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4864 *) ac_try_echo=$ac_try;;
4865esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867 (eval "$ac_try") 2>&5
4868 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004870 (exit $ac_status); }; }; then
4871 ac_cv_olimit_ok=yes
4872else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004873 echo "$as_me: program exited with status $ac_status" >&5
4874echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875sed 's/^/| /' conftest.$ac_ext >&5
4876
4877( exit $ac_status )
4878ac_cv_olimit_ok=no
4879fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4881fi
4882
4883
4884 CC="$ac_save_cc"
4885fi
4886
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004887 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4888echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889 if test $ac_cv_olimit_ok = yes; then
4890 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4891 fi
4892fi
4893
4894# Check whether GCC supports PyArg_ParseTuple format
4895if test "$GCC" = "yes"
4896then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004897 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4898echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899 save_CFLAGS=$CFLAGS
4900 CFLAGS="$CFLAGS -Werror"
4901 cat >conftest.$ac_ext <<_ACEOF
4902/* confdefs.h. */
4903_ACEOF
4904cat confdefs.h >>conftest.$ac_ext
4905cat >>conftest.$ac_ext <<_ACEOF
4906/* end confdefs.h. */
4907
4908 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4909
4910int
4911main ()
4912{
4913
4914 ;
4915 return 0;
4916}
4917_ACEOF
4918rm -f conftest.$ac_objext
4919if { (ac_try="$ac_compile"
4920case "(($ac_try" in
4921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4922 *) ac_try_echo=$ac_try;;
4923esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 (eval "$ac_compile") 2>conftest.er1
4926 ac_status=$?
4927 grep -v '^ *+' conftest.er1 >conftest.err
4928 rm -f conftest.er1
4929 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931 (exit $ac_status); } && {
4932 test -z "$ac_c_werror_flag" ||
4933 test ! -s conftest.err
4934 } && test -s conftest.$ac_objext; then
4935
4936cat >>confdefs.h <<\_ACEOF
4937#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4938_ACEOF
4939
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004940 { echo "$as_me:$LINENO: result: yes" >&5
4941echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004943 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944sed 's/^/| /' conftest.$ac_ext >&5
4945
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004946 { echo "$as_me:$LINENO: result: no" >&5
4947echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948
4949fi
4950
4951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4952 CFLAGS=$save_CFLAGS
4953fi
4954
4955# On some compilers, pthreads are available without further options
4956# (e.g. MacOS X). On some of these systems, the compiler will not
4957# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4958# So we have to see first whether pthreads are available without
4959# options before we can check whether -Kpthread improves anything.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004960{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4961echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004963 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964else
4965 if test "$cross_compiling" = yes; then
4966 ac_cv_pthread_is_default=no
4967else
4968 cat >conftest.$ac_ext <<_ACEOF
4969/* confdefs.h. */
4970_ACEOF
4971cat confdefs.h >>conftest.$ac_ext
4972cat >>conftest.$ac_ext <<_ACEOF
4973/* end confdefs.h. */
4974
4975#include <pthread.h>
4976
4977void* routine(void* p){return NULL;}
4978
4979int main(){
4980 pthread_t p;
4981 if(pthread_create(&p,NULL,routine,NULL)!=0)
4982 return 1;
4983 (void)pthread_detach(p);
4984 return 0;
4985}
4986
4987_ACEOF
4988rm -f conftest$ac_exeext
4989if { (ac_try="$ac_link"
4990case "(($ac_try" in
4991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4992 *) ac_try_echo=$ac_try;;
4993esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995 (eval "$ac_link") 2>&5
4996 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4999 { (case "(($ac_try" in
5000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5001 *) ac_try_echo=$ac_try;;
5002esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004 (eval "$ac_try") 2>&5
5005 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007 (exit $ac_status); }; }; then
5008
5009 ac_cv_pthread_is_default=yes
5010 ac_cv_kthread=no
5011 ac_cv_pthread=no
5012
5013else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005014 echo "$as_me: program exited with status $ac_status" >&5
5015echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005016sed 's/^/| /' conftest.$ac_ext >&5
5017
5018( exit $ac_status )
5019ac_cv_pthread_is_default=no
5020fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5022fi
5023
5024
5025
5026fi
5027
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005028{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5029echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030
5031
5032if test $ac_cv_pthread_is_default = yes
5033then
5034 ac_cv_kpthread=no
5035else
5036# -Kpthread, if available, provides the right #defines
5037# and linker options to make pthread_create available
5038# Some compilers won't report that they do not support -Kpthread,
5039# so we need to run a program to see whether it really made the
5040# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005041{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5042echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005044 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045else
5046 ac_save_cc="$CC"
5047CC="$CC -Kpthread"
5048if test "$cross_compiling" = yes; then
5049 ac_cv_kpthread=no
5050else
5051 cat >conftest.$ac_ext <<_ACEOF
5052/* confdefs.h. */
5053_ACEOF
5054cat confdefs.h >>conftest.$ac_ext
5055cat >>conftest.$ac_ext <<_ACEOF
5056/* end confdefs.h. */
5057
5058#include <pthread.h>
5059
5060void* routine(void* p){return NULL;}
5061
5062int main(){
5063 pthread_t p;
5064 if(pthread_create(&p,NULL,routine,NULL)!=0)
5065 return 1;
5066 (void)pthread_detach(p);
5067 return 0;
5068}
5069
5070_ACEOF
5071rm -f conftest$ac_exeext
5072if { (ac_try="$ac_link"
5073case "(($ac_try" in
5074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5075 *) ac_try_echo=$ac_try;;
5076esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078 (eval "$ac_link") 2>&5
5079 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5082 { (case "(($ac_try" in
5083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5084 *) ac_try_echo=$ac_try;;
5085esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087 (eval "$ac_try") 2>&5
5088 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090 (exit $ac_status); }; }; then
5091 ac_cv_kpthread=yes
5092else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005093 echo "$as_me: program exited with status $ac_status" >&5
5094echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005095sed 's/^/| /' conftest.$ac_ext >&5
5096
5097( exit $ac_status )
5098ac_cv_kpthread=no
5099fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5101fi
5102
5103
5104CC="$ac_save_cc"
5105fi
5106
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005107{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5108echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109fi
5110
5111if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5112then
5113# -Kthread, if available, provides the right #defines
5114# and linker options to make pthread_create available
5115# Some compilers won't report that they do not support -Kthread,
5116# so we need to run a program to see whether it really made the
5117# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005118{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5119echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005121 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122else
5123 ac_save_cc="$CC"
5124CC="$CC -Kthread"
5125if test "$cross_compiling" = yes; then
5126 ac_cv_kthread=no
5127else
5128 cat >conftest.$ac_ext <<_ACEOF
5129/* confdefs.h. */
5130_ACEOF
5131cat confdefs.h >>conftest.$ac_ext
5132cat >>conftest.$ac_ext <<_ACEOF
5133/* end confdefs.h. */
5134
5135#include <pthread.h>
5136
5137void* routine(void* p){return NULL;}
5138
5139int main(){
5140 pthread_t p;
5141 if(pthread_create(&p,NULL,routine,NULL)!=0)
5142 return 1;
5143 (void)pthread_detach(p);
5144 return 0;
5145}
5146
5147_ACEOF
5148rm -f conftest$ac_exeext
5149if { (ac_try="$ac_link"
5150case "(($ac_try" in
5151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5152 *) ac_try_echo=$ac_try;;
5153esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155 (eval "$ac_link") 2>&5
5156 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005164 (eval "$ac_try") 2>&5
5165 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005167 (exit $ac_status); }; }; then
5168 ac_cv_kthread=yes
5169else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005170 echo "$as_me: program exited with status $ac_status" >&5
5171echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172sed 's/^/| /' conftest.$ac_ext >&5
5173
5174( exit $ac_status )
5175ac_cv_kthread=no
5176fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5178fi
5179
5180
5181CC="$ac_save_cc"
5182fi
5183
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005184{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5185echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186fi
5187
5188if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5189then
5190# -pthread, if available, provides the right #defines
5191# and linker options to make pthread_create available
5192# Some compilers won't report that they do not support -pthread,
5193# so we need to run a program to see whether it really made the
5194# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005195{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5196echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005198 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199else
5200 ac_save_cc="$CC"
5201CC="$CC -pthread"
5202if test "$cross_compiling" = yes; then
5203 ac_cv_pthread=no
5204else
5205 cat >conftest.$ac_ext <<_ACEOF
5206/* confdefs.h. */
5207_ACEOF
5208cat confdefs.h >>conftest.$ac_ext
5209cat >>conftest.$ac_ext <<_ACEOF
5210/* end confdefs.h. */
5211
5212#include <pthread.h>
5213
5214void* routine(void* p){return NULL;}
5215
5216int main(){
5217 pthread_t p;
5218 if(pthread_create(&p,NULL,routine,NULL)!=0)
5219 return 1;
5220 (void)pthread_detach(p);
5221 return 0;
5222}
5223
5224_ACEOF
5225rm -f conftest$ac_exeext
5226if { (ac_try="$ac_link"
5227case "(($ac_try" in
5228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5229 *) ac_try_echo=$ac_try;;
5230esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232 (eval "$ac_link") 2>&5
5233 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005235 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5236 { (case "(($ac_try" in
5237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5238 *) ac_try_echo=$ac_try;;
5239esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005241 (eval "$ac_try") 2>&5
5242 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005244 (exit $ac_status); }; }; then
5245 ac_cv_pthread=yes
5246else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005247 echo "$as_me: program exited with status $ac_status" >&5
5248echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005249sed 's/^/| /' conftest.$ac_ext >&5
5250
5251( exit $ac_status )
5252ac_cv_pthread=no
5253fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5255fi
5256
5257
5258CC="$ac_save_cc"
5259fi
5260
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005261{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5262echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005263fi
5264
5265# If we have set a CC compiler flag for thread support then
5266# check if it works for CXX, too.
5267ac_cv_cxx_thread=no
5268if test ! -z "$CXX"
5269then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005270{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5271echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005272ac_save_cxx="$CXX"
5273
5274if test "$ac_cv_kpthread" = "yes"
5275then
5276 CXX="$CXX -Kpthread"
5277 ac_cv_cxx_thread=yes
5278elif test "$ac_cv_kthread" = "yes"
5279then
5280 CXX="$CXX -Kthread"
5281 ac_cv_cxx_thread=yes
5282elif test "$ac_cv_pthread" = "yes"
5283then
5284 CXX="$CXX -pthread"
5285 ac_cv_cxx_thread=yes
5286fi
5287
5288if test $ac_cv_cxx_thread = yes
5289then
5290 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5291 $CXX -c conftest.$ac_ext 2>&5
5292 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5293 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5294 then
5295 ac_cv_cxx_thread=yes
5296 else
5297 ac_cv_cxx_thread=no
5298 fi
5299 rm -fr conftest*
5300fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005301{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5302echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303fi
5304CXX="$ac_save_cxx"
5305
5306
5307# checks for header files
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005308{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5309echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005311 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312else
5313 cat >conftest.$ac_ext <<_ACEOF
5314/* confdefs.h. */
5315_ACEOF
5316cat confdefs.h >>conftest.$ac_ext
5317cat >>conftest.$ac_ext <<_ACEOF
5318/* end confdefs.h. */
5319#include <stdlib.h>
5320#include <stdarg.h>
5321#include <string.h>
5322#include <float.h>
5323
5324int
5325main ()
5326{
5327
5328 ;
5329 return 0;
5330}
5331_ACEOF
5332rm -f conftest.$ac_objext
5333if { (ac_try="$ac_compile"
5334case "(($ac_try" in
5335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5336 *) ac_try_echo=$ac_try;;
5337esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339 (eval "$ac_compile") 2>conftest.er1
5340 ac_status=$?
5341 grep -v '^ *+' conftest.er1 >conftest.err
5342 rm -f conftest.er1
5343 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345 (exit $ac_status); } && {
5346 test -z "$ac_c_werror_flag" ||
5347 test ! -s conftest.err
5348 } && test -s conftest.$ac_objext; then
5349 ac_cv_header_stdc=yes
5350else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005351 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352sed 's/^/| /' conftest.$ac_ext >&5
5353
5354 ac_cv_header_stdc=no
5355fi
5356
5357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5358
5359if test $ac_cv_header_stdc = yes; then
5360 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5361 cat >conftest.$ac_ext <<_ACEOF
5362/* confdefs.h. */
5363_ACEOF
5364cat confdefs.h >>conftest.$ac_ext
5365cat >>conftest.$ac_ext <<_ACEOF
5366/* end confdefs.h. */
5367#include <string.h>
5368
5369_ACEOF
5370if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5371 $EGREP "memchr" >/dev/null 2>&1; then
5372 :
5373else
5374 ac_cv_header_stdc=no
5375fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005376rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377
5378fi
5379
5380if test $ac_cv_header_stdc = yes; then
5381 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5382 cat >conftest.$ac_ext <<_ACEOF
5383/* confdefs.h. */
5384_ACEOF
5385cat confdefs.h >>conftest.$ac_ext
5386cat >>conftest.$ac_ext <<_ACEOF
5387/* end confdefs.h. */
5388#include <stdlib.h>
5389
5390_ACEOF
5391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5392 $EGREP "free" >/dev/null 2>&1; then
5393 :
5394else
5395 ac_cv_header_stdc=no
5396fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005397rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398
5399fi
5400
5401if test $ac_cv_header_stdc = yes; then
5402 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5403 if test "$cross_compiling" = yes; then
5404 :
5405else
5406 cat >conftest.$ac_ext <<_ACEOF
5407/* confdefs.h. */
5408_ACEOF
5409cat confdefs.h >>conftest.$ac_ext
5410cat >>conftest.$ac_ext <<_ACEOF
5411/* end confdefs.h. */
5412#include <ctype.h>
5413#include <stdlib.h>
5414#if ((' ' & 0x0FF) == 0x020)
5415# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5416# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5417#else
5418# define ISLOWER(c) \
5419 (('a' <= (c) && (c) <= 'i') \
5420 || ('j' <= (c) && (c) <= 'r') \
5421 || ('s' <= (c) && (c) <= 'z'))
5422# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5423#endif
5424
5425#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5426int
5427main ()
5428{
5429 int i;
5430 for (i = 0; i < 256; i++)
5431 if (XOR (islower (i), ISLOWER (i))
5432 || toupper (i) != TOUPPER (i))
5433 return 2;
5434 return 0;
5435}
5436_ACEOF
5437rm -f conftest$ac_exeext
5438if { (ac_try="$ac_link"
5439case "(($ac_try" in
5440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5441 *) ac_try_echo=$ac_try;;
5442esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444 (eval "$ac_link") 2>&5
5445 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5448 { (case "(($ac_try" in
5449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5450 *) ac_try_echo=$ac_try;;
5451esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453 (eval "$ac_try") 2>&5
5454 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456 (exit $ac_status); }; }; then
5457 :
5458else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005459 echo "$as_me: program exited with status $ac_status" >&5
5460echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461sed 's/^/| /' conftest.$ac_ext >&5
5462
5463( exit $ac_status )
5464ac_cv_header_stdc=no
5465fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5467fi
5468
5469
5470fi
5471fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005472{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5473echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005474if test $ac_cv_header_stdc = yes; then
5475
5476cat >>confdefs.h <<\_ACEOF
5477#define STDC_HEADERS 1
5478_ACEOF
5479
5480fi
5481
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005482# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5493 inttypes.h stdint.h unistd.h
5494do
5495as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5496{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5497echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5498if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5499 echo $ECHO_N "(cached) $ECHO_C" >&6
5500else
5501 cat >conftest.$ac_ext <<_ACEOF
5502/* confdefs.h. */
5503_ACEOF
5504cat confdefs.h >>conftest.$ac_ext
5505cat >>conftest.$ac_ext <<_ACEOF
5506/* end confdefs.h. */
5507$ac_includes_default
5508
5509#include <$ac_header>
5510_ACEOF
5511rm -f conftest.$ac_objext
5512if { (ac_try="$ac_compile"
5513case "(($ac_try" in
5514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5515 *) ac_try_echo=$ac_try;;
5516esac
5517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5518 (eval "$ac_compile") 2>conftest.er1
5519 ac_status=$?
5520 grep -v '^ *+' conftest.er1 >conftest.err
5521 rm -f conftest.er1
5522 cat conftest.err >&5
5523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5524 (exit $ac_status); } && {
5525 test -z "$ac_c_werror_flag" ||
5526 test ! -s conftest.err
5527 } && test -s conftest.$ac_objext; then
5528 eval "$as_ac_Header=yes"
5529else
5530 echo "$as_me: failed program was:" >&5
5531sed 's/^/| /' conftest.$ac_ext >&5
5532
5533 eval "$as_ac_Header=no"
5534fi
5535
5536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5537fi
5538ac_res=`eval echo '${'$as_ac_Header'}'`
5539 { echo "$as_me:$LINENO: result: $ac_res" >&5
5540echo "${ECHO_T}$ac_res" >&6; }
5541if test `eval echo '${'$as_ac_Header'}'` = yes; then
5542 cat >>confdefs.h <<_ACEOF
5543#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5544_ACEOF
5545
5546fi
5547
5548done
5549
5550
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551
Martin v. Löwis11437992002-04-12 09:54:03 +00005552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
Anthony Baxter8a560de2004-10-13 15:30:56 +00005587
Martin v. Löwisc3001752005-01-23 09:27:24 +00005588
Martin v. Löwis11017b12006-01-14 18:12:57 +00005589
Thomas Wouters477c8d52006-05-27 19:21:47 +00005590
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005591
5592
5593
5594
5595
5596
5597
5598
Thomas Wouters89f507f2006-12-13 04:49:30 +00005599
Christian Heimes043d6f62008-01-07 17:19:16 +00005600
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005601
5602
Christian Heimesbbe741d2008-03-28 10:53:29 +00005603
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005604
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005605for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5606fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005607ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005608shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005609unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005610sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5611sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005612sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005613sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005614sys/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 +00005615sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005616bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005617do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005618as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005619if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005620 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5621echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005622if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005624fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005625ac_res=`eval echo '${'$as_ac_Header'}'`
5626 { echo "$as_me:$LINENO: result: $ac_res" >&5
5627echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005628else
Martin v. Löwis11437992002-04-12 09:54:03 +00005629 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005630{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5631echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005632cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005633/* confdefs.h. */
5634_ACEOF
5635cat confdefs.h >>conftest.$ac_ext
5636cat >>conftest.$ac_ext <<_ACEOF
5637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005638$ac_includes_default
5639#include <$ac_header>
5640_ACEOF
5641rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005642if { (ac_try="$ac_compile"
5643case "(($ac_try" in
5644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5645 *) ac_try_echo=$ac_try;;
5646esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005650 grep -v '^ *+' conftest.er1 >conftest.err
5651 rm -f conftest.er1
5652 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005654 (exit $ac_status); } && {
5655 test -z "$ac_c_werror_flag" ||
5656 test ! -s conftest.err
5657 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005658 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005659else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005661sed 's/^/| /' conftest.$ac_ext >&5
5662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005663 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005665
5666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005667{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5668echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005669
5670# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005671{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5672echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005674/* confdefs.h. */
5675_ACEOF
5676cat confdefs.h >>conftest.$ac_ext
5677cat >>conftest.$ac_ext <<_ACEOF
5678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005679#include <$ac_header>
5680_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005681if { (ac_try="$ac_cpp conftest.$ac_ext"
5682case "(($ac_try" in
5683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5684 *) ac_try_echo=$ac_try;;
5685esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005687 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005688 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005689 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005690 rm -f conftest.er1
5691 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005693 (exit $ac_status); } >/dev/null && {
5694 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5695 test ! -s conftest.err
5696 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005697 ac_header_preproc=yes
5698else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005700sed 's/^/| /' conftest.$ac_ext >&5
5701
Martin v. Löwis11437992002-04-12 09:54:03 +00005702 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005704
Martin v. Löwis11437992002-04-12 09:54:03 +00005705rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005706{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5707echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005708
5709# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005710case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5711 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005712 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5713echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5714 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5715echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005716 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005717 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005718 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005719 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5720echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5721 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5722echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5723 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5724echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5725 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5726echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5727 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5728echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5729 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5730echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005731 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005732## -------------------------------------- ##
5733## Report this to http://bugs.python.org/ ##
5734## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005735_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005736 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005737 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005738esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005739{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5740echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005741if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005742 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005743else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005744 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005746ac_res=`eval echo '${'$as_ac_Header'}'`
5747 { echo "$as_me:$LINENO: result: $ac_res" >&5
5748echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005749
5750fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005751if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005752 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005753#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005754_ACEOF
5755
5756fi
5757
Guido van Rossum627b2d71993-12-24 10:39:16 +00005758done
5759
Martin v. Löwis11437992002-04-12 09:54:03 +00005760
5761
5762
5763
5764
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005765ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005766for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005767 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5768{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5769echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005770if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005771 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005772else
Martin v. Löwis11437992002-04-12 09:54:03 +00005773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005774/* confdefs.h. */
5775_ACEOF
5776cat confdefs.h >>conftest.$ac_ext
5777cat >>conftest.$ac_ext <<_ACEOF
5778/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005779#include <sys/types.h>
5780#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005781
Martin v. Löwis11437992002-04-12 09:54:03 +00005782int
5783main ()
5784{
5785if ((DIR *) 0)
5786return 0;
5787 ;
5788 return 0;
5789}
5790_ACEOF
5791rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005792if { (ac_try="$ac_compile"
5793case "(($ac_try" in
5794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5795 *) ac_try_echo=$ac_try;;
5796esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005800 grep -v '^ *+' conftest.er1 >conftest.err
5801 rm -f conftest.er1
5802 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005804 (exit $ac_status); } && {
5805 test -z "$ac_c_werror_flag" ||
5806 test ! -s conftest.err
5807 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005808 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005809else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005811sed 's/^/| /' conftest.$ac_ext >&5
5812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005813 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005815
5816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005817fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005818ac_res=`eval echo '${'$as_ac_Header'}'`
5819 { echo "$as_me:$LINENO: result: $ac_res" >&5
5820echo "${ECHO_T}$ac_res" >&6; }
5821if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005822 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005823#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005824_ACEOF
5825
5826ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005827fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005828
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005829done
5830# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5831if test $ac_header_dirent = dirent.h; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005832 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5833echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005834if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005835 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005836else
Martin v. Löwis11437992002-04-12 09:54:03 +00005837 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005838cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005839/* confdefs.h. */
5840_ACEOF
5841cat confdefs.h >>conftest.$ac_ext
5842cat >>conftest.$ac_ext <<_ACEOF
5843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005845/* Override any GCC internal prototype to avoid an error.
5846 Use char because int might match the return type of a GCC
5847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005848#ifdef __cplusplus
5849extern "C"
5850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005851char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005852int
5853main ()
5854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005855return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005856 ;
5857 return 0;
5858}
5859_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005860for ac_lib in '' dir; do
5861 if test -z "$ac_lib"; then
5862 ac_res="none required"
5863 else
5864 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005865 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005866 fi
5867 rm -f conftest.$ac_objext conftest$ac_exeext
5868if { (ac_try="$ac_link"
5869case "(($ac_try" in
5870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5871 *) ac_try_echo=$ac_try;;
5872esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005874 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005875 ac_status=$?
5876 grep -v '^ *+' conftest.er1 >conftest.err
5877 rm -f conftest.er1
5878 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005880 (exit $ac_status); } && {
5881 test -z "$ac_c_werror_flag" ||
5882 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005883 } && test -s conftest$ac_exeext &&
5884 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005885 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005886else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005887 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005888sed 's/^/| /' conftest.$ac_ext >&5
5889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005890
Thomas Wouters477c8d52006-05-27 19:21:47 +00005891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005892
5893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5894 conftest$ac_exeext
5895 if test "${ac_cv_search_opendir+set}" = set; then
5896 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005898done
5899if test "${ac_cv_search_opendir+set}" = set; then
5900 :
5901else
5902 ac_cv_search_opendir=no
5903fi
5904rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005905LIBS=$ac_func_search_save_LIBS
5906fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005907{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5908echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005909ac_res=$ac_cv_search_opendir
5910if test "$ac_res" != no; then
5911 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005912
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005913fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005914
Michael W. Hudson54241132001-12-07 15:38:26 +00005915else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005916 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5917echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005918if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005919 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005920else
5921 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005923/* confdefs.h. */
5924_ACEOF
5925cat confdefs.h >>conftest.$ac_ext
5926cat >>conftest.$ac_ext <<_ACEOF
5927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005929/* Override any GCC internal prototype to avoid an error.
5930 Use char because int might match the return type of a GCC
5931 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005932#ifdef __cplusplus
5933extern "C"
5934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005935char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005936int
5937main ()
5938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005939return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005940 ;
5941 return 0;
5942}
5943_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005944for ac_lib in '' x; do
5945 if test -z "$ac_lib"; then
5946 ac_res="none required"
5947 else
5948 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005949 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005950 fi
5951 rm -f conftest.$ac_objext conftest$ac_exeext
5952if { (ac_try="$ac_link"
5953case "(($ac_try" in
5954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5955 *) ac_try_echo=$ac_try;;
5956esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005958 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005959 ac_status=$?
5960 grep -v '^ *+' conftest.er1 >conftest.err
5961 rm -f conftest.er1
5962 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005964 (exit $ac_status); } && {
5965 test -z "$ac_c_werror_flag" ||
5966 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005967 } && test -s conftest$ac_exeext &&
5968 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005969 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005970else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005971 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005972sed 's/^/| /' conftest.$ac_ext >&5
5973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005974
Thomas Wouters477c8d52006-05-27 19:21:47 +00005975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005976
5977rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5978 conftest$ac_exeext
5979 if test "${ac_cv_search_opendir+set}" = set; then
5980 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005982done
5983if test "${ac_cv_search_opendir+set}" = set; then
5984 :
5985else
5986 ac_cv_search_opendir=no
5987fi
5988rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005989LIBS=$ac_func_search_save_LIBS
5990fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005991{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5992echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005993ac_res=$ac_cv_search_opendir
5994if test "$ac_res" != no; then
5995 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005996
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005997fi
5998
5999fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006000
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006001{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6002echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006004 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006005else
6006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006007/* confdefs.h. */
6008_ACEOF
6009cat confdefs.h >>conftest.$ac_ext
6010cat >>conftest.$ac_ext <<_ACEOF
6011/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006012#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013int
6014main ()
6015{
6016return makedev(0, 0);
6017 ;
6018 return 0;
6019}
6020_ACEOF
6021rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006022if { (ac_try="$ac_link"
6023case "(($ac_try" in
6024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6025 *) ac_try_echo=$ac_try;;
6026esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006028 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006030 grep -v '^ *+' conftest.er1 >conftest.err
6031 rm -f conftest.er1
6032 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006034 (exit $ac_status); } && {
6035 test -z "$ac_c_werror_flag" ||
6036 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006037 } && test -s conftest$ac_exeext &&
6038 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006039 ac_cv_header_sys_types_h_makedev=yes
6040else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006042sed 's/^/| /' conftest.$ac_ext >&5
6043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006044 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006046
6047rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049
6050fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006051{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6052echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053
6054if test $ac_cv_header_sys_types_h_makedev = no; then
6055if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006056 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6057echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006058if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006059 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006061{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6062echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006063else
6064 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006065{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6066echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006068/* confdefs.h. */
6069_ACEOF
6070cat confdefs.h >>conftest.$ac_ext
6071cat >>conftest.$ac_ext <<_ACEOF
6072/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073$ac_includes_default
6074#include <sys/mkdev.h>
6075_ACEOF
6076rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006077if { (ac_try="$ac_compile"
6078case "(($ac_try" in
6079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6080 *) ac_try_echo=$ac_try;;
6081esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006085 grep -v '^ *+' conftest.er1 >conftest.err
6086 rm -f conftest.er1
6087 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006089 (exit $ac_status); } && {
6090 test -z "$ac_c_werror_flag" ||
6091 test ! -s conftest.err
6092 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093 ac_header_compiler=yes
6094else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006096sed 's/^/| /' conftest.$ac_ext >&5
6097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006098 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006100
6101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006102{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6103echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104
6105# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006106{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6107echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006109/* confdefs.h. */
6110_ACEOF
6111cat confdefs.h >>conftest.$ac_ext
6112cat >>conftest.$ac_ext <<_ACEOF
6113/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114#include <sys/mkdev.h>
6115_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116if { (ac_try="$ac_cpp conftest.$ac_ext"
6117case "(($ac_try" in
6118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6119 *) ac_try_echo=$ac_try;;
6120esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006122 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006124 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125 rm -f conftest.er1
6126 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006128 (exit $ac_status); } >/dev/null && {
6129 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6130 test ! -s conftest.err
6131 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132 ac_header_preproc=yes
6133else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006135sed 's/^/| /' conftest.$ac_ext >&5
6136
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006137 ac_header_preproc=no
6138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006141{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6142echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143
6144# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006145case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6146 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006147 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6148echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6149 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6150echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006151 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006152 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006153 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006154 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6155echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6156 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6157echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6158 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6159echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6160 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6161echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6162 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6163echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6164 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6165echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006167## -------------------------------------- ##
6168## Report this to http://bugs.python.org/ ##
6169## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006170_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006172 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006174{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6175echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006177 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178else
6179 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6180fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006181{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6182echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183
6184fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006185if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186
6187cat >>confdefs.h <<\_ACEOF
6188#define MAJOR_IN_MKDEV 1
6189_ACEOF
6190
6191fi
6192
6193
6194
6195 if test $ac_cv_header_sys_mkdev_h = no; then
6196 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006197 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6198echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006200 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006202{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6203echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204else
6205 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006206{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6207echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006209/* confdefs.h. */
6210_ACEOF
6211cat confdefs.h >>conftest.$ac_ext
6212cat >>conftest.$ac_ext <<_ACEOF
6213/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214$ac_includes_default
6215#include <sys/sysmacros.h>
6216_ACEOF
6217rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006218if { (ac_try="$ac_compile"
6219case "(($ac_try" in
6220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6221 *) ac_try_echo=$ac_try;;
6222esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006226 grep -v '^ *+' conftest.er1 >conftest.err
6227 rm -f conftest.er1
6228 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006230 (exit $ac_status); } && {
6231 test -z "$ac_c_werror_flag" ||
6232 test ! -s conftest.err
6233 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006234 ac_header_compiler=yes
6235else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006237sed 's/^/| /' conftest.$ac_ext >&5
6238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241
6242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006243{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6244echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245
6246# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006247{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6248echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006250/* confdefs.h. */
6251_ACEOF
6252cat confdefs.h >>conftest.$ac_ext
6253cat >>conftest.$ac_ext <<_ACEOF
6254/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255#include <sys/sysmacros.h>
6256_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006257if { (ac_try="$ac_cpp conftest.$ac_ext"
6258case "(($ac_try" in
6259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6260 *) ac_try_echo=$ac_try;;
6261esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006263 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006265 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266 rm -f conftest.er1
6267 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006269 (exit $ac_status); } >/dev/null && {
6270 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6271 test ! -s conftest.err
6272 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273 ac_header_preproc=yes
6274else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006276sed 's/^/| /' conftest.$ac_ext >&5
6277
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278 ac_header_preproc=no
6279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006280
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006282{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6283echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284
6285# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006286case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6287 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006288 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6289echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6290 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6291echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006292 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006293 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006294 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006295 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6296echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6297 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6298echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6299 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6300echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6301 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6302echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6303 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6304echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6305 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6306echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006307 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006308## -------------------------------------- ##
6309## Report this to http://bugs.python.org/ ##
6310## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006311_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006312 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006313 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006315{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6316echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006318 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006319else
6320 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6321fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006322{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6323echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006324
6325fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006326if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327
6328cat >>confdefs.h <<\_ACEOF
6329#define MAJOR_IN_SYSMACROS 1
6330_ACEOF
6331
6332fi
6333
6334
6335 fi
6336fi
6337
Michael W. Hudson54241132001-12-07 15:38:26 +00006338
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006339# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006340
6341for ac_header in term.h
6342do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006343as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6344{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6345echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006346if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006347 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006348else
6349 cat >conftest.$ac_ext <<_ACEOF
6350/* confdefs.h. */
6351_ACEOF
6352cat confdefs.h >>conftest.$ac_ext
6353cat >>conftest.$ac_ext <<_ACEOF
6354/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006355
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006356#ifdef HAVE_CURSES_H
6357#include <curses.h>
6358#endif
6359
6360
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006361#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006362_ACEOF
6363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006364if { (ac_try="$ac_compile"
6365case "(($ac_try" in
6366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6367 *) ac_try_echo=$ac_try;;
6368esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006371 ac_status=$?
6372 grep -v '^ *+' conftest.er1 >conftest.err
6373 rm -f conftest.er1
6374 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006376 (exit $ac_status); } && {
6377 test -z "$ac_c_werror_flag" ||
6378 test ! -s conftest.err
6379 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006380 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006381else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006382 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006383sed 's/^/| /' conftest.$ac_ext >&5
6384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006385 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006387
6388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006389fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006390ac_res=`eval echo '${'$as_ac_Header'}'`
6391 { echo "$as_me:$LINENO: result: $ac_res" >&5
6392echo "${ECHO_T}$ac_res" >&6; }
6393if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006394 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006395#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006396_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006398fi
6399
6400done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006401
6402
Martin v. Löwis11017b12006-01-14 18:12:57 +00006403# On Linux, netlink.h requires asm/types.h
6404
6405for ac_header in linux/netlink.h
6406do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006407as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6408{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6409echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006410if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006411 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006412else
6413 cat >conftest.$ac_ext <<_ACEOF
6414/* confdefs.h. */
6415_ACEOF
6416cat confdefs.h >>conftest.$ac_ext
6417cat >>conftest.$ac_ext <<_ACEOF
6418/* end confdefs.h. */
6419
6420#ifdef HAVE_ASM_TYPES_H
6421#include <asm/types.h>
6422#endif
6423#ifdef HAVE_SYS_SOCKET_H
6424#include <sys/socket.h>
6425#endif
6426
6427
6428#include <$ac_header>
6429_ACEOF
6430rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006431if { (ac_try="$ac_compile"
6432case "(($ac_try" in
6433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6434 *) ac_try_echo=$ac_try;;
6435esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438 ac_status=$?
6439 grep -v '^ *+' conftest.er1 >conftest.err
6440 rm -f conftest.er1
6441 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006443 (exit $ac_status); } && {
6444 test -z "$ac_c_werror_flag" ||
6445 test ! -s conftest.err
6446 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006447 eval "$as_ac_Header=yes"
6448else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006449 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006450sed 's/^/| /' conftest.$ac_ext >&5
6451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006452 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006454
6455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006456fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006457ac_res=`eval echo '${'$as_ac_Header'}'`
6458 { echo "$as_me:$LINENO: result: $ac_res" >&5
6459echo "${ECHO_T}$ac_res" >&6; }
6460if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006461 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006462#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006463_ACEOF
6464
6465fi
6466
6467done
6468
6469
Guido van Rossum627b2d71993-12-24 10:39:16 +00006470# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006471was_it_defined=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006472{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6473echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006474cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006475/* confdefs.h. */
6476_ACEOF
6477cat confdefs.h >>conftest.$ac_ext
6478cat >>conftest.$ac_ext <<_ACEOF
6479/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006480#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006481
6482_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006484 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006485 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006486else
Martin v. Löwis11437992002-04-12 09:54:03 +00006487
6488
6489cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006491_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006492
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006493
Guido van Rossum627b2d71993-12-24 10:39:16 +00006494fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006495rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006496
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006497{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6498echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006499
Neal Norwitz11690112002-07-30 01:08:28 +00006500# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006501{ echo "$as_me:$LINENO: checking for makedev" >&5
6502echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006503cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006504/* confdefs.h. */
6505_ACEOF
6506cat confdefs.h >>conftest.$ac_ext
6507cat >>conftest.$ac_ext <<_ACEOF
6508/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006509#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006510int
6511main ()
6512{
6513 makedev(0, 0)
6514 ;
6515 return 0;
6516}
6517_ACEOF
6518rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006519if { (ac_try="$ac_link"
6520case "(($ac_try" in
6521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6522 *) ac_try_echo=$ac_try;;
6523esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006525 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006527 grep -v '^ *+' conftest.er1 >conftest.err
6528 rm -f conftest.er1
6529 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006531 (exit $ac_status); } && {
6532 test -z "$ac_c_werror_flag" ||
6533 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006534 } && test -s conftest$ac_exeext &&
6535 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006536 ac_cv_has_makedev=yes
6537else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006539sed 's/^/| /' conftest.$ac_ext >&5
6540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006541 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006543
6544rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006545 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006546if test "$ac_cv_has_makedev" = "no"; then
6547 # we didn't link, try if _OSF_SOURCE will allow us to link
6548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006549/* confdefs.h. */
6550_ACEOF
6551cat confdefs.h >>conftest.$ac_ext
6552cat >>conftest.$ac_ext <<_ACEOF
6553/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006554
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006555#define _OSF_SOURCE 1
6556#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006557
Neal Norwitz11690112002-07-30 01:08:28 +00006558int
6559main ()
6560{
6561 makedev(0, 0)
6562 ;
6563 return 0;
6564}
6565_ACEOF
6566rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006567if { (ac_try="$ac_link"
6568case "(($ac_try" in
6569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6570 *) ac_try_echo=$ac_try;;
6571esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006573 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006575 grep -v '^ *+' conftest.er1 >conftest.err
6576 rm -f conftest.er1
6577 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006579 (exit $ac_status); } && {
6580 test -z "$ac_c_werror_flag" ||
6581 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006582 } && test -s conftest$ac_exeext &&
6583 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006584 ac_cv_has_makedev=yes
6585else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006587sed 's/^/| /' conftest.$ac_ext >&5
6588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006589 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006591
6592rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006593 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006594 if test "$ac_cv_has_makedev" = "yes"; then
6595
6596cat >>confdefs.h <<\_ACEOF
6597#define _OSF_SOURCE 1
6598_ACEOF
6599
6600 fi
6601fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006602{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6603echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006604if test "$ac_cv_has_makedev" = "yes"; then
6605
6606cat >>confdefs.h <<\_ACEOF
6607#define HAVE_MAKEDEV 1
6608_ACEOF
6609
6610fi
6611
Martin v. Löwis399a6892002-10-04 10:22:02 +00006612# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6613# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6614# defined, but the compiler does not support pragma redefine_extname,
6615# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6616# structures (such as rlimit64) without declaring them. As a
6617# work-around, disable LFS on such configurations
6618
6619use_lfs=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006620{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6621echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006623/* confdefs.h. */
6624_ACEOF
6625cat confdefs.h >>conftest.$ac_ext
6626cat >>conftest.$ac_ext <<_ACEOF
6627/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006628
6629#define _LARGEFILE_SOURCE 1
6630#define _FILE_OFFSET_BITS 64
6631#include <sys/resource.h>
6632
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633int
6634main ()
6635{
6636struct rlimit foo;
6637 ;
6638 return 0;
6639}
6640_ACEOF
6641rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006642if { (ac_try="$ac_compile"
6643case "(($ac_try" in
6644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6645 *) ac_try_echo=$ac_try;;
6646esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006650 grep -v '^ *+' conftest.er1 >conftest.err
6651 rm -f conftest.er1
6652 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006654 (exit $ac_status); } && {
6655 test -z "$ac_c_werror_flag" ||
6656 test ! -s conftest.err
6657 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006658 sol_lfs_bug=no
6659else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006661sed 's/^/| /' conftest.$ac_ext >&5
6662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006663 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006665
6666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006667{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6668echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006669if test "$sol_lfs_bug" = "yes"; then
6670 use_lfs=no
6671fi
6672
6673if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006674# Two defines needed to enable largefile support on various platforms
6675# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006676
Martin v. Löwis11437992002-04-12 09:54:03 +00006677cat >>confdefs.h <<\_ACEOF
6678#define _LARGEFILE_SOURCE 1
6679_ACEOF
6680
6681
6682cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006683#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006684_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006685
Martin v. Löwis399a6892002-10-04 10:22:02 +00006686fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006687
Guido van Rossum84e7b241996-08-19 21:59:00 +00006688# Add some code to confdefs.h so that the test for off_t works on SCO
6689cat >> confdefs.h <<\EOF
6690#if defined(SCO_DS)
6691#undef _OFF_T
6692#endif
6693EOF
6694
Guido van Rossumef2255b2000-03-10 22:30:29 +00006695# Type availability checks
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006696{ echo "$as_me:$LINENO: checking for mode_t" >&5
6697echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006698if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006699 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006700else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006701 cat >conftest.$ac_ext <<_ACEOF
6702/* confdefs.h. */
6703_ACEOF
6704cat confdefs.h >>conftest.$ac_ext
6705cat >>conftest.$ac_ext <<_ACEOF
6706/* end confdefs.h. */
6707$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006708typedef mode_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709int
6710main ()
6711{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006712if ((ac__type_new_ *) 0)
6713 return 0;
6714if (sizeof (ac__type_new_))
6715 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716 ;
6717 return 0;
6718}
6719_ACEOF
6720rm -f conftest.$ac_objext
6721if { (ac_try="$ac_compile"
6722case "(($ac_try" in
6723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6724 *) ac_try_echo=$ac_try;;
6725esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727 (eval "$ac_compile") 2>conftest.er1
6728 ac_status=$?
6729 grep -v '^ *+' conftest.er1 >conftest.err
6730 rm -f conftest.er1
6731 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733 (exit $ac_status); } && {
6734 test -z "$ac_c_werror_flag" ||
6735 test ! -s conftest.err
6736 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006737 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006738else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006740sed 's/^/| /' conftest.$ac_ext >&5
6741
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006742 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006744
6745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006746fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006747{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6748echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6749if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006750 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006751else
Martin v. Löwis11437992002-04-12 09:54:03 +00006752
6753cat >>confdefs.h <<_ACEOF
6754#define mode_t int
6755_ACEOF
6756
6757fi
6758
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006759{ echo "$as_me:$LINENO: checking for off_t" >&5
6760echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006761if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006762 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006763else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764 cat >conftest.$ac_ext <<_ACEOF
6765/* confdefs.h. */
6766_ACEOF
6767cat confdefs.h >>conftest.$ac_ext
6768cat >>conftest.$ac_ext <<_ACEOF
6769/* end confdefs.h. */
6770$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006771typedef off_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006772int
6773main ()
6774{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006775if ((ac__type_new_ *) 0)
6776 return 0;
6777if (sizeof (ac__type_new_))
6778 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779 ;
6780 return 0;
6781}
6782_ACEOF
6783rm -f conftest.$ac_objext
6784if { (ac_try="$ac_compile"
6785case "(($ac_try" in
6786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6787 *) ac_try_echo=$ac_try;;
6788esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790 (eval "$ac_compile") 2>conftest.er1
6791 ac_status=$?
6792 grep -v '^ *+' conftest.er1 >conftest.err
6793 rm -f conftest.er1
6794 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796 (exit $ac_status); } && {
6797 test -z "$ac_c_werror_flag" ||
6798 test ! -s conftest.err
6799 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006800 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006801else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006803sed 's/^/| /' conftest.$ac_ext >&5
6804
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006805 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807
6808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006809fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006810{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6811echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6812if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006813 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006814else
Martin v. Löwis11437992002-04-12 09:54:03 +00006815
6816cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006817#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006818_ACEOF
6819
6820fi
6821
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006822{ echo "$as_me:$LINENO: checking for pid_t" >&5
6823echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006824if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006825 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006826else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827 cat >conftest.$ac_ext <<_ACEOF
6828/* confdefs.h. */
6829_ACEOF
6830cat confdefs.h >>conftest.$ac_ext
6831cat >>conftest.$ac_ext <<_ACEOF
6832/* end confdefs.h. */
6833$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006834typedef pid_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835int
6836main ()
6837{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006838if ((ac__type_new_ *) 0)
6839 return 0;
6840if (sizeof (ac__type_new_))
6841 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842 ;
6843 return 0;
6844}
6845_ACEOF
6846rm -f conftest.$ac_objext
6847if { (ac_try="$ac_compile"
6848case "(($ac_try" in
6849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6850 *) ac_try_echo=$ac_try;;
6851esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853 (eval "$ac_compile") 2>conftest.er1
6854 ac_status=$?
6855 grep -v '^ *+' conftest.er1 >conftest.err
6856 rm -f conftest.er1
6857 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859 (exit $ac_status); } && {
6860 test -z "$ac_c_werror_flag" ||
6861 test ! -s conftest.err
6862 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006863 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006864else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006866sed 's/^/| /' conftest.$ac_ext >&5
6867
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006868 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006870
6871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006872fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006873{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6874echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6875if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006876 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006877else
Martin v. Löwis11437992002-04-12 09:54:03 +00006878
6879cat >>confdefs.h <<_ACEOF
6880#define pid_t int
6881_ACEOF
6882
6883fi
6884
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006885{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6886echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006887if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006888 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006889else
6890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006891/* confdefs.h. */
6892_ACEOF
6893cat confdefs.h >>conftest.$ac_ext
6894cat >>conftest.$ac_ext <<_ACEOF
6895/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006896#include <sys/types.h>
6897#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006898
Martin v. Löwis11437992002-04-12 09:54:03 +00006899int
6900main ()
6901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006902return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006903 ;
6904 return 0;
6905}
6906_ACEOF
6907rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908if { (ac_try="$ac_compile"
6909case "(($ac_try" in
6910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6911 *) ac_try_echo=$ac_try;;
6912esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006916 grep -v '^ *+' conftest.er1 >conftest.err
6917 rm -f conftest.er1
6918 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920 (exit $ac_status); } && {
6921 test -z "$ac_c_werror_flag" ||
6922 test ! -s conftest.err
6923 } && test -s conftest.$ac_objext; then
6924 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006925else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006927sed 's/^/| /' conftest.$ac_ext >&5
6928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006929 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006931
6932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006933fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006934{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6935echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006936
Martin v. Löwis11437992002-04-12 09:54:03 +00006937cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006938#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006939_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006940
Michael W. Hudson54241132001-12-07 15:38:26 +00006941
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006942{ echo "$as_me:$LINENO: checking for size_t" >&5
6943echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006944if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006946else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006947 cat >conftest.$ac_ext <<_ACEOF
6948/* confdefs.h. */
6949_ACEOF
6950cat confdefs.h >>conftest.$ac_ext
6951cat >>conftest.$ac_ext <<_ACEOF
6952/* end confdefs.h. */
6953$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006954typedef size_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006955int
6956main ()
6957{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006958if ((ac__type_new_ *) 0)
6959 return 0;
6960if (sizeof (ac__type_new_))
6961 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962 ;
6963 return 0;
6964}
6965_ACEOF
6966rm -f conftest.$ac_objext
6967if { (ac_try="$ac_compile"
6968case "(($ac_try" in
6969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6970 *) ac_try_echo=$ac_try;;
6971esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973 (eval "$ac_compile") 2>conftest.er1
6974 ac_status=$?
6975 grep -v '^ *+' conftest.er1 >conftest.err
6976 rm -f conftest.er1
6977 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006979 (exit $ac_status); } && {
6980 test -z "$ac_c_werror_flag" ||
6981 test ! -s conftest.err
6982 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006983 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006984else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006986sed 's/^/| /' conftest.$ac_ext >&5
6987
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006988 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006990
6991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006992fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006993{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6994echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6995if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006996 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006997else
Martin v. Löwis11437992002-04-12 09:54:03 +00006998
6999cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007001_ACEOF
7002
7003fi
7004
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007005{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7006echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007007if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007008 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007009else
7010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007011/* confdefs.h. */
7012_ACEOF
7013cat confdefs.h >>conftest.$ac_ext
7014cat >>conftest.$ac_ext <<_ACEOF
7015/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007016#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007017
7018_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007020 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007021 ac_cv_type_uid_t=yes
7022else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007023 ac_cv_type_uid_t=no
7024fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007025rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007026
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007027fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007028{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7029echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007030if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007031
Martin v. Löwis11437992002-04-12 09:54:03 +00007032cat >>confdefs.h <<\_ACEOF
7033#define uid_t int
7034_ACEOF
7035
7036
7037cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007038#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007039_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007040
7041fi
7042
Mark Dickinsonbd792642009-03-18 20:06:12 +00007043
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007044 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7045echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007046if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007047 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007048else
7049 ac_cv_c_uint32_t=no
7050 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7051 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7052 cat >conftest.$ac_ext <<_ACEOF
7053/* confdefs.h. */
7054_ACEOF
7055cat confdefs.h >>conftest.$ac_ext
7056cat >>conftest.$ac_ext <<_ACEOF
7057/* end confdefs.h. */
7058$ac_includes_default
7059int
7060main ()
7061{
7062static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7063test_array [0] = 0
7064
7065 ;
7066 return 0;
7067}
7068_ACEOF
7069rm -f conftest.$ac_objext
7070if { (ac_try="$ac_compile"
7071case "(($ac_try" in
7072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7073 *) ac_try_echo=$ac_try;;
7074esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007076 (eval "$ac_compile") 2>conftest.er1
7077 ac_status=$?
7078 grep -v '^ *+' conftest.er1 >conftest.err
7079 rm -f conftest.er1
7080 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007082 (exit $ac_status); } && {
7083 test -z "$ac_c_werror_flag" ||
7084 test ! -s conftest.err
7085 } && test -s conftest.$ac_objext; then
7086 case $ac_type in
7087 uint32_t) ac_cv_c_uint32_t=yes ;;
7088 *) ac_cv_c_uint32_t=$ac_type ;;
7089esac
7090
7091else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007092 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007093sed 's/^/| /' conftest.$ac_ext >&5
7094
7095
7096fi
7097
7098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7099 test "$ac_cv_c_uint32_t" != no && break
7100 done
7101fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007102{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7103echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007104 case $ac_cv_c_uint32_t in #(
7105 no|yes) ;; #(
7106 *)
7107
7108cat >>confdefs.h <<\_ACEOF
7109#define _UINT32_T 1
7110_ACEOF
7111
7112
7113cat >>confdefs.h <<_ACEOF
7114#define uint32_t $ac_cv_c_uint32_t
7115_ACEOF
7116;;
7117 esac
7118
7119
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007120 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7121echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007122if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007123 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007124else
7125 ac_cv_c_uint64_t=no
7126 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7127 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7128 cat >conftest.$ac_ext <<_ACEOF
7129/* confdefs.h. */
7130_ACEOF
7131cat confdefs.h >>conftest.$ac_ext
7132cat >>conftest.$ac_ext <<_ACEOF
7133/* end confdefs.h. */
7134$ac_includes_default
7135int
7136main ()
7137{
7138static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7139test_array [0] = 0
7140
7141 ;
7142 return 0;
7143}
7144_ACEOF
7145rm -f conftest.$ac_objext
7146if { (ac_try="$ac_compile"
7147case "(($ac_try" in
7148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7149 *) ac_try_echo=$ac_try;;
7150esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007152 (eval "$ac_compile") 2>conftest.er1
7153 ac_status=$?
7154 grep -v '^ *+' conftest.er1 >conftest.err
7155 rm -f conftest.er1
7156 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007158 (exit $ac_status); } && {
7159 test -z "$ac_c_werror_flag" ||
7160 test ! -s conftest.err
7161 } && test -s conftest.$ac_objext; then
7162 case $ac_type in
7163 uint64_t) ac_cv_c_uint64_t=yes ;;
7164 *) ac_cv_c_uint64_t=$ac_type ;;
7165esac
7166
7167else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007168 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007169sed 's/^/| /' conftest.$ac_ext >&5
7170
7171
7172fi
7173
7174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7175 test "$ac_cv_c_uint64_t" != no && break
7176 done
7177fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007178{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7179echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007180 case $ac_cv_c_uint64_t in #(
7181 no|yes) ;; #(
7182 *)
7183
7184cat >>confdefs.h <<\_ACEOF
7185#define _UINT64_T 1
7186_ACEOF
7187
7188
7189cat >>confdefs.h <<_ACEOF
7190#define uint64_t $ac_cv_c_uint64_t
7191_ACEOF
7192;;
7193 esac
7194
7195
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007196 { echo "$as_me:$LINENO: checking for int32_t" >&5
7197echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007198if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007199 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007200else
7201 ac_cv_c_int32_t=no
7202 for ac_type in 'int32_t' 'int' 'long int' \
7203 'long long int' 'short int' 'signed char'; do
7204 cat >conftest.$ac_ext <<_ACEOF
7205/* confdefs.h. */
7206_ACEOF
7207cat confdefs.h >>conftest.$ac_ext
7208cat >>conftest.$ac_ext <<_ACEOF
7209/* end confdefs.h. */
7210$ac_includes_default
7211int
7212main ()
7213{
7214static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7215test_array [0] = 0
7216
7217 ;
7218 return 0;
7219}
7220_ACEOF
7221rm -f conftest.$ac_objext
7222if { (ac_try="$ac_compile"
7223case "(($ac_try" in
7224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7225 *) ac_try_echo=$ac_try;;
7226esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007228 (eval "$ac_compile") 2>conftest.er1
7229 ac_status=$?
7230 grep -v '^ *+' conftest.er1 >conftest.err
7231 rm -f conftest.er1
7232 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007234 (exit $ac_status); } && {
7235 test -z "$ac_c_werror_flag" ||
7236 test ! -s conftest.err
7237 } && test -s conftest.$ac_objext; then
7238 cat >conftest.$ac_ext <<_ACEOF
7239/* confdefs.h. */
7240_ACEOF
7241cat confdefs.h >>conftest.$ac_ext
7242cat >>conftest.$ac_ext <<_ACEOF
7243/* end confdefs.h. */
7244$ac_includes_default
7245int
7246main ()
7247{
7248static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007249 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007250test_array [0] = 0
7251
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
7257if { (ac_try="$ac_compile"
7258case "(($ac_try" in
7259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7260 *) ac_try_echo=$ac_try;;
7261esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007263 (eval "$ac_compile") 2>conftest.er1
7264 ac_status=$?
7265 grep -v '^ *+' conftest.er1 >conftest.err
7266 rm -f conftest.er1
7267 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007269 (exit $ac_status); } && {
7270 test -z "$ac_c_werror_flag" ||
7271 test ! -s conftest.err
7272 } && test -s conftest.$ac_objext; then
7273 :
7274else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007275 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007276sed 's/^/| /' conftest.$ac_ext >&5
7277
7278 case $ac_type in
7279 int32_t) ac_cv_c_int32_t=yes ;;
7280 *) ac_cv_c_int32_t=$ac_type ;;
7281esac
7282
7283fi
7284
7285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7286else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007287 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007288sed 's/^/| /' conftest.$ac_ext >&5
7289
7290
7291fi
7292
7293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7294 test "$ac_cv_c_int32_t" != no && break
7295 done
7296fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007297{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7298echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007299 case $ac_cv_c_int32_t in #(
7300 no|yes) ;; #(
7301 *)
7302
7303cat >>confdefs.h <<_ACEOF
7304#define int32_t $ac_cv_c_int32_t
7305_ACEOF
7306;;
7307 esac
7308
7309
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007310 { echo "$as_me:$LINENO: checking for int64_t" >&5
7311echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007312if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007313 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007314else
7315 ac_cv_c_int64_t=no
7316 for ac_type in 'int64_t' 'int' 'long int' \
7317 'long long int' 'short int' 'signed char'; do
7318 cat >conftest.$ac_ext <<_ACEOF
7319/* confdefs.h. */
7320_ACEOF
7321cat confdefs.h >>conftest.$ac_ext
7322cat >>conftest.$ac_ext <<_ACEOF
7323/* end confdefs.h. */
7324$ac_includes_default
7325int
7326main ()
7327{
7328static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7329test_array [0] = 0
7330
7331 ;
7332 return 0;
7333}
7334_ACEOF
7335rm -f conftest.$ac_objext
7336if { (ac_try="$ac_compile"
7337case "(($ac_try" in
7338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7339 *) ac_try_echo=$ac_try;;
7340esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007342 (eval "$ac_compile") 2>conftest.er1
7343 ac_status=$?
7344 grep -v '^ *+' conftest.er1 >conftest.err
7345 rm -f conftest.er1
7346 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007348 (exit $ac_status); } && {
7349 test -z "$ac_c_werror_flag" ||
7350 test ! -s conftest.err
7351 } && test -s conftest.$ac_objext; then
7352 cat >conftest.$ac_ext <<_ACEOF
7353/* confdefs.h. */
7354_ACEOF
7355cat confdefs.h >>conftest.$ac_ext
7356cat >>conftest.$ac_ext <<_ACEOF
7357/* end confdefs.h. */
7358$ac_includes_default
7359int
7360main ()
7361{
7362static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007363 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007364test_array [0] = 0
7365
7366 ;
7367 return 0;
7368}
7369_ACEOF
7370rm -f conftest.$ac_objext
7371if { (ac_try="$ac_compile"
7372case "(($ac_try" in
7373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7374 *) ac_try_echo=$ac_try;;
7375esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007377 (eval "$ac_compile") 2>conftest.er1
7378 ac_status=$?
7379 grep -v '^ *+' conftest.er1 >conftest.err
7380 rm -f conftest.er1
7381 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007383 (exit $ac_status); } && {
7384 test -z "$ac_c_werror_flag" ||
7385 test ! -s conftest.err
7386 } && test -s conftest.$ac_objext; then
7387 :
7388else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007389 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007390sed 's/^/| /' conftest.$ac_ext >&5
7391
7392 case $ac_type in
7393 int64_t) ac_cv_c_int64_t=yes ;;
7394 *) ac_cv_c_int64_t=$ac_type ;;
7395esac
7396
7397fi
7398
7399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7400else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007401 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007402sed 's/^/| /' conftest.$ac_ext >&5
7403
7404
7405fi
7406
7407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7408 test "$ac_cv_c_int64_t" != no && break
7409 done
7410fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007411{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7412echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007413 case $ac_cv_c_int64_t in #(
7414 no|yes) ;; #(
7415 *)
7416
7417cat >>confdefs.h <<_ACEOF
7418#define int64_t $ac_cv_c_int64_t
7419_ACEOF
7420;;
7421 esac
7422
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007423{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7424echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007425if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007426 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007427else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428 cat >conftest.$ac_ext <<_ACEOF
7429/* confdefs.h. */
7430_ACEOF
7431cat confdefs.h >>conftest.$ac_ext
7432cat >>conftest.$ac_ext <<_ACEOF
7433/* end confdefs.h. */
7434$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007435typedef ssize_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436int
7437main ()
7438{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007439if ((ac__type_new_ *) 0)
7440 return 0;
7441if (sizeof (ac__type_new_))
7442 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443 ;
7444 return 0;
7445}
7446_ACEOF
7447rm -f conftest.$ac_objext
7448if { (ac_try="$ac_compile"
7449case "(($ac_try" in
7450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7451 *) ac_try_echo=$ac_try;;
7452esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454 (eval "$ac_compile") 2>conftest.er1
7455 ac_status=$?
7456 grep -v '^ *+' conftest.er1 >conftest.err
7457 rm -f conftest.er1
7458 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460 (exit $ac_status); } && {
7461 test -z "$ac_c_werror_flag" ||
7462 test ! -s conftest.err
7463 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007464 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007465else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007466 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007467sed 's/^/| /' conftest.$ac_ext >&5
7468
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007469 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007471
7472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007473fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007474{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7475echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7476if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007477
7478cat >>confdefs.h <<\_ACEOF
7479#define HAVE_SSIZE_T 1
7480_ACEOF
7481
7482fi
7483
Jack Jansendd19cf82001-12-06 22:36:17 +00007484
Michael W. Hudson54241132001-12-07 15:38:26 +00007485# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007486# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007487{ echo "$as_me:$LINENO: checking for int" >&5
7488echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7489if test "${ac_cv_type_int+set}" = set; then
7490 echo $ECHO_N "(cached) $ECHO_C" >&6
7491else
7492 cat >conftest.$ac_ext <<_ACEOF
7493/* confdefs.h. */
7494_ACEOF
7495cat confdefs.h >>conftest.$ac_ext
7496cat >>conftest.$ac_ext <<_ACEOF
7497/* end confdefs.h. */
7498$ac_includes_default
7499typedef int ac__type_new_;
7500int
7501main ()
7502{
7503if ((ac__type_new_ *) 0)
7504 return 0;
7505if (sizeof (ac__type_new_))
7506 return 0;
7507 ;
7508 return 0;
7509}
7510_ACEOF
7511rm -f conftest.$ac_objext
7512if { (ac_try="$ac_compile"
7513case "(($ac_try" in
7514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7515 *) ac_try_echo=$ac_try;;
7516esac
7517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7518 (eval "$ac_compile") 2>conftest.er1
7519 ac_status=$?
7520 grep -v '^ *+' conftest.er1 >conftest.err
7521 rm -f conftest.er1
7522 cat conftest.err >&5
7523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7524 (exit $ac_status); } && {
7525 test -z "$ac_c_werror_flag" ||
7526 test ! -s conftest.err
7527 } && test -s conftest.$ac_objext; then
7528 ac_cv_type_int=yes
7529else
7530 echo "$as_me: failed program was:" >&5
7531sed 's/^/| /' conftest.$ac_ext >&5
7532
7533 ac_cv_type_int=no
7534fi
7535
7536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7537fi
7538{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7539echo "${ECHO_T}$ac_cv_type_int" >&6; }
7540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007541# The cast to long int works around a bug in the HP C Compiler
7542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7544# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007545{ echo "$as_me:$LINENO: checking size of int" >&5
7546echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007547if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007548 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007549else
Martin v. Löwis11437992002-04-12 09:54:03 +00007550 if test "$cross_compiling" = yes; then
7551 # Depending upon the size, compute the lo and hi bounds.
7552cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007553/* confdefs.h. */
7554_ACEOF
7555cat confdefs.h >>conftest.$ac_ext
7556cat >>conftest.$ac_ext <<_ACEOF
7557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007558$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007559 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007560int
7561main ()
7562{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007564test_array [0] = 0
7565
7566 ;
7567 return 0;
7568}
7569_ACEOF
7570rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007571if { (ac_try="$ac_compile"
7572case "(($ac_try" in
7573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7574 *) ac_try_echo=$ac_try;;
7575esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007579 grep -v '^ *+' conftest.er1 >conftest.err
7580 rm -f conftest.er1
7581 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007583 (exit $ac_status); } && {
7584 test -z "$ac_c_werror_flag" ||
7585 test ! -s conftest.err
7586 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007587 ac_lo=0 ac_mid=0
7588 while :; do
7589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007590/* confdefs.h. */
7591_ACEOF
7592cat confdefs.h >>conftest.$ac_ext
7593cat >>conftest.$ac_ext <<_ACEOF
7594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007595$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007596 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007597int
7598main ()
7599{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007601test_array [0] = 0
7602
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608if { (ac_try="$ac_compile"
7609case "(($ac_try" in
7610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7611 *) ac_try_echo=$ac_try;;
7612esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007616 grep -v '^ *+' conftest.er1 >conftest.err
7617 rm -f conftest.er1
7618 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620 (exit $ac_status); } && {
7621 test -z "$ac_c_werror_flag" ||
7622 test ! -s conftest.err
7623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007624 ac_hi=$ac_mid; break
7625else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007627sed 's/^/| /' conftest.$ac_ext >&5
7628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007629 ac_lo=`expr $ac_mid + 1`
7630 if test $ac_lo -le $ac_mid; then
7631 ac_lo= ac_hi=
7632 break
7633 fi
7634 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636
7637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007638 done
7639else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007641sed 's/^/| /' conftest.$ac_ext >&5
7642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007644/* confdefs.h. */
7645_ACEOF
7646cat confdefs.h >>conftest.$ac_ext
7647cat >>conftest.$ac_ext <<_ACEOF
7648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007649$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007650 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007651int
7652main ()
7653{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007654static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007655test_array [0] = 0
7656
7657 ;
7658 return 0;
7659}
7660_ACEOF
7661rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662if { (ac_try="$ac_compile"
7663case "(($ac_try" in
7664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7665 *) ac_try_echo=$ac_try;;
7666esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007670 grep -v '^ *+' conftest.er1 >conftest.err
7671 rm -f conftest.er1
7672 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007674 (exit $ac_status); } && {
7675 test -z "$ac_c_werror_flag" ||
7676 test ! -s conftest.err
7677 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 ac_hi=-1 ac_mid=-1
7679 while :; do
7680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007681/* confdefs.h. */
7682_ACEOF
7683cat confdefs.h >>conftest.$ac_ext
7684cat >>conftest.$ac_ext <<_ACEOF
7685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007686$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007687 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007688int
7689main ()
7690{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007691static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007692test_array [0] = 0
7693
7694 ;
7695 return 0;
7696}
7697_ACEOF
7698rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699if { (ac_try="$ac_compile"
7700case "(($ac_try" in
7701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7702 *) ac_try_echo=$ac_try;;
7703esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007707 grep -v '^ *+' conftest.er1 >conftest.err
7708 rm -f conftest.er1
7709 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711 (exit $ac_status); } && {
7712 test -z "$ac_c_werror_flag" ||
7713 test ! -s conftest.err
7714 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007715 ac_lo=$ac_mid; break
7716else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007718sed 's/^/| /' conftest.$ac_ext >&5
7719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007720 ac_hi=`expr '(' $ac_mid ')' - 1`
7721 if test $ac_mid -le $ac_hi; then
7722 ac_lo= ac_hi=
7723 break
7724 fi
7725 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727
7728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 done
7730else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007732sed 's/^/| /' conftest.$ac_ext >&5
7733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736
7737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739
7740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007741# Binary search between lo and hi bounds.
7742while test "x$ac_lo" != "x$ac_hi"; do
7743 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007745/* confdefs.h. */
7746_ACEOF
7747cat confdefs.h >>conftest.$ac_ext
7748cat >>conftest.$ac_ext <<_ACEOF
7749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007750$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007751 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007752int
7753main ()
7754{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007755static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007756test_array [0] = 0
7757
7758 ;
7759 return 0;
7760}
7761_ACEOF
7762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763if { (ac_try="$ac_compile"
7764case "(($ac_try" in
7765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7766 *) ac_try_echo=$ac_try;;
7767esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007771 grep -v '^ *+' conftest.er1 >conftest.err
7772 rm -f conftest.er1
7773 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007775 (exit $ac_status); } && {
7776 test -z "$ac_c_werror_flag" ||
7777 test ! -s conftest.err
7778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007779 ac_hi=$ac_mid
7780else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007782sed 's/^/| /' conftest.$ac_ext >&5
7783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007786
7787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007788done
7789case $ac_lo in
7790?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007792 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007793See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007794echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007795See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007796 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 else
7798 ac_cv_sizeof_int=0
7799 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007800esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007801else
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007803/* confdefs.h. */
7804_ACEOF
7805cat confdefs.h >>conftest.$ac_ext
7806cat >>conftest.$ac_ext <<_ACEOF
7807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007808$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007809 typedef int ac__type_sizeof_;
7810static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7811static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007812#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007813#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007814int
7815main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007816{
Martin v. Löwis11437992002-04-12 09:54:03 +00007817
7818 FILE *f = fopen ("conftest.val", "w");
7819 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007821 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007824 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007826 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 }
7828 else
7829 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007831 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007833 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007834 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007836
7837 ;
7838 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007839}
Martin v. Löwis11437992002-04-12 09:54:03 +00007840_ACEOF
7841rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842if { (ac_try="$ac_link"
7843case "(($ac_try" in
7844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7845 *) ac_try_echo=$ac_try;;
7846esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007849 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852 { (case "(($ac_try" in
7853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7854 *) ac_try_echo=$ac_try;;
7855esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 (exit $ac_status); }; }; then
7861 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007862else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007863 echo "$as_me: program exited with status $ac_status" >&5
7864echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007865sed 's/^/| /' conftest.$ac_ext >&5
7866
Martin v. Löwis11437992002-04-12 09:54:03 +00007867( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868if test "$ac_cv_type_int" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007869 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007870See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007871echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007872See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007873 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874 else
7875 ac_cv_sizeof_int=0
7876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878rm -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 +00007879fi
7880rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007881fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007882{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7883echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884
7885
7886
Martin v. Löwis11437992002-04-12 09:54:03 +00007887cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007888#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007889_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007890
7891
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007892{ echo "$as_me:$LINENO: checking for long" >&5
7893echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7894if test "${ac_cv_type_long+set}" = set; then
7895 echo $ECHO_N "(cached) $ECHO_C" >&6
7896else
7897 cat >conftest.$ac_ext <<_ACEOF
7898/* confdefs.h. */
7899_ACEOF
7900cat confdefs.h >>conftest.$ac_ext
7901cat >>conftest.$ac_ext <<_ACEOF
7902/* end confdefs.h. */
7903$ac_includes_default
7904typedef long ac__type_new_;
7905int
7906main ()
7907{
7908if ((ac__type_new_ *) 0)
7909 return 0;
7910if (sizeof (ac__type_new_))
7911 return 0;
7912 ;
7913 return 0;
7914}
7915_ACEOF
7916rm -f conftest.$ac_objext
7917if { (ac_try="$ac_compile"
7918case "(($ac_try" in
7919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7920 *) ac_try_echo=$ac_try;;
7921esac
7922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7923 (eval "$ac_compile") 2>conftest.er1
7924 ac_status=$?
7925 grep -v '^ *+' conftest.er1 >conftest.err
7926 rm -f conftest.er1
7927 cat conftest.err >&5
7928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929 (exit $ac_status); } && {
7930 test -z "$ac_c_werror_flag" ||
7931 test ! -s conftest.err
7932 } && test -s conftest.$ac_objext; then
7933 ac_cv_type_long=yes
7934else
7935 echo "$as_me: failed program was:" >&5
7936sed 's/^/| /' conftest.$ac_ext >&5
7937
7938 ac_cv_type_long=no
7939fi
7940
7941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7942fi
7943{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7944echo "${ECHO_T}$ac_cv_type_long" >&6; }
7945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946# The cast to long int works around a bug in the HP C Compiler
7947# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7948# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7949# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007950{ echo "$as_me:$LINENO: checking size of long" >&5
7951echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007952if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007953 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007954else
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 if test "$cross_compiling" = yes; then
7956 # Depending upon the size, compute the lo and hi bounds.
7957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007958/* confdefs.h. */
7959_ACEOF
7960cat confdefs.h >>conftest.$ac_ext
7961cat >>conftest.$ac_ext <<_ACEOF
7962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007964 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007965int
7966main ()
7967{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007968static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007969test_array [0] = 0
7970
7971 ;
7972 return 0;
7973}
7974_ACEOF
7975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976if { (ac_try="$ac_compile"
7977case "(($ac_try" in
7978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7979 *) ac_try_echo=$ac_try;;
7980esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007984 grep -v '^ *+' conftest.er1 >conftest.err
7985 rm -f conftest.er1
7986 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988 (exit $ac_status); } && {
7989 test -z "$ac_c_werror_flag" ||
7990 test ! -s conftest.err
7991 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 ac_lo=0 ac_mid=0
7993 while :; do
7994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007995/* confdefs.h. */
7996_ACEOF
7997cat confdefs.h >>conftest.$ac_ext
7998cat >>conftest.$ac_ext <<_ACEOF
7999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008000$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008001 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008002int
8003main ()
8004{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008006test_array [0] = 0
8007
8008 ;
8009 return 0;
8010}
8011_ACEOF
8012rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013if { (ac_try="$ac_compile"
8014case "(($ac_try" in
8015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8016 *) ac_try_echo=$ac_try;;
8017esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008021 grep -v '^ *+' conftest.er1 >conftest.err
8022 rm -f conftest.er1
8023 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025 (exit $ac_status); } && {
8026 test -z "$ac_c_werror_flag" ||
8027 test ! -s conftest.err
8028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ac_hi=$ac_mid; break
8030else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008032sed 's/^/| /' conftest.$ac_ext >&5
8033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034 ac_lo=`expr $ac_mid + 1`
8035 if test $ac_lo -le $ac_mid; then
8036 ac_lo= ac_hi=
8037 break
8038 fi
8039 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041
8042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008043 done
8044else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008046sed 's/^/| /' conftest.$ac_ext >&5
8047
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008049/* confdefs.h. */
8050_ACEOF
8051cat confdefs.h >>conftest.$ac_ext
8052cat >>conftest.$ac_ext <<_ACEOF
8053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008054$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008055 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008056int
8057main ()
8058{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008059static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008060test_array [0] = 0
8061
8062 ;
8063 return 0;
8064}
8065_ACEOF
8066rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067if { (ac_try="$ac_compile"
8068case "(($ac_try" in
8069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8070 *) ac_try_echo=$ac_try;;
8071esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008075 grep -v '^ *+' conftest.er1 >conftest.err
8076 rm -f conftest.er1
8077 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079 (exit $ac_status); } && {
8080 test -z "$ac_c_werror_flag" ||
8081 test ! -s conftest.err
8082 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 ac_hi=-1 ac_mid=-1
8084 while :; do
8085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008086/* confdefs.h. */
8087_ACEOF
8088cat confdefs.h >>conftest.$ac_ext
8089cat >>conftest.$ac_ext <<_ACEOF
8090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008091$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008092 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008093int
8094main ()
8095{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008096static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008097test_array [0] = 0
8098
8099 ;
8100 return 0;
8101}
8102_ACEOF
8103rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104if { (ac_try="$ac_compile"
8105case "(($ac_try" in
8106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8107 *) ac_try_echo=$ac_try;;
8108esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008112 grep -v '^ *+' conftest.er1 >conftest.err
8113 rm -f conftest.er1
8114 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 (exit $ac_status); } && {
8117 test -z "$ac_c_werror_flag" ||
8118 test ! -s conftest.err
8119 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_lo=$ac_mid; break
8121else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008123sed 's/^/| /' conftest.$ac_ext >&5
8124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008125 ac_hi=`expr '(' $ac_mid ')' - 1`
8126 if test $ac_mid -le $ac_hi; then
8127 ac_lo= ac_hi=
8128 break
8129 fi
8130 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132
8133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008134 done
8135else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008137sed 's/^/| /' conftest.$ac_ext >&5
8138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008141
8142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144
8145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008146# Binary search between lo and hi bounds.
8147while test "x$ac_lo" != "x$ac_hi"; do
8148 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008150/* confdefs.h. */
8151_ACEOF
8152cat confdefs.h >>conftest.$ac_ext
8153cat >>conftest.$ac_ext <<_ACEOF
8154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008155$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008156 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008157int
8158main ()
8159{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008161test_array [0] = 0
8162
8163 ;
8164 return 0;
8165}
8166_ACEOF
8167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168if { (ac_try="$ac_compile"
8169case "(($ac_try" in
8170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8171 *) ac_try_echo=$ac_try;;
8172esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008176 grep -v '^ *+' conftest.er1 >conftest.err
8177 rm -f conftest.er1
8178 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180 (exit $ac_status); } && {
8181 test -z "$ac_c_werror_flag" ||
8182 test ! -s conftest.err
8183 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 ac_hi=$ac_mid
8185else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008187sed 's/^/| /' conftest.$ac_ext >&5
8188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008191
8192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008193done
8194case $ac_lo in
8195?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008197 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008198See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008199echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008200See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008201 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 else
8203 ac_cv_sizeof_long=0
8204 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008205esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008206else
Martin v. Löwis11437992002-04-12 09:54:03 +00008207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008208/* confdefs.h. */
8209_ACEOF
8210cat confdefs.h >>conftest.$ac_ext
8211cat >>conftest.$ac_ext <<_ACEOF
8212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008213$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008214 typedef long ac__type_sizeof_;
8215static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8216static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008217#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008218#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008219int
8220main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008221{
Martin v. Löwis11437992002-04-12 09:54:03 +00008222
8223 FILE *f = fopen ("conftest.val", "w");
8224 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008226 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008229 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008231 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 }
8233 else
8234 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008236 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008238 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008239 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008241
8242 ;
8243 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008244}
Martin v. Löwis11437992002-04-12 09:54:03 +00008245_ACEOF
8246rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247if { (ac_try="$ac_link"
8248case "(($ac_try" in
8249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8250 *) ac_try_echo=$ac_try;;
8251esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008254 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008256 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008257 { (case "(($ac_try" in
8258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8259 *) ac_try_echo=$ac_try;;
8260esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008263 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 (exit $ac_status); }; }; then
8266 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008267else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008268 echo "$as_me: program exited with status $ac_status" >&5
8269echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008270sed 's/^/| /' conftest.$ac_ext >&5
8271
Martin v. Löwis11437992002-04-12 09:54:03 +00008272( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273if test "$ac_cv_type_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008274 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008275See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008276echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008277See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008278 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279 else
8280 ac_cv_sizeof_long=0
8281 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283rm -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 +00008284fi
8285rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008286fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008287{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8288echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008289
8290
8291
Martin v. Löwis11437992002-04-12 09:54:03 +00008292cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008293#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008294_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008295
8296
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008297{ echo "$as_me:$LINENO: checking for void *" >&5
8298echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8299if test "${ac_cv_type_void_p+set}" = set; then
8300 echo $ECHO_N "(cached) $ECHO_C" >&6
8301else
8302 cat >conftest.$ac_ext <<_ACEOF
8303/* confdefs.h. */
8304_ACEOF
8305cat confdefs.h >>conftest.$ac_ext
8306cat >>conftest.$ac_ext <<_ACEOF
8307/* end confdefs.h. */
8308$ac_includes_default
8309typedef void * ac__type_new_;
8310int
8311main ()
8312{
8313if ((ac__type_new_ *) 0)
8314 return 0;
8315if (sizeof (ac__type_new_))
8316 return 0;
8317 ;
8318 return 0;
8319}
8320_ACEOF
8321rm -f conftest.$ac_objext
8322if { (ac_try="$ac_compile"
8323case "(($ac_try" in
8324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8325 *) ac_try_echo=$ac_try;;
8326esac
8327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8328 (eval "$ac_compile") 2>conftest.er1
8329 ac_status=$?
8330 grep -v '^ *+' conftest.er1 >conftest.err
8331 rm -f conftest.er1
8332 cat conftest.err >&5
8333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334 (exit $ac_status); } && {
8335 test -z "$ac_c_werror_flag" ||
8336 test ! -s conftest.err
8337 } && test -s conftest.$ac_objext; then
8338 ac_cv_type_void_p=yes
8339else
8340 echo "$as_me: failed program was:" >&5
8341sed 's/^/| /' conftest.$ac_ext >&5
8342
8343 ac_cv_type_void_p=no
8344fi
8345
8346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8347fi
8348{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8349echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351# The cast to long int works around a bug in the HP C Compiler
8352# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8353# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8354# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008355{ echo "$as_me:$LINENO: checking size of void *" >&5
8356echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008357if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008359else
Martin v. Löwis11437992002-04-12 09:54:03 +00008360 if test "$cross_compiling" = yes; then
8361 # Depending upon the size, compute the lo and hi bounds.
8362cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008363/* confdefs.h. */
8364_ACEOF
8365cat confdefs.h >>conftest.$ac_ext
8366cat >>conftest.$ac_ext <<_ACEOF
8367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008368$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008369 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008370int
8371main ()
8372{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008374test_array [0] = 0
8375
8376 ;
8377 return 0;
8378}
8379_ACEOF
8380rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008381if { (ac_try="$ac_compile"
8382case "(($ac_try" in
8383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8384 *) ac_try_echo=$ac_try;;
8385esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008389 grep -v '^ *+' conftest.er1 >conftest.err
8390 rm -f conftest.er1
8391 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008393 (exit $ac_status); } && {
8394 test -z "$ac_c_werror_flag" ||
8395 test ! -s conftest.err
8396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 ac_lo=0 ac_mid=0
8398 while :; do
8399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008400/* confdefs.h. */
8401_ACEOF
8402cat confdefs.h >>conftest.$ac_ext
8403cat >>conftest.$ac_ext <<_ACEOF
8404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008405$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008406 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008407int
8408main ()
8409{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008411test_array [0] = 0
8412
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418if { (ac_try="$ac_compile"
8419case "(($ac_try" in
8420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8421 *) ac_try_echo=$ac_try;;
8422esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008426 grep -v '^ *+' conftest.er1 >conftest.err
8427 rm -f conftest.er1
8428 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430 (exit $ac_status); } && {
8431 test -z "$ac_c_werror_flag" ||
8432 test ! -s conftest.err
8433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 ac_hi=$ac_mid; break
8435else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008437sed 's/^/| /' conftest.$ac_ext >&5
8438
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439 ac_lo=`expr $ac_mid + 1`
8440 if test $ac_lo -le $ac_mid; then
8441 ac_lo= ac_hi=
8442 break
8443 fi
8444 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446
8447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008448 done
8449else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008451sed 's/^/| /' conftest.$ac_ext >&5
8452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008454/* confdefs.h. */
8455_ACEOF
8456cat confdefs.h >>conftest.$ac_ext
8457cat >>conftest.$ac_ext <<_ACEOF
8458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008460 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008461int
8462main ()
8463{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008464static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008465test_array [0] = 0
8466
8467 ;
8468 return 0;
8469}
8470_ACEOF
8471rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472if { (ac_try="$ac_compile"
8473case "(($ac_try" in
8474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8475 *) ac_try_echo=$ac_try;;
8476esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008480 grep -v '^ *+' conftest.er1 >conftest.err
8481 rm -f conftest.er1
8482 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484 (exit $ac_status); } && {
8485 test -z "$ac_c_werror_flag" ||
8486 test ! -s conftest.err
8487 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 ac_hi=-1 ac_mid=-1
8489 while :; do
8490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008491/* confdefs.h. */
8492_ACEOF
8493cat confdefs.h >>conftest.$ac_ext
8494cat >>conftest.$ac_ext <<_ACEOF
8495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008496$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008497 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008498int
8499main ()
8500{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008501static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008502test_array [0] = 0
8503
8504 ;
8505 return 0;
8506}
8507_ACEOF
8508rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509if { (ac_try="$ac_compile"
8510case "(($ac_try" in
8511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8512 *) ac_try_echo=$ac_try;;
8513esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008517 grep -v '^ *+' conftest.er1 >conftest.err
8518 rm -f conftest.er1
8519 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521 (exit $ac_status); } && {
8522 test -z "$ac_c_werror_flag" ||
8523 test ! -s conftest.err
8524 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 ac_lo=$ac_mid; break
8526else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008528sed 's/^/| /' conftest.$ac_ext >&5
8529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530 ac_hi=`expr '(' $ac_mid ')' - 1`
8531 if test $ac_mid -le $ac_hi; then
8532 ac_lo= ac_hi=
8533 break
8534 fi
8535 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537
8538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 done
8540else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008542sed 's/^/| /' conftest.$ac_ext >&5
8543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546
8547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549
8550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008551# Binary search between lo and hi bounds.
8552while test "x$ac_lo" != "x$ac_hi"; do
8553 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008555/* confdefs.h. */
8556_ACEOF
8557cat confdefs.h >>conftest.$ac_ext
8558cat >>conftest.$ac_ext <<_ACEOF
8559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008560$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008561 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008562int
8563main ()
8564{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008566test_array [0] = 0
8567
8568 ;
8569 return 0;
8570}
8571_ACEOF
8572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573if { (ac_try="$ac_compile"
8574case "(($ac_try" in
8575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8576 *) ac_try_echo=$ac_try;;
8577esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008581 grep -v '^ *+' conftest.er1 >conftest.err
8582 rm -f conftest.er1
8583 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585 (exit $ac_status); } && {
8586 test -z "$ac_c_werror_flag" ||
8587 test ! -s conftest.err
8588 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 ac_hi=$ac_mid
8590else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008592sed 's/^/| /' conftest.$ac_ext >&5
8593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596
8597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008598done
8599case $ac_lo in
8600?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008602 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008603See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008604echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008605See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008606 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607 else
8608 ac_cv_sizeof_void_p=0
8609 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008610esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008611else
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008613/* confdefs.h. */
8614_ACEOF
8615cat confdefs.h >>conftest.$ac_ext
8616cat >>conftest.$ac_ext <<_ACEOF
8617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008618$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008619 typedef void * ac__type_sizeof_;
8620static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8621static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008622#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008623#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008624int
8625main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008626{
Martin v. Löwis11437992002-04-12 09:54:03 +00008627
8628 FILE *f = fopen ("conftest.val", "w");
8629 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008630 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008631 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008634 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008636 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 }
8638 else
8639 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008641 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008643 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008646
8647 ;
8648 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008649}
Martin v. Löwis11437992002-04-12 09:54:03 +00008650_ACEOF
8651rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652if { (ac_try="$ac_link"
8653case "(($ac_try" in
8654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8655 *) ac_try_echo=$ac_try;;
8656esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662 { (case "(($ac_try" in
8663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8664 *) ac_try_echo=$ac_try;;
8665esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 (exit $ac_status); }; }; then
8671 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008672else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008673 echo "$as_me: program exited with status $ac_status" >&5
8674echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008675sed 's/^/| /' conftest.$ac_ext >&5
8676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008679 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008680See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008681echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008682See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008683 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684 else
8685 ac_cv_sizeof_void_p=0
8686 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688rm -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 +00008689fi
8690rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008691fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008692{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8693echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694
8695
8696
Martin v. Löwis11437992002-04-12 09:54:03 +00008697cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008698#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008699_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008700
8701
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008702{ echo "$as_me:$LINENO: checking for short" >&5
8703echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8704if test "${ac_cv_type_short+set}" = set; then
8705 echo $ECHO_N "(cached) $ECHO_C" >&6
8706else
8707 cat >conftest.$ac_ext <<_ACEOF
8708/* confdefs.h. */
8709_ACEOF
8710cat confdefs.h >>conftest.$ac_ext
8711cat >>conftest.$ac_ext <<_ACEOF
8712/* end confdefs.h. */
8713$ac_includes_default
8714typedef short ac__type_new_;
8715int
8716main ()
8717{
8718if ((ac__type_new_ *) 0)
8719 return 0;
8720if (sizeof (ac__type_new_))
8721 return 0;
8722 ;
8723 return 0;
8724}
8725_ACEOF
8726rm -f conftest.$ac_objext
8727if { (ac_try="$ac_compile"
8728case "(($ac_try" in
8729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8730 *) ac_try_echo=$ac_try;;
8731esac
8732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8733 (eval "$ac_compile") 2>conftest.er1
8734 ac_status=$?
8735 grep -v '^ *+' conftest.er1 >conftest.err
8736 rm -f conftest.er1
8737 cat conftest.err >&5
8738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8739 (exit $ac_status); } && {
8740 test -z "$ac_c_werror_flag" ||
8741 test ! -s conftest.err
8742 } && test -s conftest.$ac_objext; then
8743 ac_cv_type_short=yes
8744else
8745 echo "$as_me: failed program was:" >&5
8746sed 's/^/| /' conftest.$ac_ext >&5
8747
8748 ac_cv_type_short=no
8749fi
8750
8751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8752fi
8753{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8754echo "${ECHO_T}$ac_cv_type_short" >&6; }
8755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756# The cast to long int works around a bug in the HP C Compiler
8757# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8758# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8759# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008760{ echo "$as_me:$LINENO: checking size of short" >&5
8761echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008762if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008763 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008764else
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 if test "$cross_compiling" = yes; then
8766 # Depending upon the size, compute the lo and hi bounds.
8767cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008768/* confdefs.h. */
8769_ACEOF
8770cat confdefs.h >>conftest.$ac_ext
8771cat >>conftest.$ac_ext <<_ACEOF
8772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008773$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008774 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008775int
8776main ()
8777{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008778static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008779test_array [0] = 0
8780
8781 ;
8782 return 0;
8783}
8784_ACEOF
8785rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786if { (ac_try="$ac_compile"
8787case "(($ac_try" in
8788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8789 *) ac_try_echo=$ac_try;;
8790esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008794 grep -v '^ *+' conftest.er1 >conftest.err
8795 rm -f conftest.er1
8796 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798 (exit $ac_status); } && {
8799 test -z "$ac_c_werror_flag" ||
8800 test ! -s conftest.err
8801 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 ac_lo=0 ac_mid=0
8803 while :; do
8804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008805/* confdefs.h. */
8806_ACEOF
8807cat confdefs.h >>conftest.$ac_ext
8808cat >>conftest.$ac_ext <<_ACEOF
8809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008810$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008811 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008812int
8813main ()
8814{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008816test_array [0] = 0
8817
8818 ;
8819 return 0;
8820}
8821_ACEOF
8822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823if { (ac_try="$ac_compile"
8824case "(($ac_try" in
8825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8826 *) ac_try_echo=$ac_try;;
8827esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008831 grep -v '^ *+' conftest.er1 >conftest.err
8832 rm -f conftest.er1
8833 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835 (exit $ac_status); } && {
8836 test -z "$ac_c_werror_flag" ||
8837 test ! -s conftest.err
8838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ac_hi=$ac_mid; break
8840else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008842sed 's/^/| /' conftest.$ac_ext >&5
8843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008844 ac_lo=`expr $ac_mid + 1`
8845 if test $ac_lo -le $ac_mid; then
8846 ac_lo= ac_hi=
8847 break
8848 fi
8849 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851
8852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008853 done
8854else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008856sed 's/^/| /' conftest.$ac_ext >&5
8857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* confdefs.h. */
8860_ACEOF
8861cat confdefs.h >>conftest.$ac_ext
8862cat >>conftest.$ac_ext <<_ACEOF
8863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008864$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008865 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008866int
8867main ()
8868{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008869static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008870test_array [0] = 0
8871
8872 ;
8873 return 0;
8874}
8875_ACEOF
8876rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877if { (ac_try="$ac_compile"
8878case "(($ac_try" in
8879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8880 *) ac_try_echo=$ac_try;;
8881esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008885 grep -v '^ *+' conftest.er1 >conftest.err
8886 rm -f conftest.er1
8887 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889 (exit $ac_status); } && {
8890 test -z "$ac_c_werror_flag" ||
8891 test ! -s conftest.err
8892 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 ac_hi=-1 ac_mid=-1
8894 while :; do
8895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008896/* confdefs.h. */
8897_ACEOF
8898cat confdefs.h >>conftest.$ac_ext
8899cat >>conftest.$ac_ext <<_ACEOF
8900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008901$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008902 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008903int
8904main ()
8905{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008906static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008907test_array [0] = 0
8908
8909 ;
8910 return 0;
8911}
8912_ACEOF
8913rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914if { (ac_try="$ac_compile"
8915case "(($ac_try" in
8916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8917 *) ac_try_echo=$ac_try;;
8918esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008922 grep -v '^ *+' conftest.er1 >conftest.err
8923 rm -f conftest.er1
8924 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926 (exit $ac_status); } && {
8927 test -z "$ac_c_werror_flag" ||
8928 test ! -s conftest.err
8929 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_lo=$ac_mid; break
8931else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008933sed 's/^/| /' conftest.$ac_ext >&5
8934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008935 ac_hi=`expr '(' $ac_mid ')' - 1`
8936 if test $ac_mid -le $ac_hi; then
8937 ac_lo= ac_hi=
8938 break
8939 fi
8940 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008942
8943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 done
8945else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008947sed 's/^/| /' conftest.$ac_ext >&5
8948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951
8952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954
8955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008956# Binary search between lo and hi bounds.
8957while test "x$ac_lo" != "x$ac_hi"; do
8958 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008960/* confdefs.h. */
8961_ACEOF
8962cat confdefs.h >>conftest.$ac_ext
8963cat >>conftest.$ac_ext <<_ACEOF
8964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008965$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008966 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008967int
8968main ()
8969{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008970static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008971test_array [0] = 0
8972
8973 ;
8974 return 0;
8975}
8976_ACEOF
8977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978if { (ac_try="$ac_compile"
8979case "(($ac_try" in
8980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8981 *) ac_try_echo=$ac_try;;
8982esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008986 grep -v '^ *+' conftest.er1 >conftest.err
8987 rm -f conftest.er1
8988 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990 (exit $ac_status); } && {
8991 test -z "$ac_c_werror_flag" ||
8992 test ! -s conftest.err
8993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 ac_hi=$ac_mid
8995else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008997sed 's/^/| /' conftest.$ac_ext >&5
8998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001
9002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009003done
9004case $ac_lo in
9005?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009007 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009008See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009009echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009010See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009011 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012 else
9013 ac_cv_sizeof_short=0
9014 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009015esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009016else
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009018/* confdefs.h. */
9019_ACEOF
9020cat confdefs.h >>conftest.$ac_ext
9021cat >>conftest.$ac_ext <<_ACEOF
9022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009023$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009024 typedef short ac__type_sizeof_;
9025static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9026static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009027#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009028#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009029int
9030main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009031{
Martin v. Löwis11437992002-04-12 09:54:03 +00009032
9033 FILE *f = fopen ("conftest.val", "w");
9034 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009035 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009036 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009039 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009041 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 }
9043 else
9044 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009045 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009046 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009048 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009049 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009050 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009051
9052 ;
9053 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009054}
Martin v. Löwis11437992002-04-12 09:54:03 +00009055_ACEOF
9056rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057if { (ac_try="$ac_link"
9058case "(($ac_try" in
9059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9060 *) ac_try_echo=$ac_try;;
9061esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009063 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009064 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009066 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009067 { (case "(($ac_try" in
9068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9069 *) ac_try_echo=$ac_try;;
9070esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009072 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 (exit $ac_status); }; }; then
9076 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009077else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009078 echo "$as_me: program exited with status $ac_status" >&5
9079echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009080sed 's/^/| /' conftest.$ac_ext >&5
9081
Martin v. Löwis11437992002-04-12 09:54:03 +00009082( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009083if test "$ac_cv_type_short" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009084 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009085See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009086echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009087See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009088 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089 else
9090 ac_cv_sizeof_short=0
9091 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009093rm -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 +00009094fi
9095rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009096fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009097{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9098echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009099
9100
9101
Martin v. Löwis11437992002-04-12 09:54:03 +00009102cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009103#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009104_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009105
9106
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009107{ echo "$as_me:$LINENO: checking for float" >&5
9108echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9109if test "${ac_cv_type_float+set}" = set; then
9110 echo $ECHO_N "(cached) $ECHO_C" >&6
9111else
9112 cat >conftest.$ac_ext <<_ACEOF
9113/* confdefs.h. */
9114_ACEOF
9115cat confdefs.h >>conftest.$ac_ext
9116cat >>conftest.$ac_ext <<_ACEOF
9117/* end confdefs.h. */
9118$ac_includes_default
9119typedef float ac__type_new_;
9120int
9121main ()
9122{
9123if ((ac__type_new_ *) 0)
9124 return 0;
9125if (sizeof (ac__type_new_))
9126 return 0;
9127 ;
9128 return 0;
9129}
9130_ACEOF
9131rm -f conftest.$ac_objext
9132if { (ac_try="$ac_compile"
9133case "(($ac_try" in
9134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9135 *) ac_try_echo=$ac_try;;
9136esac
9137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9138 (eval "$ac_compile") 2>conftest.er1
9139 ac_status=$?
9140 grep -v '^ *+' conftest.er1 >conftest.err
9141 rm -f conftest.er1
9142 cat conftest.err >&5
9143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9144 (exit $ac_status); } && {
9145 test -z "$ac_c_werror_flag" ||
9146 test ! -s conftest.err
9147 } && test -s conftest.$ac_objext; then
9148 ac_cv_type_float=yes
9149else
9150 echo "$as_me: failed program was:" >&5
9151sed 's/^/| /' conftest.$ac_ext >&5
9152
9153 ac_cv_type_float=no
9154fi
9155
9156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9157fi
9158{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9159echo "${ECHO_T}$ac_cv_type_float" >&6; }
9160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161# The cast to long int works around a bug in the HP C Compiler
9162# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9163# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9164# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009165{ echo "$as_me:$LINENO: checking size of float" >&5
9166echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009167if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009168 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009169else
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 if test "$cross_compiling" = yes; then
9171 # Depending upon the size, compute the lo and hi bounds.
9172cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009173/* confdefs.h. */
9174_ACEOF
9175cat confdefs.h >>conftest.$ac_ext
9176cat >>conftest.$ac_ext <<_ACEOF
9177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009178$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009179 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009180int
9181main ()
9182{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009183static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009184test_array [0] = 0
9185
9186 ;
9187 return 0;
9188}
9189_ACEOF
9190rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191if { (ac_try="$ac_compile"
9192case "(($ac_try" in
9193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9194 *) ac_try_echo=$ac_try;;
9195esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009199 grep -v '^ *+' conftest.er1 >conftest.err
9200 rm -f conftest.er1
9201 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203 (exit $ac_status); } && {
9204 test -z "$ac_c_werror_flag" ||
9205 test ! -s conftest.err
9206 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009207 ac_lo=0 ac_mid=0
9208 while :; do
9209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009210/* confdefs.h. */
9211_ACEOF
9212cat confdefs.h >>conftest.$ac_ext
9213cat >>conftest.$ac_ext <<_ACEOF
9214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009215$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009216 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009217int
9218main ()
9219{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009221test_array [0] = 0
9222
9223 ;
9224 return 0;
9225}
9226_ACEOF
9227rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228if { (ac_try="$ac_compile"
9229case "(($ac_try" in
9230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9231 *) ac_try_echo=$ac_try;;
9232esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009236 grep -v '^ *+' conftest.er1 >conftest.err
9237 rm -f conftest.er1
9238 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240 (exit $ac_status); } && {
9241 test -z "$ac_c_werror_flag" ||
9242 test ! -s conftest.err
9243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 ac_hi=$ac_mid; break
9245else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009247sed 's/^/| /' conftest.$ac_ext >&5
9248
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009249 ac_lo=`expr $ac_mid + 1`
9250 if test $ac_lo -le $ac_mid; then
9251 ac_lo= ac_hi=
9252 break
9253 fi
9254 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256
9257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009258 done
9259else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009261sed 's/^/| /' conftest.$ac_ext >&5
9262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009264/* confdefs.h. */
9265_ACEOF
9266cat confdefs.h >>conftest.$ac_ext
9267cat >>conftest.$ac_ext <<_ACEOF
9268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009269$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009270 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009271int
9272main ()
9273{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009274static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009275test_array [0] = 0
9276
9277 ;
9278 return 0;
9279}
9280_ACEOF
9281rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009282if { (ac_try="$ac_compile"
9283case "(($ac_try" in
9284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9285 *) ac_try_echo=$ac_try;;
9286esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009288 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009290 grep -v '^ *+' conftest.er1 >conftest.err
9291 rm -f conftest.er1
9292 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009294 (exit $ac_status); } && {
9295 test -z "$ac_c_werror_flag" ||
9296 test ! -s conftest.err
9297 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 ac_hi=-1 ac_mid=-1
9299 while :; do
9300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009301/* confdefs.h. */
9302_ACEOF
9303cat confdefs.h >>conftest.$ac_ext
9304cat >>conftest.$ac_ext <<_ACEOF
9305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009306$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009307 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009308int
9309main ()
9310{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009311static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009312test_array [0] = 0
9313
9314 ;
9315 return 0;
9316}
9317_ACEOF
9318rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319if { (ac_try="$ac_compile"
9320case "(($ac_try" in
9321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9322 *) ac_try_echo=$ac_try;;
9323esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009327 grep -v '^ *+' conftest.er1 >conftest.err
9328 rm -f conftest.er1
9329 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331 (exit $ac_status); } && {
9332 test -z "$ac_c_werror_flag" ||
9333 test ! -s conftest.err
9334 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 ac_lo=$ac_mid; break
9336else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009338sed 's/^/| /' conftest.$ac_ext >&5
9339
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009340 ac_hi=`expr '(' $ac_mid ')' - 1`
9341 if test $ac_mid -le $ac_hi; then
9342 ac_lo= ac_hi=
9343 break
9344 fi
9345 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009347
9348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009349 done
9350else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009352sed 's/^/| /' conftest.$ac_ext >&5
9353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356
9357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009359
9360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009361# Binary search between lo and hi bounds.
9362while test "x$ac_lo" != "x$ac_hi"; do
9363 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009365/* confdefs.h. */
9366_ACEOF
9367cat confdefs.h >>conftest.$ac_ext
9368cat >>conftest.$ac_ext <<_ACEOF
9369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009370$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009371 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009372int
9373main ()
9374{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009376test_array [0] = 0
9377
9378 ;
9379 return 0;
9380}
9381_ACEOF
9382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383if { (ac_try="$ac_compile"
9384case "(($ac_try" in
9385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9386 *) ac_try_echo=$ac_try;;
9387esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009391 grep -v '^ *+' conftest.er1 >conftest.err
9392 rm -f conftest.er1
9393 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009395 (exit $ac_status); } && {
9396 test -z "$ac_c_werror_flag" ||
9397 test ! -s conftest.err
9398 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 ac_hi=$ac_mid
9400else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009402sed 's/^/| /' conftest.$ac_ext >&5
9403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406
9407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009408done
9409case $ac_lo in
9410?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009412 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009413See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009414echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009415See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009416 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417 else
9418 ac_cv_sizeof_float=0
9419 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009420esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009421else
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009423/* confdefs.h. */
9424_ACEOF
9425cat confdefs.h >>conftest.$ac_ext
9426cat >>conftest.$ac_ext <<_ACEOF
9427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009428$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009429 typedef float ac__type_sizeof_;
9430static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9431static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009432#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009433#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009434int
9435main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009436{
Martin v. Löwis11437992002-04-12 09:54:03 +00009437
9438 FILE *f = fopen ("conftest.val", "w");
9439 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009440 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009441 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009444 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009445 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009446 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 }
9448 else
9449 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009451 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009453 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009456
9457 ;
9458 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009459}
Martin v. Löwis11437992002-04-12 09:54:03 +00009460_ACEOF
9461rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462if { (ac_try="$ac_link"
9463case "(($ac_try" in
9464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9465 *) ac_try_echo=$ac_try;;
9466esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009468 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472 { (case "(($ac_try" in
9473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9474 *) ac_try_echo=$ac_try;;
9475esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009477 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 (exit $ac_status); }; }; then
9481 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009482else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009483 echo "$as_me: program exited with status $ac_status" >&5
9484echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009485sed 's/^/| /' conftest.$ac_ext >&5
9486
Martin v. Löwis11437992002-04-12 09:54:03 +00009487( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488if test "$ac_cv_type_float" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009489 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009490See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009491echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009492See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009493 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009494 else
9495 ac_cv_sizeof_float=0
9496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498rm -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 +00009499fi
9500rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009501fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009502{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9503echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009504
9505
9506
Martin v. Löwis11437992002-04-12 09:54:03 +00009507cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009508#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009509_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009510
9511
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009512{ echo "$as_me:$LINENO: checking for double" >&5
9513echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9514if test "${ac_cv_type_double+set}" = set; then
9515 echo $ECHO_N "(cached) $ECHO_C" >&6
9516else
9517 cat >conftest.$ac_ext <<_ACEOF
9518/* confdefs.h. */
9519_ACEOF
9520cat confdefs.h >>conftest.$ac_ext
9521cat >>conftest.$ac_ext <<_ACEOF
9522/* end confdefs.h. */
9523$ac_includes_default
9524typedef double ac__type_new_;
9525int
9526main ()
9527{
9528if ((ac__type_new_ *) 0)
9529 return 0;
9530if (sizeof (ac__type_new_))
9531 return 0;
9532 ;
9533 return 0;
9534}
9535_ACEOF
9536rm -f conftest.$ac_objext
9537if { (ac_try="$ac_compile"
9538case "(($ac_try" in
9539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9540 *) ac_try_echo=$ac_try;;
9541esac
9542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9543 (eval "$ac_compile") 2>conftest.er1
9544 ac_status=$?
9545 grep -v '^ *+' conftest.er1 >conftest.err
9546 rm -f conftest.er1
9547 cat conftest.err >&5
9548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9549 (exit $ac_status); } && {
9550 test -z "$ac_c_werror_flag" ||
9551 test ! -s conftest.err
9552 } && test -s conftest.$ac_objext; then
9553 ac_cv_type_double=yes
9554else
9555 echo "$as_me: failed program was:" >&5
9556sed 's/^/| /' conftest.$ac_ext >&5
9557
9558 ac_cv_type_double=no
9559fi
9560
9561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9562fi
9563{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9564echo "${ECHO_T}$ac_cv_type_double" >&6; }
9565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566# The cast to long int works around a bug in the HP C Compiler
9567# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9568# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9569# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009570{ echo "$as_me:$LINENO: checking size of double" >&5
9571echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009572if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009573 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009574else
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 if test "$cross_compiling" = yes; then
9576 # Depending upon the size, compute the lo and hi bounds.
9577cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009578/* confdefs.h. */
9579_ACEOF
9580cat confdefs.h >>conftest.$ac_ext
9581cat >>conftest.$ac_ext <<_ACEOF
9582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009583$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009584 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009585int
9586main ()
9587{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009588static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009589test_array [0] = 0
9590
9591 ;
9592 return 0;
9593}
9594_ACEOF
9595rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009596if { (ac_try="$ac_compile"
9597case "(($ac_try" in
9598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9599 *) ac_try_echo=$ac_try;;
9600esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009604 grep -v '^ *+' conftest.er1 >conftest.err
9605 rm -f conftest.er1
9606 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608 (exit $ac_status); } && {
9609 test -z "$ac_c_werror_flag" ||
9610 test ! -s conftest.err
9611 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 ac_lo=0 ac_mid=0
9613 while :; do
9614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009615/* confdefs.h. */
9616_ACEOF
9617cat confdefs.h >>conftest.$ac_ext
9618cat >>conftest.$ac_ext <<_ACEOF
9619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009620$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009621 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009622int
9623main ()
9624{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009625static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009626test_array [0] = 0
9627
9628 ;
9629 return 0;
9630}
9631_ACEOF
9632rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633if { (ac_try="$ac_compile"
9634case "(($ac_try" in
9635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9636 *) ac_try_echo=$ac_try;;
9637esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009641 grep -v '^ *+' conftest.er1 >conftest.err
9642 rm -f conftest.er1
9643 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645 (exit $ac_status); } && {
9646 test -z "$ac_c_werror_flag" ||
9647 test ! -s conftest.err
9648 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ac_hi=$ac_mid; break
9650else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009652sed 's/^/| /' conftest.$ac_ext >&5
9653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009654 ac_lo=`expr $ac_mid + 1`
9655 if test $ac_lo -le $ac_mid; then
9656 ac_lo= ac_hi=
9657 break
9658 fi
9659 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009661
9662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009663 done
9664else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009666sed 's/^/| /' conftest.$ac_ext >&5
9667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* confdefs.h. */
9670_ACEOF
9671cat confdefs.h >>conftest.$ac_ext
9672cat >>conftest.$ac_ext <<_ACEOF
9673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009675 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009676int
9677main ()
9678{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009679static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009680test_array [0] = 0
9681
9682 ;
9683 return 0;
9684}
9685_ACEOF
9686rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687if { (ac_try="$ac_compile"
9688case "(($ac_try" in
9689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9690 *) ac_try_echo=$ac_try;;
9691esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009695 grep -v '^ *+' conftest.er1 >conftest.err
9696 rm -f conftest.er1
9697 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699 (exit $ac_status); } && {
9700 test -z "$ac_c_werror_flag" ||
9701 test ! -s conftest.err
9702 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ac_hi=-1 ac_mid=-1
9704 while :; do
9705 cat >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
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009712 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009713int
9714main ()
9715{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009716static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009717test_array [0] = 0
9718
9719 ;
9720 return 0;
9721}
9722_ACEOF
9723rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724if { (ac_try="$ac_compile"
9725case "(($ac_try" in
9726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9727 *) ac_try_echo=$ac_try;;
9728esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009729eval "echo \"\$as_me:$LINENO: $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
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009735 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=$ac_mid; break
9741else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009743sed 's/^/| /' conftest.$ac_ext >&5
9744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009745 ac_hi=`expr '(' $ac_mid ')' - 1`
9746 if test $ac_mid -le $ac_hi; then
9747 ac_lo= ac_hi=
9748 break
9749 fi
9750 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752
9753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 done
9755else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009757sed 's/^/| /' conftest.$ac_ext >&5
9758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761
9762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764
9765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009766# Binary search between lo and hi bounds.
9767while test "x$ac_lo" != "x$ac_hi"; do
9768 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009770/* confdefs.h. */
9771_ACEOF
9772cat confdefs.h >>conftest.$ac_ext
9773cat >>conftest.$ac_ext <<_ACEOF
9774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009775$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009776 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009777int
9778main ()
9779{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009781test_array [0] = 0
9782
9783 ;
9784 return 0;
9785}
9786_ACEOF
9787rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788if { (ac_try="$ac_compile"
9789case "(($ac_try" in
9790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9791 *) ac_try_echo=$ac_try;;
9792esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009796 grep -v '^ *+' conftest.er1 >conftest.err
9797 rm -f conftest.er1
9798 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009800 (exit $ac_status); } && {
9801 test -z "$ac_c_werror_flag" ||
9802 test ! -s conftest.err
9803 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 ac_hi=$ac_mid
9805else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009807sed 's/^/| /' conftest.$ac_ext >&5
9808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811
9812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009813done
9814case $ac_lo in
9815?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009817 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009818See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009819echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009820See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009821 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822 else
9823 ac_cv_sizeof_double=0
9824 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009825esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009826else
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009828/* confdefs.h. */
9829_ACEOF
9830cat confdefs.h >>conftest.$ac_ext
9831cat >>conftest.$ac_ext <<_ACEOF
9832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009833$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009834 typedef double ac__type_sizeof_;
9835static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9836static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009837#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009838#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009839int
9840main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009841{
Martin v. Löwis11437992002-04-12 09:54:03 +00009842
9843 FILE *f = fopen ("conftest.val", "w");
9844 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009846 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009849 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009851 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 }
9853 else
9854 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009856 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009858 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009861
9862 ;
9863 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009864}
Martin v. Löwis11437992002-04-12 09:54:03 +00009865_ACEOF
9866rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867if { (ac_try="$ac_link"
9868case "(($ac_try" in
9869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9870 *) ac_try_echo=$ac_try;;
9871esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877 { (case "(($ac_try" in
9878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9879 *) ac_try_echo=$ac_try;;
9880esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009883 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009885 (exit $ac_status); }; }; then
9886 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009887else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009888 echo "$as_me: program exited with status $ac_status" >&5
9889echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009890sed 's/^/| /' conftest.$ac_ext >&5
9891
Martin v. Löwis11437992002-04-12 09:54:03 +00009892( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893if test "$ac_cv_type_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009894 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009895See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009896echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009897See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009898 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009899 else
9900 ac_cv_sizeof_double=0
9901 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903rm -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 +00009904fi
9905rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009906fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009907{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9908echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909
9910
9911
Martin v. Löwis11437992002-04-12 09:54:03 +00009912cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009913#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009914_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009915
9916
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009917{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9918echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9919if test "${ac_cv_type_fpos_t+set}" = set; then
9920 echo $ECHO_N "(cached) $ECHO_C" >&6
9921else
9922 cat >conftest.$ac_ext <<_ACEOF
9923/* confdefs.h. */
9924_ACEOF
9925cat confdefs.h >>conftest.$ac_ext
9926cat >>conftest.$ac_ext <<_ACEOF
9927/* end confdefs.h. */
9928$ac_includes_default
9929typedef fpos_t ac__type_new_;
9930int
9931main ()
9932{
9933if ((ac__type_new_ *) 0)
9934 return 0;
9935if (sizeof (ac__type_new_))
9936 return 0;
9937 ;
9938 return 0;
9939}
9940_ACEOF
9941rm -f conftest.$ac_objext
9942if { (ac_try="$ac_compile"
9943case "(($ac_try" in
9944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9945 *) ac_try_echo=$ac_try;;
9946esac
9947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9948 (eval "$ac_compile") 2>conftest.er1
9949 ac_status=$?
9950 grep -v '^ *+' conftest.er1 >conftest.err
9951 rm -f conftest.er1
9952 cat conftest.err >&5
9953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9954 (exit $ac_status); } && {
9955 test -z "$ac_c_werror_flag" ||
9956 test ! -s conftest.err
9957 } && test -s conftest.$ac_objext; then
9958 ac_cv_type_fpos_t=yes
9959else
9960 echo "$as_me: failed program was:" >&5
9961sed 's/^/| /' conftest.$ac_ext >&5
9962
9963 ac_cv_type_fpos_t=no
9964fi
9965
9966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9967fi
9968{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9969echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971# The cast to long int works around a bug in the HP C Compiler
9972# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9973# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9974# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009975{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9976echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009977if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009978 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009979else
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 if test "$cross_compiling" = yes; then
9981 # Depending upon the size, compute the lo and hi bounds.
9982cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009983/* confdefs.h. */
9984_ACEOF
9985cat confdefs.h >>conftest.$ac_ext
9986cat >>conftest.$ac_ext <<_ACEOF
9987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009988$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009989 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009990int
9991main ()
9992{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009993static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009994test_array [0] = 0
9995
9996 ;
9997 return 0;
9998}
9999_ACEOF
10000rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010001if { (ac_try="$ac_compile"
10002case "(($ac_try" in
10003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10004 *) ac_try_echo=$ac_try;;
10005esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010009 grep -v '^ *+' conftest.er1 >conftest.err
10010 rm -f conftest.er1
10011 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013 (exit $ac_status); } && {
10014 test -z "$ac_c_werror_flag" ||
10015 test ! -s conftest.err
10016 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010017 ac_lo=0 ac_mid=0
10018 while :; do
10019 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010020/* confdefs.h. */
10021_ACEOF
10022cat confdefs.h >>conftest.$ac_ext
10023cat >>conftest.$ac_ext <<_ACEOF
10024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010025$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010026 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010027int
10028main ()
10029{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010030static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010031test_array [0] = 0
10032
10033 ;
10034 return 0;
10035}
10036_ACEOF
10037rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038if { (ac_try="$ac_compile"
10039case "(($ac_try" in
10040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10041 *) ac_try_echo=$ac_try;;
10042esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010046 grep -v '^ *+' conftest.er1 >conftest.err
10047 rm -f conftest.er1
10048 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050 (exit $ac_status); } && {
10051 test -z "$ac_c_werror_flag" ||
10052 test ! -s conftest.err
10053 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010054 ac_hi=$ac_mid; break
10055else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010057sed 's/^/| /' conftest.$ac_ext >&5
10058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010059 ac_lo=`expr $ac_mid + 1`
10060 if test $ac_lo -le $ac_mid; then
10061 ac_lo= ac_hi=
10062 break
10063 fi
10064 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066
10067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 done
10069else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010071sed 's/^/| /' conftest.$ac_ext >&5
10072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010074/* confdefs.h. */
10075_ACEOF
10076cat confdefs.h >>conftest.$ac_ext
10077cat >>conftest.$ac_ext <<_ACEOF
10078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010079$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010080 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010081int
10082main ()
10083{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010084static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010085test_array [0] = 0
10086
10087 ;
10088 return 0;
10089}
10090_ACEOF
10091rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092if { (ac_try="$ac_compile"
10093case "(($ac_try" in
10094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10095 *) ac_try_echo=$ac_try;;
10096esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010100 grep -v '^ *+' conftest.er1 >conftest.err
10101 rm -f conftest.er1
10102 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010104 (exit $ac_status); } && {
10105 test -z "$ac_c_werror_flag" ||
10106 test ! -s conftest.err
10107 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 ac_hi=-1 ac_mid=-1
10109 while :; do
10110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010111/* confdefs.h. */
10112_ACEOF
10113cat confdefs.h >>conftest.$ac_ext
10114cat >>conftest.$ac_ext <<_ACEOF
10115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010116$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010117 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010118int
10119main ()
10120{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010121static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010122test_array [0] = 0
10123
10124 ;
10125 return 0;
10126}
10127_ACEOF
10128rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010129if { (ac_try="$ac_compile"
10130case "(($ac_try" in
10131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10132 *) ac_try_echo=$ac_try;;
10133esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010137 grep -v '^ *+' conftest.er1 >conftest.err
10138 rm -f conftest.er1
10139 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141 (exit $ac_status); } && {
10142 test -z "$ac_c_werror_flag" ||
10143 test ! -s conftest.err
10144 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010145 ac_lo=$ac_mid; break
10146else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010148sed 's/^/| /' conftest.$ac_ext >&5
10149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010150 ac_hi=`expr '(' $ac_mid ')' - 1`
10151 if test $ac_mid -le $ac_hi; then
10152 ac_lo= ac_hi=
10153 break
10154 fi
10155 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157
10158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 done
10160else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010162sed 's/^/| /' conftest.$ac_ext >&5
10163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166
10167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010169
10170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010171# Binary search between lo and hi bounds.
10172while test "x$ac_lo" != "x$ac_hi"; do
10173 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010175/* confdefs.h. */
10176_ACEOF
10177cat confdefs.h >>conftest.$ac_ext
10178cat >>conftest.$ac_ext <<_ACEOF
10179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010180$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010181 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010182int
10183main ()
10184{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010185static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010186test_array [0] = 0
10187
10188 ;
10189 return 0;
10190}
10191_ACEOF
10192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193if { (ac_try="$ac_compile"
10194case "(($ac_try" in
10195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10196 *) ac_try_echo=$ac_try;;
10197esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010201 grep -v '^ *+' conftest.er1 >conftest.err
10202 rm -f conftest.er1
10203 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205 (exit $ac_status); } && {
10206 test -z "$ac_c_werror_flag" ||
10207 test ! -s conftest.err
10208 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 ac_hi=$ac_mid
10210else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010212sed 's/^/| /' conftest.$ac_ext >&5
10213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216
10217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010218done
10219case $ac_lo in
10220?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010222 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010223See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010224echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010225See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010226 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 else
10228 ac_cv_sizeof_fpos_t=0
10229 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010230esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010231else
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010233/* confdefs.h. */
10234_ACEOF
10235cat confdefs.h >>conftest.$ac_ext
10236cat >>conftest.$ac_ext <<_ACEOF
10237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010238$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010239 typedef fpos_t ac__type_sizeof_;
10240static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10241static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010242#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010243#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010244int
10245main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010246{
Martin v. Löwis11437992002-04-12 09:54:03 +000010247
10248 FILE *f = fopen ("conftest.val", "w");
10249 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010251 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010254 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010256 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 }
10258 else
10259 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010261 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010263 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010266
10267 ;
10268 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010269}
Martin v. Löwis11437992002-04-12 09:54:03 +000010270_ACEOF
10271rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272if { (ac_try="$ac_link"
10273case "(($ac_try" in
10274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10275 *) ac_try_echo=$ac_try;;
10276esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282 { (case "(($ac_try" in
10283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10284 *) ac_try_echo=$ac_try;;
10285esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 (exit $ac_status); }; }; then
10291 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010292else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010293 echo "$as_me: program exited with status $ac_status" >&5
10294echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010295sed 's/^/| /' conftest.$ac_ext >&5
10296
Martin v. Löwis11437992002-04-12 09:54:03 +000010297( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010298if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010299 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010300See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010301echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010302See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010303 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304 else
10305 ac_cv_sizeof_fpos_t=0
10306 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010308rm -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 +000010309fi
10310rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010311fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010312{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10313echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010314
10315
10316
Martin v. Löwis11437992002-04-12 09:54:03 +000010317cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010318#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010319_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010320
Michael W. Hudson54241132001-12-07 15:38:26 +000010321
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010322{ echo "$as_me:$LINENO: checking for size_t" >&5
10323echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10324if test "${ac_cv_type_size_t+set}" = set; then
10325 echo $ECHO_N "(cached) $ECHO_C" >&6
10326else
10327 cat >conftest.$ac_ext <<_ACEOF
10328/* confdefs.h. */
10329_ACEOF
10330cat confdefs.h >>conftest.$ac_ext
10331cat >>conftest.$ac_ext <<_ACEOF
10332/* end confdefs.h. */
10333$ac_includes_default
10334typedef size_t ac__type_new_;
10335int
10336main ()
10337{
10338if ((ac__type_new_ *) 0)
10339 return 0;
10340if (sizeof (ac__type_new_))
10341 return 0;
10342 ;
10343 return 0;
10344}
10345_ACEOF
10346rm -f conftest.$ac_objext
10347if { (ac_try="$ac_compile"
10348case "(($ac_try" in
10349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10350 *) ac_try_echo=$ac_try;;
10351esac
10352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10353 (eval "$ac_compile") 2>conftest.er1
10354 ac_status=$?
10355 grep -v '^ *+' conftest.er1 >conftest.err
10356 rm -f conftest.er1
10357 cat conftest.err >&5
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); } && {
10360 test -z "$ac_c_werror_flag" ||
10361 test ! -s conftest.err
10362 } && test -s conftest.$ac_objext; then
10363 ac_cv_type_size_t=yes
10364else
10365 echo "$as_me: failed program was:" >&5
10366sed 's/^/| /' conftest.$ac_ext >&5
10367
10368 ac_cv_type_size_t=no
10369fi
10370
10371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10372fi
10373{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10374echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376# The cast to long int works around a bug in the HP C Compiler
10377# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10378# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10379# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010380{ echo "$as_me:$LINENO: checking size of size_t" >&5
10381echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010382if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010383 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010384else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010385 if test "$cross_compiling" = yes; then
10386 # Depending upon the size, compute the lo and hi bounds.
10387cat >conftest.$ac_ext <<_ACEOF
10388/* confdefs.h. */
10389_ACEOF
10390cat confdefs.h >>conftest.$ac_ext
10391cat >>conftest.$ac_ext <<_ACEOF
10392/* end confdefs.h. */
10393$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010394 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010395int
10396main ()
10397{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010398static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010399test_array [0] = 0
10400
10401 ;
10402 return 0;
10403}
10404_ACEOF
10405rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010406if { (ac_try="$ac_compile"
10407case "(($ac_try" in
10408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10409 *) ac_try_echo=$ac_try;;
10410esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010413 ac_status=$?
10414 grep -v '^ *+' conftest.er1 >conftest.err
10415 rm -f conftest.er1
10416 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418 (exit $ac_status); } && {
10419 test -z "$ac_c_werror_flag" ||
10420 test ! -s conftest.err
10421 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010422 ac_lo=0 ac_mid=0
10423 while :; do
10424 cat >conftest.$ac_ext <<_ACEOF
10425/* confdefs.h. */
10426_ACEOF
10427cat confdefs.h >>conftest.$ac_ext
10428cat >>conftest.$ac_ext <<_ACEOF
10429/* end confdefs.h. */
10430$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010431 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010432int
10433main ()
10434{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010435static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436test_array [0] = 0
10437
10438 ;
10439 return 0;
10440}
10441_ACEOF
10442rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443if { (ac_try="$ac_compile"
10444case "(($ac_try" in
10445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10446 *) ac_try_echo=$ac_try;;
10447esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450 ac_status=$?
10451 grep -v '^ *+' conftest.er1 >conftest.err
10452 rm -f conftest.er1
10453 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455 (exit $ac_status); } && {
10456 test -z "$ac_c_werror_flag" ||
10457 test ! -s conftest.err
10458 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010459 ac_hi=$ac_mid; break
10460else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010461 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010462sed 's/^/| /' conftest.$ac_ext >&5
10463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010464 ac_lo=`expr $ac_mid + 1`
10465 if test $ac_lo -le $ac_mid; then
10466 ac_lo= ac_hi=
10467 break
10468 fi
10469 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010471
10472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010473 done
10474else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010475 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010476sed 's/^/| /' conftest.$ac_ext >&5
10477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010479/* confdefs.h. */
10480_ACEOF
10481cat confdefs.h >>conftest.$ac_ext
10482cat >>conftest.$ac_ext <<_ACEOF
10483/* end confdefs.h. */
10484$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010485 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010486int
10487main ()
10488{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010489static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010490test_array [0] = 0
10491
10492 ;
10493 return 0;
10494}
10495_ACEOF
10496rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010497if { (ac_try="$ac_compile"
10498case "(($ac_try" in
10499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10500 *) ac_try_echo=$ac_try;;
10501esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010503 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010504 ac_status=$?
10505 grep -v '^ *+' conftest.er1 >conftest.err
10506 rm -f conftest.er1
10507 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010509 (exit $ac_status); } && {
10510 test -z "$ac_c_werror_flag" ||
10511 test ! -s conftest.err
10512 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010513 ac_hi=-1 ac_mid=-1
10514 while :; do
10515 cat >conftest.$ac_ext <<_ACEOF
10516/* confdefs.h. */
10517_ACEOF
10518cat confdefs.h >>conftest.$ac_ext
10519cat >>conftest.$ac_ext <<_ACEOF
10520/* end confdefs.h. */
10521$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010522 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010523int
10524main ()
10525{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010526static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527test_array [0] = 0
10528
10529 ;
10530 return 0;
10531}
10532_ACEOF
10533rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534if { (ac_try="$ac_compile"
10535case "(($ac_try" in
10536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10537 *) ac_try_echo=$ac_try;;
10538esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541 ac_status=$?
10542 grep -v '^ *+' conftest.er1 >conftest.err
10543 rm -f conftest.er1
10544 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546 (exit $ac_status); } && {
10547 test -z "$ac_c_werror_flag" ||
10548 test ! -s conftest.err
10549 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010550 ac_lo=$ac_mid; break
10551else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010552 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553sed 's/^/| /' conftest.$ac_ext >&5
10554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010555 ac_hi=`expr '(' $ac_mid ')' - 1`
10556 if test $ac_mid -le $ac_hi; then
10557 ac_lo= ac_hi=
10558 break
10559 fi
10560 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010562
10563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564 done
10565else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010566 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010567sed 's/^/| /' conftest.$ac_ext >&5
10568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010571
10572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010574
10575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576# Binary search between lo and hi bounds.
10577while test "x$ac_lo" != "x$ac_hi"; do
10578 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10579 cat >conftest.$ac_ext <<_ACEOF
10580/* confdefs.h. */
10581_ACEOF
10582cat confdefs.h >>conftest.$ac_ext
10583cat >>conftest.$ac_ext <<_ACEOF
10584/* end confdefs.h. */
10585$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010586 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587int
10588main ()
10589{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010590static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591test_array [0] = 0
10592
10593 ;
10594 return 0;
10595}
10596_ACEOF
10597rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598if { (ac_try="$ac_compile"
10599case "(($ac_try" in
10600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10601 *) ac_try_echo=$ac_try;;
10602esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605 ac_status=$?
10606 grep -v '^ *+' conftest.er1 >conftest.err
10607 rm -f conftest.er1
10608 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010610 (exit $ac_status); } && {
10611 test -z "$ac_c_werror_flag" ||
10612 test ! -s conftest.err
10613 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010614 ac_hi=$ac_mid
10615else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010616 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617sed 's/^/| /' conftest.$ac_ext >&5
10618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010621
10622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010623done
10624case $ac_lo in
10625?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010627 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010629echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010630See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010631 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632 else
10633 ac_cv_sizeof_size_t=0
10634 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635esac
10636else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010637 cat >conftest.$ac_ext <<_ACEOF
10638/* confdefs.h. */
10639_ACEOF
10640cat confdefs.h >>conftest.$ac_ext
10641cat >>conftest.$ac_ext <<_ACEOF
10642/* end confdefs.h. */
10643$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010644 typedef size_t ac__type_sizeof_;
10645static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10646static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010647#include <stdio.h>
10648#include <stdlib.h>
10649int
10650main ()
10651{
10652
10653 FILE *f = fopen ("conftest.val", "w");
10654 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010655 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010656 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010659 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010661 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010662 }
10663 else
10664 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010666 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010668 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671
10672 ;
10673 return 0;
10674}
10675_ACEOF
10676rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677if { (ac_try="$ac_link"
10678case "(($ac_try" in
10679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10680 *) ac_try_echo=$ac_try;;
10681esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010686 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687 { (case "(($ac_try" in
10688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10689 *) ac_try_echo=$ac_try;;
10690esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010693 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010695 (exit $ac_status); }; }; then
10696 ac_cv_sizeof_size_t=`cat conftest.val`
10697else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010698 echo "$as_me: program exited with status $ac_status" >&5
10699echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010700sed 's/^/| /' conftest.$ac_ext >&5
10701
10702( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010704 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010705See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010706echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010707See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010708 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709 else
10710 ac_cv_sizeof_size_t=0
10711 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713rm -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 +000010714fi
10715rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010716fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010717{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10718echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719
10720
10721
Martin v. Löwis18e16552006-02-15 17:27:45 +000010722cat >>confdefs.h <<_ACEOF
10723#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10724_ACEOF
10725
10726
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010727{ echo "$as_me:$LINENO: checking for pid_t" >&5
10728echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10729if test "${ac_cv_type_pid_t+set}" = set; then
10730 echo $ECHO_N "(cached) $ECHO_C" >&6
10731else
10732 cat >conftest.$ac_ext <<_ACEOF
10733/* confdefs.h. */
10734_ACEOF
10735cat confdefs.h >>conftest.$ac_ext
10736cat >>conftest.$ac_ext <<_ACEOF
10737/* end confdefs.h. */
10738$ac_includes_default
10739typedef pid_t ac__type_new_;
10740int
10741main ()
10742{
10743if ((ac__type_new_ *) 0)
10744 return 0;
10745if (sizeof (ac__type_new_))
10746 return 0;
10747 ;
10748 return 0;
10749}
10750_ACEOF
10751rm -f conftest.$ac_objext
10752if { (ac_try="$ac_compile"
10753case "(($ac_try" in
10754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10755 *) ac_try_echo=$ac_try;;
10756esac
10757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10758 (eval "$ac_compile") 2>conftest.er1
10759 ac_status=$?
10760 grep -v '^ *+' conftest.er1 >conftest.err
10761 rm -f conftest.er1
10762 cat conftest.err >&5
10763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10764 (exit $ac_status); } && {
10765 test -z "$ac_c_werror_flag" ||
10766 test ! -s conftest.err
10767 } && test -s conftest.$ac_objext; then
10768 ac_cv_type_pid_t=yes
10769else
10770 echo "$as_me: failed program was:" >&5
10771sed 's/^/| /' conftest.$ac_ext >&5
10772
10773 ac_cv_type_pid_t=no
10774fi
10775
10776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10777fi
10778{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10779echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10780
Christian Heimes400adb02008-02-01 08:12:03 +000010781# The cast to long int works around a bug in the HP C Compiler
10782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10784# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010785{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10786echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010787if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010788 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010789else
10790 if test "$cross_compiling" = yes; then
10791 # Depending upon the size, compute the lo and hi bounds.
10792cat >conftest.$ac_ext <<_ACEOF
10793/* confdefs.h. */
10794_ACEOF
10795cat confdefs.h >>conftest.$ac_ext
10796cat >>conftest.$ac_ext <<_ACEOF
10797/* end confdefs.h. */
10798$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010799 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010800int
10801main ()
10802{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010803static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010804test_array [0] = 0
10805
10806 ;
10807 return 0;
10808}
10809_ACEOF
10810rm -f conftest.$ac_objext
10811if { (ac_try="$ac_compile"
10812case "(($ac_try" in
10813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10814 *) ac_try_echo=$ac_try;;
10815esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010817 (eval "$ac_compile") 2>conftest.er1
10818 ac_status=$?
10819 grep -v '^ *+' conftest.er1 >conftest.err
10820 rm -f conftest.er1
10821 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010823 (exit $ac_status); } && {
10824 test -z "$ac_c_werror_flag" ||
10825 test ! -s conftest.err
10826 } && test -s conftest.$ac_objext; then
10827 ac_lo=0 ac_mid=0
10828 while :; do
10829 cat >conftest.$ac_ext <<_ACEOF
10830/* confdefs.h. */
10831_ACEOF
10832cat confdefs.h >>conftest.$ac_ext
10833cat >>conftest.$ac_ext <<_ACEOF
10834/* end confdefs.h. */
10835$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010836 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010837int
10838main ()
10839{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010840static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010841test_array [0] = 0
10842
10843 ;
10844 return 0;
10845}
10846_ACEOF
10847rm -f conftest.$ac_objext
10848if { (ac_try="$ac_compile"
10849case "(($ac_try" in
10850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10851 *) ac_try_echo=$ac_try;;
10852esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010854 (eval "$ac_compile") 2>conftest.er1
10855 ac_status=$?
10856 grep -v '^ *+' conftest.er1 >conftest.err
10857 rm -f conftest.er1
10858 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010860 (exit $ac_status); } && {
10861 test -z "$ac_c_werror_flag" ||
10862 test ! -s conftest.err
10863 } && test -s conftest.$ac_objext; then
10864 ac_hi=$ac_mid; break
10865else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010866 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010867sed 's/^/| /' conftest.$ac_ext >&5
10868
10869 ac_lo=`expr $ac_mid + 1`
10870 if test $ac_lo -le $ac_mid; then
10871 ac_lo= ac_hi=
10872 break
10873 fi
10874 ac_mid=`expr 2 '*' $ac_mid + 1`
10875fi
10876
10877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10878 done
10879else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010880 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010881sed 's/^/| /' conftest.$ac_ext >&5
10882
10883 cat >conftest.$ac_ext <<_ACEOF
10884/* confdefs.h. */
10885_ACEOF
10886cat confdefs.h >>conftest.$ac_ext
10887cat >>conftest.$ac_ext <<_ACEOF
10888/* end confdefs.h. */
10889$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010890 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010891int
10892main ()
10893{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010894static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010895test_array [0] = 0
10896
10897 ;
10898 return 0;
10899}
10900_ACEOF
10901rm -f conftest.$ac_objext
10902if { (ac_try="$ac_compile"
10903case "(($ac_try" in
10904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10905 *) ac_try_echo=$ac_try;;
10906esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010908 (eval "$ac_compile") 2>conftest.er1
10909 ac_status=$?
10910 grep -v '^ *+' conftest.er1 >conftest.err
10911 rm -f conftest.er1
10912 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010914 (exit $ac_status); } && {
10915 test -z "$ac_c_werror_flag" ||
10916 test ! -s conftest.err
10917 } && test -s conftest.$ac_objext; then
10918 ac_hi=-1 ac_mid=-1
10919 while :; do
10920 cat >conftest.$ac_ext <<_ACEOF
10921/* confdefs.h. */
10922_ACEOF
10923cat confdefs.h >>conftest.$ac_ext
10924cat >>conftest.$ac_ext <<_ACEOF
10925/* end confdefs.h. */
10926$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010927 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010928int
10929main ()
10930{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010931static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010932test_array [0] = 0
10933
10934 ;
10935 return 0;
10936}
10937_ACEOF
10938rm -f conftest.$ac_objext
10939if { (ac_try="$ac_compile"
10940case "(($ac_try" in
10941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10942 *) ac_try_echo=$ac_try;;
10943esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010945 (eval "$ac_compile") 2>conftest.er1
10946 ac_status=$?
10947 grep -v '^ *+' conftest.er1 >conftest.err
10948 rm -f conftest.er1
10949 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010951 (exit $ac_status); } && {
10952 test -z "$ac_c_werror_flag" ||
10953 test ! -s conftest.err
10954 } && test -s conftest.$ac_objext; then
10955 ac_lo=$ac_mid; break
10956else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010957 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010958sed 's/^/| /' conftest.$ac_ext >&5
10959
10960 ac_hi=`expr '(' $ac_mid ')' - 1`
10961 if test $ac_mid -le $ac_hi; then
10962 ac_lo= ac_hi=
10963 break
10964 fi
10965 ac_mid=`expr 2 '*' $ac_mid`
10966fi
10967
10968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10969 done
10970else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010971 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010972sed 's/^/| /' conftest.$ac_ext >&5
10973
10974 ac_lo= ac_hi=
10975fi
10976
10977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10978fi
10979
10980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10981# Binary search between lo and hi bounds.
10982while test "x$ac_lo" != "x$ac_hi"; do
10983 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10984 cat >conftest.$ac_ext <<_ACEOF
10985/* confdefs.h. */
10986_ACEOF
10987cat confdefs.h >>conftest.$ac_ext
10988cat >>conftest.$ac_ext <<_ACEOF
10989/* end confdefs.h. */
10990$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010991 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010992int
10993main ()
10994{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010995static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010996test_array [0] = 0
10997
10998 ;
10999 return 0;
11000}
11001_ACEOF
11002rm -f conftest.$ac_objext
11003if { (ac_try="$ac_compile"
11004case "(($ac_try" in
11005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11006 *) ac_try_echo=$ac_try;;
11007esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011009 (eval "$ac_compile") 2>conftest.er1
11010 ac_status=$?
11011 grep -v '^ *+' conftest.er1 >conftest.err
11012 rm -f conftest.er1
11013 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011015 (exit $ac_status); } && {
11016 test -z "$ac_c_werror_flag" ||
11017 test ! -s conftest.err
11018 } && test -s conftest.$ac_objext; then
11019 ac_hi=$ac_mid
11020else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011021 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011022sed 's/^/| /' conftest.$ac_ext >&5
11023
11024 ac_lo=`expr '(' $ac_mid ')' + 1`
11025fi
11026
11027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11028done
11029case $ac_lo in
11030?*) ac_cv_sizeof_pid_t=$ac_lo;;
11031'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011032 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011033See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011034echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011035See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011036 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011037 else
11038 ac_cv_sizeof_pid_t=0
11039 fi ;;
11040esac
11041else
11042 cat >conftest.$ac_ext <<_ACEOF
11043/* confdefs.h. */
11044_ACEOF
11045cat confdefs.h >>conftest.$ac_ext
11046cat >>conftest.$ac_ext <<_ACEOF
11047/* end confdefs.h. */
11048$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011049 typedef pid_t ac__type_sizeof_;
11050static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11051static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011052#include <stdio.h>
11053#include <stdlib.h>
11054int
11055main ()
11056{
11057
11058 FILE *f = fopen ("conftest.val", "w");
11059 if (! f)
11060 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011061 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011062 {
11063 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011064 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011065 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011066 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011067 }
11068 else
11069 {
11070 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011071 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011072 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011073 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011074 }
11075 return ferror (f) || fclose (f) != 0;
11076
11077 ;
11078 return 0;
11079}
11080_ACEOF
11081rm -f conftest$ac_exeext
11082if { (ac_try="$ac_link"
11083case "(($ac_try" in
11084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11085 *) ac_try_echo=$ac_try;;
11086esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011088 (eval "$ac_link") 2>&5
11089 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11092 { (case "(($ac_try" in
11093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11094 *) ac_try_echo=$ac_try;;
11095esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011097 (eval "$ac_try") 2>&5
11098 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011100 (exit $ac_status); }; }; then
11101 ac_cv_sizeof_pid_t=`cat conftest.val`
11102else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011103 echo "$as_me: program exited with status $ac_status" >&5
11104echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011105sed 's/^/| /' conftest.$ac_ext >&5
11106
11107( exit $ac_status )
11108if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011109 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011110See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011111echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011112See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011113 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011114 else
11115 ac_cv_sizeof_pid_t=0
11116 fi
11117fi
11118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11119fi
11120rm -f conftest.val
11121fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011122{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11123echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011124
11125
11126
11127cat >>confdefs.h <<_ACEOF
11128#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11129_ACEOF
11130
11131
Michael W. Hudson54241132001-12-07 15:38:26 +000011132
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011133{ echo "$as_me:$LINENO: checking for long long support" >&5
11134echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011135have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011137/* confdefs.h. */
11138_ACEOF
11139cat confdefs.h >>conftest.$ac_ext
11140cat >>conftest.$ac_ext <<_ACEOF
11141/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011142
Martin v. Löwis11437992002-04-12 09:54:03 +000011143int
11144main ()
11145{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011146long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011147 ;
11148 return 0;
11149}
11150_ACEOF
11151rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011152if { (ac_try="$ac_compile"
11153case "(($ac_try" in
11154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11155 *) ac_try_echo=$ac_try;;
11156esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011160 grep -v '^ *+' conftest.er1 >conftest.err
11161 rm -f conftest.er1
11162 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164 (exit $ac_status); } && {
11165 test -z "$ac_c_werror_flag" ||
11166 test ! -s conftest.err
11167 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011168
11169
11170cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011171#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011172_ACEOF
11173
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011174 have_long_long=yes
11175
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011176else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011178sed 's/^/| /' conftest.$ac_ext >&5
11179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182
11183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011184{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11185echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011186if test "$have_long_long" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011187{ echo "$as_me:$LINENO: checking for long long" >&5
11188echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11189if test "${ac_cv_type_long_long+set}" = set; then
11190 echo $ECHO_N "(cached) $ECHO_C" >&6
11191else
11192 cat >conftest.$ac_ext <<_ACEOF
11193/* confdefs.h. */
11194_ACEOF
11195cat confdefs.h >>conftest.$ac_ext
11196cat >>conftest.$ac_ext <<_ACEOF
11197/* end confdefs.h. */
11198$ac_includes_default
11199typedef long long ac__type_new_;
11200int
11201main ()
11202{
11203if ((ac__type_new_ *) 0)
11204 return 0;
11205if (sizeof (ac__type_new_))
11206 return 0;
11207 ;
11208 return 0;
11209}
11210_ACEOF
11211rm -f conftest.$ac_objext
11212if { (ac_try="$ac_compile"
11213case "(($ac_try" in
11214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11215 *) ac_try_echo=$ac_try;;
11216esac
11217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11218 (eval "$ac_compile") 2>conftest.er1
11219 ac_status=$?
11220 grep -v '^ *+' conftest.er1 >conftest.err
11221 rm -f conftest.er1
11222 cat conftest.err >&5
11223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11224 (exit $ac_status); } && {
11225 test -z "$ac_c_werror_flag" ||
11226 test ! -s conftest.err
11227 } && test -s conftest.$ac_objext; then
11228 ac_cv_type_long_long=yes
11229else
11230 echo "$as_me: failed program was:" >&5
11231sed 's/^/| /' conftest.$ac_ext >&5
11232
11233 ac_cv_type_long_long=no
11234fi
11235
11236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11237fi
11238{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11239echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011241# The cast to long int works around a bug in the HP C Compiler
11242# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11243# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11244# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011245{ echo "$as_me:$LINENO: checking size of long long" >&5
11246echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011247if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011248 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011249else
Martin v. Löwis11437992002-04-12 09:54:03 +000011250 if test "$cross_compiling" = yes; then
11251 # Depending upon the size, compute the lo and hi bounds.
11252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011253/* confdefs.h. */
11254_ACEOF
11255cat confdefs.h >>conftest.$ac_ext
11256cat >>conftest.$ac_ext <<_ACEOF
11257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011258$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011259 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011260int
11261main ()
11262{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011263static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011264test_array [0] = 0
11265
11266 ;
11267 return 0;
11268}
11269_ACEOF
11270rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011271if { (ac_try="$ac_compile"
11272case "(($ac_try" in
11273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11274 *) ac_try_echo=$ac_try;;
11275esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011279 grep -v '^ *+' conftest.er1 >conftest.err
11280 rm -f conftest.er1
11281 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011283 (exit $ac_status); } && {
11284 test -z "$ac_c_werror_flag" ||
11285 test ! -s conftest.err
11286 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011287 ac_lo=0 ac_mid=0
11288 while :; do
11289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011290/* confdefs.h. */
11291_ACEOF
11292cat confdefs.h >>conftest.$ac_ext
11293cat >>conftest.$ac_ext <<_ACEOF
11294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011295$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011296 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011297int
11298main ()
11299{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011301test_array [0] = 0
11302
11303 ;
11304 return 0;
11305}
11306_ACEOF
11307rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011308if { (ac_try="$ac_compile"
11309case "(($ac_try" in
11310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11311 *) ac_try_echo=$ac_try;;
11312esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011316 grep -v '^ *+' conftest.er1 >conftest.err
11317 rm -f conftest.er1
11318 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320 (exit $ac_status); } && {
11321 test -z "$ac_c_werror_flag" ||
11322 test ! -s conftest.err
11323 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 ac_hi=$ac_mid; break
11325else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011327sed 's/^/| /' conftest.$ac_ext >&5
11328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011329 ac_lo=`expr $ac_mid + 1`
11330 if test $ac_lo -le $ac_mid; then
11331 ac_lo= ac_hi=
11332 break
11333 fi
11334 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336
11337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 done
11339else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011341sed 's/^/| /' conftest.$ac_ext >&5
11342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011344/* confdefs.h. */
11345_ACEOF
11346cat confdefs.h >>conftest.$ac_ext
11347cat >>conftest.$ac_ext <<_ACEOF
11348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011349$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011350 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011351int
11352main ()
11353{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011354static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011355test_array [0] = 0
11356
11357 ;
11358 return 0;
11359}
11360_ACEOF
11361rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011362if { (ac_try="$ac_compile"
11363case "(($ac_try" in
11364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11365 *) ac_try_echo=$ac_try;;
11366esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011368 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011370 grep -v '^ *+' conftest.er1 >conftest.err
11371 rm -f conftest.er1
11372 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374 (exit $ac_status); } && {
11375 test -z "$ac_c_werror_flag" ||
11376 test ! -s conftest.err
11377 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 ac_hi=-1 ac_mid=-1
11379 while :; do
11380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011381/* confdefs.h. */
11382_ACEOF
11383cat confdefs.h >>conftest.$ac_ext
11384cat >>conftest.$ac_ext <<_ACEOF
11385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011386$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011387 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011388int
11389main ()
11390{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011391static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011392test_array [0] = 0
11393
11394 ;
11395 return 0;
11396}
11397_ACEOF
11398rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399if { (ac_try="$ac_compile"
11400case "(($ac_try" in
11401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11402 *) ac_try_echo=$ac_try;;
11403esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011407 grep -v '^ *+' conftest.er1 >conftest.err
11408 rm -f conftest.er1
11409 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411 (exit $ac_status); } && {
11412 test -z "$ac_c_werror_flag" ||
11413 test ! -s conftest.err
11414 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 ac_lo=$ac_mid; break
11416else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011418sed 's/^/| /' conftest.$ac_ext >&5
11419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420 ac_hi=`expr '(' $ac_mid ')' - 1`
11421 if test $ac_mid -le $ac_hi; then
11422 ac_lo= ac_hi=
11423 break
11424 fi
11425 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427
11428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 done
11430else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011432sed 's/^/| /' conftest.$ac_ext >&5
11433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011436
11437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439
11440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011441# Binary search between lo and hi bounds.
11442while test "x$ac_lo" != "x$ac_hi"; do
11443 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011445/* confdefs.h. */
11446_ACEOF
11447cat confdefs.h >>conftest.$ac_ext
11448cat >>conftest.$ac_ext <<_ACEOF
11449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011450$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011451 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011452int
11453main ()
11454{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011455static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011456test_array [0] = 0
11457
11458 ;
11459 return 0;
11460}
11461_ACEOF
11462rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463if { (ac_try="$ac_compile"
11464case "(($ac_try" in
11465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11466 *) ac_try_echo=$ac_try;;
11467esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011471 grep -v '^ *+' conftest.er1 >conftest.err
11472 rm -f conftest.er1
11473 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011475 (exit $ac_status); } && {
11476 test -z "$ac_c_werror_flag" ||
11477 test ! -s conftest.err
11478 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 ac_hi=$ac_mid
11480else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011482sed 's/^/| /' conftest.$ac_ext >&5
11483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011486
11487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011488done
11489case $ac_lo in
11490?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011491'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011492 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011493See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011494echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011495See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011496 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497 else
11498 ac_cv_sizeof_long_long=0
11499 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011500esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011501else
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011503/* confdefs.h. */
11504_ACEOF
11505cat confdefs.h >>conftest.$ac_ext
11506cat >>conftest.$ac_ext <<_ACEOF
11507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011508$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011509 typedef long long ac__type_sizeof_;
11510static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11511static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011512#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011513#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011514int
11515main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011516{
Martin v. Löwis11437992002-04-12 09:54:03 +000011517
11518 FILE *f = fopen ("conftest.val", "w");
11519 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011520 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011521 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011524 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011526 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 }
11528 else
11529 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011531 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011533 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011536
11537 ;
11538 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011539}
Martin v. Löwis11437992002-04-12 09:54:03 +000011540_ACEOF
11541rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542if { (ac_try="$ac_link"
11543case "(($ac_try" in
11544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11545 *) ac_try_echo=$ac_try;;
11546esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552 { (case "(($ac_try" in
11553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11554 *) ac_try_echo=$ac_try;;
11555esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 (exit $ac_status); }; }; then
11561 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011562else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011563 echo "$as_me: program exited with status $ac_status" >&5
11564echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011565sed 's/^/| /' conftest.$ac_ext >&5
11566
Martin v. Löwis11437992002-04-12 09:54:03 +000011567( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011568if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011569 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011570See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011571echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011572See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011573 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574 else
11575 ac_cv_sizeof_long_long=0
11576 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578rm -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 +000011579fi
11580rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011581fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011582{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11583echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011584
11585
11586
Martin v. Löwis11437992002-04-12 09:54:03 +000011587cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011588#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011589_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011590
Michael W. Hudson54241132001-12-07 15:38:26 +000011591
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011592fi
11593
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011594{ echo "$as_me:$LINENO: checking for long double support" >&5
11595echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011596have_long_double=no
11597cat >conftest.$ac_ext <<_ACEOF
11598/* confdefs.h. */
11599_ACEOF
11600cat confdefs.h >>conftest.$ac_ext
11601cat >>conftest.$ac_ext <<_ACEOF
11602/* end confdefs.h. */
11603
11604int
11605main ()
11606{
11607long double x; x = (long double)0;
11608 ;
11609 return 0;
11610}
11611_ACEOF
11612rm -f conftest.$ac_objext
11613if { (ac_try="$ac_compile"
11614case "(($ac_try" in
11615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11616 *) ac_try_echo=$ac_try;;
11617esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011619 (eval "$ac_compile") 2>conftest.er1
11620 ac_status=$?
11621 grep -v '^ *+' conftest.er1 >conftest.err
11622 rm -f conftest.er1
11623 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011625 (exit $ac_status); } && {
11626 test -z "$ac_c_werror_flag" ||
11627 test ! -s conftest.err
11628 } && test -s conftest.$ac_objext; then
11629
11630
11631cat >>confdefs.h <<\_ACEOF
11632#define HAVE_LONG_DOUBLE 1
11633_ACEOF
11634
11635 have_long_double=yes
11636
11637else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011638 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011639sed 's/^/| /' conftest.$ac_ext >&5
11640
11641
11642fi
11643
11644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011645{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11646echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011647if test "$have_long_double" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011648{ echo "$as_me:$LINENO: checking for long double" >&5
11649echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11650if test "${ac_cv_type_long_double+set}" = set; then
11651 echo $ECHO_N "(cached) $ECHO_C" >&6
11652else
11653 cat >conftest.$ac_ext <<_ACEOF
11654/* confdefs.h. */
11655_ACEOF
11656cat confdefs.h >>conftest.$ac_ext
11657cat >>conftest.$ac_ext <<_ACEOF
11658/* end confdefs.h. */
11659$ac_includes_default
11660typedef long double ac__type_new_;
11661int
11662main ()
11663{
11664if ((ac__type_new_ *) 0)
11665 return 0;
11666if (sizeof (ac__type_new_))
11667 return 0;
11668 ;
11669 return 0;
11670}
11671_ACEOF
11672rm -f conftest.$ac_objext
11673if { (ac_try="$ac_compile"
11674case "(($ac_try" in
11675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11676 *) ac_try_echo=$ac_try;;
11677esac
11678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11679 (eval "$ac_compile") 2>conftest.er1
11680 ac_status=$?
11681 grep -v '^ *+' conftest.er1 >conftest.err
11682 rm -f conftest.er1
11683 cat conftest.err >&5
11684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11685 (exit $ac_status); } && {
11686 test -z "$ac_c_werror_flag" ||
11687 test ! -s conftest.err
11688 } && test -s conftest.$ac_objext; then
11689 ac_cv_type_long_double=yes
11690else
11691 echo "$as_me: failed program was:" >&5
11692sed 's/^/| /' conftest.$ac_ext >&5
11693
11694 ac_cv_type_long_double=no
11695fi
11696
11697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11698fi
11699{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11700echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11701
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011702# The cast to long int works around a bug in the HP C Compiler
11703# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11704# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11705# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011706{ echo "$as_me:$LINENO: checking size of long double" >&5
11707echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011708if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011709 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011710else
11711 if test "$cross_compiling" = yes; then
11712 # Depending upon the size, compute the lo and hi bounds.
11713cat >conftest.$ac_ext <<_ACEOF
11714/* confdefs.h. */
11715_ACEOF
11716cat confdefs.h >>conftest.$ac_ext
11717cat >>conftest.$ac_ext <<_ACEOF
11718/* end confdefs.h. */
11719$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011720 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011721int
11722main ()
11723{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011724static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011725test_array [0] = 0
11726
11727 ;
11728 return 0;
11729}
11730_ACEOF
11731rm -f conftest.$ac_objext
11732if { (ac_try="$ac_compile"
11733case "(($ac_try" in
11734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11735 *) ac_try_echo=$ac_try;;
11736esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011738 (eval "$ac_compile") 2>conftest.er1
11739 ac_status=$?
11740 grep -v '^ *+' conftest.er1 >conftest.err
11741 rm -f conftest.er1
11742 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011744 (exit $ac_status); } && {
11745 test -z "$ac_c_werror_flag" ||
11746 test ! -s conftest.err
11747 } && test -s conftest.$ac_objext; then
11748 ac_lo=0 ac_mid=0
11749 while :; do
11750 cat >conftest.$ac_ext <<_ACEOF
11751/* confdefs.h. */
11752_ACEOF
11753cat confdefs.h >>conftest.$ac_ext
11754cat >>conftest.$ac_ext <<_ACEOF
11755/* end confdefs.h. */
11756$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011757 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011758int
11759main ()
11760{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011761static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011762test_array [0] = 0
11763
11764 ;
11765 return 0;
11766}
11767_ACEOF
11768rm -f conftest.$ac_objext
11769if { (ac_try="$ac_compile"
11770case "(($ac_try" in
11771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11772 *) ac_try_echo=$ac_try;;
11773esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011775 (eval "$ac_compile") 2>conftest.er1
11776 ac_status=$?
11777 grep -v '^ *+' conftest.er1 >conftest.err
11778 rm -f conftest.er1
11779 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011781 (exit $ac_status); } && {
11782 test -z "$ac_c_werror_flag" ||
11783 test ! -s conftest.err
11784 } && test -s conftest.$ac_objext; then
11785 ac_hi=$ac_mid; break
11786else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011787 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011788sed 's/^/| /' conftest.$ac_ext >&5
11789
11790 ac_lo=`expr $ac_mid + 1`
11791 if test $ac_lo -le $ac_mid; then
11792 ac_lo= ac_hi=
11793 break
11794 fi
11795 ac_mid=`expr 2 '*' $ac_mid + 1`
11796fi
11797
11798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11799 done
11800else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011801 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011802sed 's/^/| /' conftest.$ac_ext >&5
11803
11804 cat >conftest.$ac_ext <<_ACEOF
11805/* confdefs.h. */
11806_ACEOF
11807cat confdefs.h >>conftest.$ac_ext
11808cat >>conftest.$ac_ext <<_ACEOF
11809/* end confdefs.h. */
11810$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011811 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812int
11813main ()
11814{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011816test_array [0] = 0
11817
11818 ;
11819 return 0;
11820}
11821_ACEOF
11822rm -f conftest.$ac_objext
11823if { (ac_try="$ac_compile"
11824case "(($ac_try" in
11825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11826 *) ac_try_echo=$ac_try;;
11827esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011829 (eval "$ac_compile") 2>conftest.er1
11830 ac_status=$?
11831 grep -v '^ *+' conftest.er1 >conftest.err
11832 rm -f conftest.er1
11833 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011835 (exit $ac_status); } && {
11836 test -z "$ac_c_werror_flag" ||
11837 test ! -s conftest.err
11838 } && test -s conftest.$ac_objext; then
11839 ac_hi=-1 ac_mid=-1
11840 while :; do
11841 cat >conftest.$ac_ext <<_ACEOF
11842/* confdefs.h. */
11843_ACEOF
11844cat confdefs.h >>conftest.$ac_ext
11845cat >>conftest.$ac_ext <<_ACEOF
11846/* end confdefs.h. */
11847$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011848 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011849int
11850main ()
11851{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011853test_array [0] = 0
11854
11855 ;
11856 return 0;
11857}
11858_ACEOF
11859rm -f conftest.$ac_objext
11860if { (ac_try="$ac_compile"
11861case "(($ac_try" in
11862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11863 *) ac_try_echo=$ac_try;;
11864esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011866 (eval "$ac_compile") 2>conftest.er1
11867 ac_status=$?
11868 grep -v '^ *+' conftest.er1 >conftest.err
11869 rm -f conftest.er1
11870 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011872 (exit $ac_status); } && {
11873 test -z "$ac_c_werror_flag" ||
11874 test ! -s conftest.err
11875 } && test -s conftest.$ac_objext; then
11876 ac_lo=$ac_mid; break
11877else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011878 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011879sed 's/^/| /' conftest.$ac_ext >&5
11880
11881 ac_hi=`expr '(' $ac_mid ')' - 1`
11882 if test $ac_mid -le $ac_hi; then
11883 ac_lo= ac_hi=
11884 break
11885 fi
11886 ac_mid=`expr 2 '*' $ac_mid`
11887fi
11888
11889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11890 done
11891else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011892 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011893sed 's/^/| /' conftest.$ac_ext >&5
11894
11895 ac_lo= ac_hi=
11896fi
11897
11898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11899fi
11900
11901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11902# Binary search between lo and hi bounds.
11903while test "x$ac_lo" != "x$ac_hi"; do
11904 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11905 cat >conftest.$ac_ext <<_ACEOF
11906/* confdefs.h. */
11907_ACEOF
11908cat confdefs.h >>conftest.$ac_ext
11909cat >>conftest.$ac_ext <<_ACEOF
11910/* end confdefs.h. */
11911$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011912 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011913int
11914main ()
11915{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011916static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011917test_array [0] = 0
11918
11919 ;
11920 return 0;
11921}
11922_ACEOF
11923rm -f conftest.$ac_objext
11924if { (ac_try="$ac_compile"
11925case "(($ac_try" in
11926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11927 *) ac_try_echo=$ac_try;;
11928esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011930 (eval "$ac_compile") 2>conftest.er1
11931 ac_status=$?
11932 grep -v '^ *+' conftest.er1 >conftest.err
11933 rm -f conftest.er1
11934 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011936 (exit $ac_status); } && {
11937 test -z "$ac_c_werror_flag" ||
11938 test ! -s conftest.err
11939 } && test -s conftest.$ac_objext; then
11940 ac_hi=$ac_mid
11941else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011942 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011943sed 's/^/| /' conftest.$ac_ext >&5
11944
11945 ac_lo=`expr '(' $ac_mid ')' + 1`
11946fi
11947
11948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11949done
11950case $ac_lo in
11951?*) ac_cv_sizeof_long_double=$ac_lo;;
11952'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011953 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011954See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011955echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011956See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011957 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011958 else
11959 ac_cv_sizeof_long_double=0
11960 fi ;;
11961esac
11962else
11963 cat >conftest.$ac_ext <<_ACEOF
11964/* confdefs.h. */
11965_ACEOF
11966cat confdefs.h >>conftest.$ac_ext
11967cat >>conftest.$ac_ext <<_ACEOF
11968/* end confdefs.h. */
11969$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011970 typedef long double ac__type_sizeof_;
11971static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11972static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011973#include <stdio.h>
11974#include <stdlib.h>
11975int
11976main ()
11977{
11978
11979 FILE *f = fopen ("conftest.val", "w");
11980 if (! f)
11981 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011982 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011983 {
11984 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011985 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011987 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011988 }
11989 else
11990 {
11991 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011992 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011993 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011994 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995 }
11996 return ferror (f) || fclose (f) != 0;
11997
11998 ;
11999 return 0;
12000}
12001_ACEOF
12002rm -f conftest$ac_exeext
12003if { (ac_try="$ac_link"
12004case "(($ac_try" in
12005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12006 *) ac_try_echo=$ac_try;;
12007esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012009 (eval "$ac_link") 2>&5
12010 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012012 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12013 { (case "(($ac_try" in
12014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12015 *) ac_try_echo=$ac_try;;
12016esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012018 (eval "$ac_try") 2>&5
12019 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012021 (exit $ac_status); }; }; then
12022 ac_cv_sizeof_long_double=`cat conftest.val`
12023else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012024 echo "$as_me: program exited with status $ac_status" >&5
12025echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012026sed 's/^/| /' conftest.$ac_ext >&5
12027
12028( exit $ac_status )
12029if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012030 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012031See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012032echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012033See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012034 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012035 else
12036 ac_cv_sizeof_long_double=0
12037 fi
12038fi
12039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12040fi
12041rm -f conftest.val
12042fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012043{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12044echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012045
12046
12047
12048cat >>confdefs.h <<_ACEOF
12049#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12050_ACEOF
12051
12052
12053fi
12054
12055
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012056{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12057echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012058have_c99_bool=no
12059cat >conftest.$ac_ext <<_ACEOF
12060/* confdefs.h. */
12061_ACEOF
12062cat confdefs.h >>conftest.$ac_ext
12063cat >>conftest.$ac_ext <<_ACEOF
12064/* end confdefs.h. */
12065
12066int
12067main ()
12068{
12069_Bool x; x = (_Bool)0;
12070 ;
12071 return 0;
12072}
12073_ACEOF
12074rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012075if { (ac_try="$ac_compile"
12076case "(($ac_try" in
12077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12078 *) ac_try_echo=$ac_try;;
12079esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012081 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012082 ac_status=$?
12083 grep -v '^ *+' conftest.er1 >conftest.err
12084 rm -f conftest.er1
12085 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087 (exit $ac_status); } && {
12088 test -z "$ac_c_werror_flag" ||
12089 test ! -s conftest.err
12090 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012091
12092
12093cat >>confdefs.h <<\_ACEOF
12094#define HAVE_C99_BOOL 1
12095_ACEOF
12096
12097 have_c99_bool=yes
12098
12099else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012100 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012101sed 's/^/| /' conftest.$ac_ext >&5
12102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012103
Thomas Woutersb2137042007-02-01 18:02:27 +000012104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012105
12106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012107{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12108echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012109if test "$have_c99_bool" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012110{ echo "$as_me:$LINENO: checking for _Bool" >&5
12111echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12112if test "${ac_cv_type__Bool+set}" = set; then
12113 echo $ECHO_N "(cached) $ECHO_C" >&6
12114else
12115 cat >conftest.$ac_ext <<_ACEOF
12116/* confdefs.h. */
12117_ACEOF
12118cat confdefs.h >>conftest.$ac_ext
12119cat >>conftest.$ac_ext <<_ACEOF
12120/* end confdefs.h. */
12121$ac_includes_default
12122typedef _Bool ac__type_new_;
12123int
12124main ()
12125{
12126if ((ac__type_new_ *) 0)
12127 return 0;
12128if (sizeof (ac__type_new_))
12129 return 0;
12130 ;
12131 return 0;
12132}
12133_ACEOF
12134rm -f conftest.$ac_objext
12135if { (ac_try="$ac_compile"
12136case "(($ac_try" in
12137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12138 *) ac_try_echo=$ac_try;;
12139esac
12140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12141 (eval "$ac_compile") 2>conftest.er1
12142 ac_status=$?
12143 grep -v '^ *+' conftest.er1 >conftest.err
12144 rm -f conftest.er1
12145 cat conftest.err >&5
12146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12147 (exit $ac_status); } && {
12148 test -z "$ac_c_werror_flag" ||
12149 test ! -s conftest.err
12150 } && test -s conftest.$ac_objext; then
12151 ac_cv_type__Bool=yes
12152else
12153 echo "$as_me: failed program was:" >&5
12154sed 's/^/| /' conftest.$ac_ext >&5
12155
12156 ac_cv_type__Bool=no
12157fi
12158
12159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12160fi
12161{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12162echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012164# The cast to long int works around a bug in the HP C Compiler
12165# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12166# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12167# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012168{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12169echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012170if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012171 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012172else
12173 if test "$cross_compiling" = yes; then
12174 # Depending upon the size, compute the lo and hi bounds.
12175cat >conftest.$ac_ext <<_ACEOF
12176/* confdefs.h. */
12177_ACEOF
12178cat confdefs.h >>conftest.$ac_ext
12179cat >>conftest.$ac_ext <<_ACEOF
12180/* end confdefs.h. */
12181$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012182 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012183int
12184main ()
12185{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012186static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012187test_array [0] = 0
12188
12189 ;
12190 return 0;
12191}
12192_ACEOF
12193rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012194if { (ac_try="$ac_compile"
12195case "(($ac_try" in
12196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12197 *) ac_try_echo=$ac_try;;
12198esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012200 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012201 ac_status=$?
12202 grep -v '^ *+' conftest.er1 >conftest.err
12203 rm -f conftest.er1
12204 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206 (exit $ac_status); } && {
12207 test -z "$ac_c_werror_flag" ||
12208 test ! -s conftest.err
12209 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012210 ac_lo=0 ac_mid=0
12211 while :; do
12212 cat >conftest.$ac_ext <<_ACEOF
12213/* confdefs.h. */
12214_ACEOF
12215cat confdefs.h >>conftest.$ac_ext
12216cat >>conftest.$ac_ext <<_ACEOF
12217/* end confdefs.h. */
12218$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012219 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012220int
12221main ()
12222{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012223static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012224test_array [0] = 0
12225
12226 ;
12227 return 0;
12228}
12229_ACEOF
12230rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231if { (ac_try="$ac_compile"
12232case "(($ac_try" in
12233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12234 *) ac_try_echo=$ac_try;;
12235esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012237 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012238 ac_status=$?
12239 grep -v '^ *+' conftest.er1 >conftest.err
12240 rm -f conftest.er1
12241 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243 (exit $ac_status); } && {
12244 test -z "$ac_c_werror_flag" ||
12245 test ! -s conftest.err
12246 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012247 ac_hi=$ac_mid; break
12248else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012249 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012250sed 's/^/| /' conftest.$ac_ext >&5
12251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252 ac_lo=`expr $ac_mid + 1`
12253 if test $ac_lo -le $ac_mid; then
12254 ac_lo= ac_hi=
12255 break
12256 fi
12257 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259
12260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012261 done
12262else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012263 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012264sed 's/^/| /' conftest.$ac_ext >&5
12265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012266 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012267/* confdefs.h. */
12268_ACEOF
12269cat confdefs.h >>conftest.$ac_ext
12270cat >>conftest.$ac_ext <<_ACEOF
12271/* end confdefs.h. */
12272$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012273 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012274int
12275main ()
12276{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012277static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012278test_array [0] = 0
12279
12280 ;
12281 return 0;
12282}
12283_ACEOF
12284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285if { (ac_try="$ac_compile"
12286case "(($ac_try" in
12287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12288 *) ac_try_echo=$ac_try;;
12289esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012291 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012292 ac_status=$?
12293 grep -v '^ *+' conftest.er1 >conftest.err
12294 rm -f conftest.er1
12295 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012297 (exit $ac_status); } && {
12298 test -z "$ac_c_werror_flag" ||
12299 test ! -s conftest.err
12300 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012301 ac_hi=-1 ac_mid=-1
12302 while :; do
12303 cat >conftest.$ac_ext <<_ACEOF
12304/* confdefs.h. */
12305_ACEOF
12306cat confdefs.h >>conftest.$ac_ext
12307cat >>conftest.$ac_ext <<_ACEOF
12308/* end confdefs.h. */
12309$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012310 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012311int
12312main ()
12313{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012315test_array [0] = 0
12316
12317 ;
12318 return 0;
12319}
12320_ACEOF
12321rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322if { (ac_try="$ac_compile"
12323case "(($ac_try" in
12324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12325 *) ac_try_echo=$ac_try;;
12326esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012328 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012329 ac_status=$?
12330 grep -v '^ *+' conftest.er1 >conftest.err
12331 rm -f conftest.er1
12332 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334 (exit $ac_status); } && {
12335 test -z "$ac_c_werror_flag" ||
12336 test ! -s conftest.err
12337 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012338 ac_lo=$ac_mid; break
12339else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012340 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012341sed 's/^/| /' conftest.$ac_ext >&5
12342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012343 ac_hi=`expr '(' $ac_mid ')' - 1`
12344 if test $ac_mid -le $ac_hi; then
12345 ac_lo= ac_hi=
12346 break
12347 fi
12348 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012350
12351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012352 done
12353else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012354 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012355sed 's/^/| /' conftest.$ac_ext >&5
12356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359
12360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012362
12363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012364# Binary search between lo and hi bounds.
12365while test "x$ac_lo" != "x$ac_hi"; do
12366 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12367 cat >conftest.$ac_ext <<_ACEOF
12368/* confdefs.h. */
12369_ACEOF
12370cat confdefs.h >>conftest.$ac_ext
12371cat >>conftest.$ac_ext <<_ACEOF
12372/* end confdefs.h. */
12373$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012374 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012375int
12376main ()
12377{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012378static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012379test_array [0] = 0
12380
12381 ;
12382 return 0;
12383}
12384_ACEOF
12385rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386if { (ac_try="$ac_compile"
12387case "(($ac_try" in
12388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12389 *) ac_try_echo=$ac_try;;
12390esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012393 ac_status=$?
12394 grep -v '^ *+' conftest.er1 >conftest.err
12395 rm -f conftest.er1
12396 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012398 (exit $ac_status); } && {
12399 test -z "$ac_c_werror_flag" ||
12400 test ! -s conftest.err
12401 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012402 ac_hi=$ac_mid
12403else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012404 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012405sed 's/^/| /' conftest.$ac_ext >&5
12406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409
12410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012411done
12412case $ac_lo in
12413?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012415 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012416See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012417echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012418See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012419 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420 else
12421 ac_cv_sizeof__Bool=0
12422 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012423esac
12424else
12425 cat >conftest.$ac_ext <<_ACEOF
12426/* confdefs.h. */
12427_ACEOF
12428cat confdefs.h >>conftest.$ac_ext
12429cat >>conftest.$ac_ext <<_ACEOF
12430/* end confdefs.h. */
12431$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012432 typedef _Bool ac__type_sizeof_;
12433static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12434static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012435#include <stdio.h>
12436#include <stdlib.h>
12437int
12438main ()
12439{
12440
12441 FILE *f = fopen ("conftest.val", "w");
12442 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012443 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012444 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012445 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012447 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012449 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012450 }
12451 else
12452 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012454 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012456 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012457 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012459
12460 ;
12461 return 0;
12462}
12463_ACEOF
12464rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465if { (ac_try="$ac_link"
12466case "(($ac_try" in
12467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12468 *) ac_try_echo=$ac_try;;
12469esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012472 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012474 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475 { (case "(($ac_try" in
12476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12477 *) ac_try_echo=$ac_try;;
12478esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012481 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012483 (exit $ac_status); }; }; then
12484 ac_cv_sizeof__Bool=`cat conftest.val`
12485else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012486 echo "$as_me: program exited with status $ac_status" >&5
12487echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012488sed 's/^/| /' conftest.$ac_ext >&5
12489
12490( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012491if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012492 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012493See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012494echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012495See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012496 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012497 else
12498 ac_cv_sizeof__Bool=0
12499 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012501rm -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 +000012502fi
12503rm -f conftest.val
12504fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012505{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12506echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507
12508
12509
Thomas Woutersb2137042007-02-01 18:02:27 +000012510cat >>confdefs.h <<_ACEOF
12511#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12512_ACEOF
12513
12514
12515fi
12516
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012517{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12518echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012519if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012520 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012521else
12522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012523/* confdefs.h. */
12524_ACEOF
12525cat confdefs.h >>conftest.$ac_ext
12526cat >>conftest.$ac_ext <<_ACEOF
12527/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012528#ifdef HAVE_STDINT_H
12529 #include <stdint.h>
12530 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012531
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012532typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012533int
12534main ()
12535{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012536if ((ac__type_new_ *) 0)
12537 return 0;
12538if (sizeof (ac__type_new_))
12539 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 ;
12541 return 0;
12542}
12543_ACEOF
12544rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545if { (ac_try="$ac_compile"
12546case "(($ac_try" in
12547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12548 *) ac_try_echo=$ac_try;;
12549esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012553 grep -v '^ *+' conftest.er1 >conftest.err
12554 rm -f conftest.er1
12555 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012557 (exit $ac_status); } && {
12558 test -z "$ac_c_werror_flag" ||
12559 test ! -s conftest.err
12560 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012561 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012562else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012564sed 's/^/| /' conftest.$ac_ext >&5
12565
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012566 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568
12569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012570fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012571{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12572echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12573if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012574
12575cat >>confdefs.h <<_ACEOF
12576#define HAVE_UINTPTR_T 1
12577_ACEOF
12578
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012579{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12580echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12581if test "${ac_cv_type_uintptr_t+set}" = set; then
12582 echo $ECHO_N "(cached) $ECHO_C" >&6
12583else
12584 cat >conftest.$ac_ext <<_ACEOF
12585/* confdefs.h. */
12586_ACEOF
12587cat confdefs.h >>conftest.$ac_ext
12588cat >>conftest.$ac_ext <<_ACEOF
12589/* end confdefs.h. */
12590$ac_includes_default
12591typedef uintptr_t ac__type_new_;
12592int
12593main ()
12594{
12595if ((ac__type_new_ *) 0)
12596 return 0;
12597if (sizeof (ac__type_new_))
12598 return 0;
12599 ;
12600 return 0;
12601}
12602_ACEOF
12603rm -f conftest.$ac_objext
12604if { (ac_try="$ac_compile"
12605case "(($ac_try" in
12606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12607 *) ac_try_echo=$ac_try;;
12608esac
12609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12610 (eval "$ac_compile") 2>conftest.er1
12611 ac_status=$?
12612 grep -v '^ *+' conftest.er1 >conftest.err
12613 rm -f conftest.er1
12614 cat conftest.err >&5
12615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12616 (exit $ac_status); } && {
12617 test -z "$ac_c_werror_flag" ||
12618 test ! -s conftest.err
12619 } && test -s conftest.$ac_objext; then
12620 ac_cv_type_uintptr_t=yes
12621else
12622 echo "$as_me: failed program was:" >&5
12623sed 's/^/| /' conftest.$ac_ext >&5
12624
12625 ac_cv_type_uintptr_t=no
12626fi
12627
12628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12629fi
12630{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12631echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633# The cast to long int works around a bug in the HP C Compiler
12634# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12635# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12636# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012637{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12638echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012639if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012640 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012641else
Martin v. Löwis11437992002-04-12 09:54:03 +000012642 if test "$cross_compiling" = yes; then
12643 # Depending upon the size, compute the lo and hi bounds.
12644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012645/* confdefs.h. */
12646_ACEOF
12647cat confdefs.h >>conftest.$ac_ext
12648cat >>conftest.$ac_ext <<_ACEOF
12649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012650$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012651 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012652int
12653main ()
12654{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012655static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012656test_array [0] = 0
12657
12658 ;
12659 return 0;
12660}
12661_ACEOF
12662rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012663if { (ac_try="$ac_compile"
12664case "(($ac_try" in
12665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12666 *) ac_try_echo=$ac_try;;
12667esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012671 grep -v '^ *+' conftest.er1 >conftest.err
12672 rm -f conftest.er1
12673 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675 (exit $ac_status); } && {
12676 test -z "$ac_c_werror_flag" ||
12677 test ! -s conftest.err
12678 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 ac_lo=0 ac_mid=0
12680 while :; do
12681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* confdefs.h. */
12683_ACEOF
12684cat confdefs.h >>conftest.$ac_ext
12685cat >>conftest.$ac_ext <<_ACEOF
12686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012687$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012688 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012689int
12690main ()
12691{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012692static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012693test_array [0] = 0
12694
12695 ;
12696 return 0;
12697}
12698_ACEOF
12699rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700if { (ac_try="$ac_compile"
12701case "(($ac_try" in
12702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12703 *) ac_try_echo=$ac_try;;
12704esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012706 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012708 grep -v '^ *+' conftest.er1 >conftest.err
12709 rm -f conftest.er1
12710 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712 (exit $ac_status); } && {
12713 test -z "$ac_c_werror_flag" ||
12714 test ! -s conftest.err
12715 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012716 ac_hi=$ac_mid; break
12717else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012719sed 's/^/| /' conftest.$ac_ext >&5
12720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721 ac_lo=`expr $ac_mid + 1`
12722 if test $ac_lo -le $ac_mid; then
12723 ac_lo= ac_hi=
12724 break
12725 fi
12726 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728
12729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 done
12731else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012733sed 's/^/| /' conftest.$ac_ext >&5
12734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012736/* confdefs.h. */
12737_ACEOF
12738cat confdefs.h >>conftest.$ac_ext
12739cat >>conftest.$ac_ext <<_ACEOF
12740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012741$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012742 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012743int
12744main ()
12745{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012746static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012747test_array [0] = 0
12748
12749 ;
12750 return 0;
12751}
12752_ACEOF
12753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012754if { (ac_try="$ac_compile"
12755case "(($ac_try" in
12756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12757 *) ac_try_echo=$ac_try;;
12758esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012762 grep -v '^ *+' conftest.er1 >conftest.err
12763 rm -f conftest.er1
12764 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766 (exit $ac_status); } && {
12767 test -z "$ac_c_werror_flag" ||
12768 test ! -s conftest.err
12769 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 ac_hi=-1 ac_mid=-1
12771 while :; do
12772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012773/* confdefs.h. */
12774_ACEOF
12775cat confdefs.h >>conftest.$ac_ext
12776cat >>conftest.$ac_ext <<_ACEOF
12777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012778$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012779 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012780int
12781main ()
12782{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012783static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012784test_array [0] = 0
12785
12786 ;
12787 return 0;
12788}
12789_ACEOF
12790rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791if { (ac_try="$ac_compile"
12792case "(($ac_try" in
12793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12794 *) ac_try_echo=$ac_try;;
12795esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012799 grep -v '^ *+' conftest.er1 >conftest.err
12800 rm -f conftest.er1
12801 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803 (exit $ac_status); } && {
12804 test -z "$ac_c_werror_flag" ||
12805 test ! -s conftest.err
12806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ac_lo=$ac_mid; break
12808else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012810sed 's/^/| /' conftest.$ac_ext >&5
12811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812 ac_hi=`expr '(' $ac_mid ')' - 1`
12813 if test $ac_mid -le $ac_hi; then
12814 ac_lo= ac_hi=
12815 break
12816 fi
12817 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012819
12820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012821 done
12822else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012824sed 's/^/| /' conftest.$ac_ext >&5
12825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828
12829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831
12832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012833# Binary search between lo and hi bounds.
12834while test "x$ac_lo" != "x$ac_hi"; do
12835 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012837/* confdefs.h. */
12838_ACEOF
12839cat confdefs.h >>conftest.$ac_ext
12840cat >>conftest.$ac_ext <<_ACEOF
12841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012842$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012843 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012844int
12845main ()
12846{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012847static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012848test_array [0] = 0
12849
12850 ;
12851 return 0;
12852}
12853_ACEOF
12854rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855if { (ac_try="$ac_compile"
12856case "(($ac_try" in
12857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12858 *) ac_try_echo=$ac_try;;
12859esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012863 grep -v '^ *+' conftest.er1 >conftest.err
12864 rm -f conftest.er1
12865 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867 (exit $ac_status); } && {
12868 test -z "$ac_c_werror_flag" ||
12869 test ! -s conftest.err
12870 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012871 ac_hi=$ac_mid
12872else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012874sed 's/^/| /' conftest.$ac_ext >&5
12875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878
12879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012880done
12881case $ac_lo in
12882?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012884 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012885See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012886echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012887See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012888 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889 else
12890 ac_cv_sizeof_uintptr_t=0
12891 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012892esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012893else
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012895/* confdefs.h. */
12896_ACEOF
12897cat confdefs.h >>conftest.$ac_ext
12898cat >>conftest.$ac_ext <<_ACEOF
12899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012900$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012901 typedef uintptr_t ac__type_sizeof_;
12902static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12903static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012904#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012905#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012906int
12907main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012908{
Martin v. Löwis11437992002-04-12 09:54:03 +000012909
12910 FILE *f = fopen ("conftest.val", "w");
12911 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012912 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012913 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012916 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012918 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 }
12920 else
12921 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012923 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012925 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
12929 ;
12930 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012931}
Martin v. Löwis11437992002-04-12 09:54:03 +000012932_ACEOF
12933rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934if { (ac_try="$ac_link"
12935case "(($ac_try" in
12936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12937 *) ac_try_echo=$ac_try;;
12938esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944 { (case "(($ac_try" in
12945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12946 *) ac_try_echo=$ac_try;;
12947esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 (exit $ac_status); }; }; then
12953 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012954else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012955 echo "$as_me: program exited with status $ac_status" >&5
12956echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012957sed 's/^/| /' conftest.$ac_ext >&5
12958
Martin v. Löwis11437992002-04-12 09:54:03 +000012959( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012961 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012962See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012963echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012964See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012965 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966 else
12967 ac_cv_sizeof_uintptr_t=0
12968 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970rm -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 +000012971fi
12972rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012973fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012974{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12975echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976
12977
12978
Martin v. Löwis11437992002-04-12 09:54:03 +000012979cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012980#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012981_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012982
Michael W. Hudson54241132001-12-07 15:38:26 +000012983
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012984fi
12985
Thomas Wouters89f507f2006-12-13 04:49:30 +000012986
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012987{ echo "$as_me:$LINENO: checking for off_t" >&5
12988echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12989if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012991else
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012993/* confdefs.h. */
12994_ACEOF
12995cat confdefs.h >>conftest.$ac_ext
12996cat >>conftest.$ac_ext <<_ACEOF
12997/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012998
12999#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013000#include <sys/types.h>
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013001#endif
13002
13003
13004typedef off_t ac__type_new_;
13005int
13006main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013007{
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013008if ((ac__type_new_ *) 0)
13009 return 0;
13010if (sizeof (ac__type_new_))
13011 return 0;
13012 ;
13013 return 0;
13014}
13015_ACEOF
13016rm -f conftest.$ac_objext
13017if { (ac_try="$ac_compile"
13018case "(($ac_try" in
13019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13020 *) ac_try_echo=$ac_try;;
13021esac
13022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13023 (eval "$ac_compile") 2>conftest.er1
13024 ac_status=$?
13025 grep -v '^ *+' conftest.er1 >conftest.err
13026 rm -f conftest.er1
13027 cat conftest.err >&5
13028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13029 (exit $ac_status); } && {
13030 test -z "$ac_c_werror_flag" ||
13031 test ! -s conftest.err
13032 } && test -s conftest.$ac_objext; then
13033 ac_cv_type_off_t=yes
13034else
13035 echo "$as_me: failed program was:" >&5
13036sed 's/^/| /' conftest.$ac_ext >&5
13037
13038 ac_cv_type_off_t=no
13039fi
13040
13041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13042fi
13043{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13044echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13045
13046# The cast to long int works around a bug in the HP C Compiler
13047# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13048# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13049# This bug is HP SR number 8606223364.
13050{ echo "$as_me:$LINENO: checking size of off_t" >&5
13051echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13052if test "${ac_cv_sizeof_off_t+set}" = set; then
13053 echo $ECHO_N "(cached) $ECHO_C" >&6
13054else
13055 if test "$cross_compiling" = yes; then
13056 # Depending upon the size, compute the lo and hi bounds.
13057cat >conftest.$ac_ext <<_ACEOF
13058/* confdefs.h. */
13059_ACEOF
13060cat confdefs.h >>conftest.$ac_ext
13061cat >>conftest.$ac_ext <<_ACEOF
13062/* end confdefs.h. */
13063
13064#ifdef HAVE_SYS_TYPES_H
13065#include <sys/types.h>
13066#endif
13067
13068
13069 typedef off_t ac__type_sizeof_;
13070int
13071main ()
13072{
13073static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13074test_array [0] = 0
13075
13076 ;
13077 return 0;
13078}
13079_ACEOF
13080rm -f conftest.$ac_objext
13081if { (ac_try="$ac_compile"
13082case "(($ac_try" in
13083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13084 *) ac_try_echo=$ac_try;;
13085esac
13086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13087 (eval "$ac_compile") 2>conftest.er1
13088 ac_status=$?
13089 grep -v '^ *+' conftest.er1 >conftest.err
13090 rm -f conftest.er1
13091 cat conftest.err >&5
13092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13093 (exit $ac_status); } && {
13094 test -z "$ac_c_werror_flag" ||
13095 test ! -s conftest.err
13096 } && test -s conftest.$ac_objext; then
13097 ac_lo=0 ac_mid=0
13098 while :; do
13099 cat >conftest.$ac_ext <<_ACEOF
13100/* confdefs.h. */
13101_ACEOF
13102cat confdefs.h >>conftest.$ac_ext
13103cat >>conftest.$ac_ext <<_ACEOF
13104/* end confdefs.h. */
13105
13106#ifdef HAVE_SYS_TYPES_H
13107#include <sys/types.h>
13108#endif
13109
13110
13111 typedef off_t ac__type_sizeof_;
13112int
13113main ()
13114{
13115static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13116test_array [0] = 0
13117
13118 ;
13119 return 0;
13120}
13121_ACEOF
13122rm -f conftest.$ac_objext
13123if { (ac_try="$ac_compile"
13124case "(($ac_try" in
13125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13126 *) ac_try_echo=$ac_try;;
13127esac
13128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13129 (eval "$ac_compile") 2>conftest.er1
13130 ac_status=$?
13131 grep -v '^ *+' conftest.er1 >conftest.err
13132 rm -f conftest.er1
13133 cat conftest.err >&5
13134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13135 (exit $ac_status); } && {
13136 test -z "$ac_c_werror_flag" ||
13137 test ! -s conftest.err
13138 } && test -s conftest.$ac_objext; then
13139 ac_hi=$ac_mid; break
13140else
13141 echo "$as_me: failed program was:" >&5
13142sed 's/^/| /' conftest.$ac_ext >&5
13143
13144 ac_lo=`expr $ac_mid + 1`
13145 if test $ac_lo -le $ac_mid; then
13146 ac_lo= ac_hi=
13147 break
13148 fi
13149 ac_mid=`expr 2 '*' $ac_mid + 1`
13150fi
13151
13152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13153 done
13154else
13155 echo "$as_me: failed program was:" >&5
13156sed 's/^/| /' conftest.$ac_ext >&5
13157
13158 cat >conftest.$ac_ext <<_ACEOF
13159/* confdefs.h. */
13160_ACEOF
13161cat confdefs.h >>conftest.$ac_ext
13162cat >>conftest.$ac_ext <<_ACEOF
13163/* end confdefs.h. */
13164
13165#ifdef HAVE_SYS_TYPES_H
13166#include <sys/types.h>
13167#endif
13168
13169
13170 typedef off_t ac__type_sizeof_;
13171int
13172main ()
13173{
13174static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13175test_array [0] = 0
13176
13177 ;
13178 return 0;
13179}
13180_ACEOF
13181rm -f conftest.$ac_objext
13182if { (ac_try="$ac_compile"
13183case "(($ac_try" in
13184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13185 *) ac_try_echo=$ac_try;;
13186esac
13187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13188 (eval "$ac_compile") 2>conftest.er1
13189 ac_status=$?
13190 grep -v '^ *+' conftest.er1 >conftest.err
13191 rm -f conftest.er1
13192 cat conftest.err >&5
13193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13194 (exit $ac_status); } && {
13195 test -z "$ac_c_werror_flag" ||
13196 test ! -s conftest.err
13197 } && test -s conftest.$ac_objext; then
13198 ac_hi=-1 ac_mid=-1
13199 while :; do
13200 cat >conftest.$ac_ext <<_ACEOF
13201/* confdefs.h. */
13202_ACEOF
13203cat confdefs.h >>conftest.$ac_ext
13204cat >>conftest.$ac_ext <<_ACEOF
13205/* end confdefs.h. */
13206
13207#ifdef HAVE_SYS_TYPES_H
13208#include <sys/types.h>
13209#endif
13210
13211
13212 typedef off_t ac__type_sizeof_;
13213int
13214main ()
13215{
13216static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13217test_array [0] = 0
13218
13219 ;
13220 return 0;
13221}
13222_ACEOF
13223rm -f conftest.$ac_objext
13224if { (ac_try="$ac_compile"
13225case "(($ac_try" in
13226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13227 *) ac_try_echo=$ac_try;;
13228esac
13229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13230 (eval "$ac_compile") 2>conftest.er1
13231 ac_status=$?
13232 grep -v '^ *+' conftest.er1 >conftest.err
13233 rm -f conftest.er1
13234 cat conftest.err >&5
13235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13236 (exit $ac_status); } && {
13237 test -z "$ac_c_werror_flag" ||
13238 test ! -s conftest.err
13239 } && test -s conftest.$ac_objext; then
13240 ac_lo=$ac_mid; break
13241else
13242 echo "$as_me: failed program was:" >&5
13243sed 's/^/| /' conftest.$ac_ext >&5
13244
13245 ac_hi=`expr '(' $ac_mid ')' - 1`
13246 if test $ac_mid -le $ac_hi; then
13247 ac_lo= ac_hi=
13248 break
13249 fi
13250 ac_mid=`expr 2 '*' $ac_mid`
13251fi
13252
13253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13254 done
13255else
13256 echo "$as_me: failed program was:" >&5
13257sed 's/^/| /' conftest.$ac_ext >&5
13258
13259 ac_lo= ac_hi=
13260fi
13261
13262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13263fi
13264
13265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13266# Binary search between lo and hi bounds.
13267while test "x$ac_lo" != "x$ac_hi"; do
13268 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13269 cat >conftest.$ac_ext <<_ACEOF
13270/* confdefs.h. */
13271_ACEOF
13272cat confdefs.h >>conftest.$ac_ext
13273cat >>conftest.$ac_ext <<_ACEOF
13274/* end confdefs.h. */
13275
13276#ifdef HAVE_SYS_TYPES_H
13277#include <sys/types.h>
13278#endif
13279
13280
13281 typedef off_t ac__type_sizeof_;
13282int
13283main ()
13284{
13285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13286test_array [0] = 0
13287
13288 ;
13289 return 0;
13290}
13291_ACEOF
13292rm -f conftest.$ac_objext
13293if { (ac_try="$ac_compile"
13294case "(($ac_try" in
13295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13296 *) ac_try_echo=$ac_try;;
13297esac
13298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13299 (eval "$ac_compile") 2>conftest.er1
13300 ac_status=$?
13301 grep -v '^ *+' conftest.er1 >conftest.err
13302 rm -f conftest.er1
13303 cat conftest.err >&5
13304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13305 (exit $ac_status); } && {
13306 test -z "$ac_c_werror_flag" ||
13307 test ! -s conftest.err
13308 } && test -s conftest.$ac_objext; then
13309 ac_hi=$ac_mid
13310else
13311 echo "$as_me: failed program was:" >&5
13312sed 's/^/| /' conftest.$ac_ext >&5
13313
13314 ac_lo=`expr '(' $ac_mid ')' + 1`
13315fi
13316
13317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13318done
13319case $ac_lo in
13320?*) ac_cv_sizeof_off_t=$ac_lo;;
13321'') if test "$ac_cv_type_off_t" = yes; then
13322 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13323See \`config.log' for more details." >&5
13324echo "$as_me: error: cannot compute sizeof (off_t)
13325See \`config.log' for more details." >&2;}
13326 { (exit 77); exit 77; }; }
13327 else
13328 ac_cv_sizeof_off_t=0
13329 fi ;;
13330esac
13331else
13332 cat >conftest.$ac_ext <<_ACEOF
13333/* confdefs.h. */
13334_ACEOF
13335cat confdefs.h >>conftest.$ac_ext
13336cat >>conftest.$ac_ext <<_ACEOF
13337/* end confdefs.h. */
13338
13339#ifdef HAVE_SYS_TYPES_H
13340#include <sys/types.h>
13341#endif
13342
13343
13344 typedef off_t ac__type_sizeof_;
13345static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13346static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13347#include <stdio.h>
13348#include <stdlib.h>
13349int
13350main ()
13351{
13352
13353 FILE *f = fopen ("conftest.val", "w");
13354 if (! f)
13355 return 1;
13356 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13357 {
13358 long int i = longval ();
13359 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13360 return 1;
13361 fprintf (f, "%ld\n", i);
13362 }
13363 else
13364 {
13365 unsigned long int i = ulongval ();
13366 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13367 return 1;
13368 fprintf (f, "%lu\n", i);
13369 }
13370 return ferror (f) || fclose (f) != 0;
13371
13372 ;
13373 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013374}
Martin v. Löwis11437992002-04-12 09:54:03 +000013375_ACEOF
13376rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377if { (ac_try="$ac_link"
13378case "(($ac_try" in
13379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13380 *) ac_try_echo=$ac_try;;
13381esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013384 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387 { (case "(($ac_try" in
13388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13389 *) ac_try_echo=$ac_try;;
13390esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013392 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013395 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013396 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013397else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013398 echo "$as_me: program exited with status $ac_status" >&5
13399echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013400sed 's/^/| /' conftest.$ac_ext >&5
13401
Martin v. Löwis11437992002-04-12 09:54:03 +000013402( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013403if test "$ac_cv_type_off_t" = yes; then
13404 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13405See \`config.log' for more details." >&5
13406echo "$as_me: error: cannot compute sizeof (off_t)
13407See \`config.log' for more details." >&2;}
13408 { (exit 77); exit 77; }; }
13409 else
13410 ac_cv_sizeof_off_t=0
13411 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413rm -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 +000013414fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013415rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013416fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013417{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13418echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013420
13421
Martin v. Löwis11437992002-04-12 09:54:03 +000013422cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013423#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013424_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013425
Michael W. Hudson54241132001-12-07 15:38:26 +000013426
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013427
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013428{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13429echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013430if test "$have_long_long" = yes -a \
13431 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13432 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013433
Martin v. Löwis11437992002-04-12 09:54:03 +000013434cat >>confdefs.h <<\_ACEOF
13435#define HAVE_LARGEFILE_SUPPORT 1
13436_ACEOF
13437
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013438 { echo "$as_me:$LINENO: result: yes" >&5
13439echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013440else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013441 { echo "$as_me:$LINENO: result: no" >&5
13442echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013443fi
13444
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013445{ echo "$as_me:$LINENO: checking for time_t" >&5
13446echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13447if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013449else
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013451/* confdefs.h. */
13452_ACEOF
13453cat confdefs.h >>conftest.$ac_ext
13454cat >>conftest.$ac_ext <<_ACEOF
13455/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013456
13457#ifdef HAVE_SYS_TYPES_H
13458#include <sys/types.h>
13459#endif
13460#ifdef HAVE_TIME_H
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013461#include <time.h>
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013462#endif
13463
13464
13465typedef time_t ac__type_new_;
13466int
13467main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013468{
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013469if ((ac__type_new_ *) 0)
13470 return 0;
13471if (sizeof (ac__type_new_))
13472 return 0;
13473 ;
13474 return 0;
13475}
13476_ACEOF
13477rm -f conftest.$ac_objext
13478if { (ac_try="$ac_compile"
13479case "(($ac_try" in
13480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13481 *) ac_try_echo=$ac_try;;
13482esac
13483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13484 (eval "$ac_compile") 2>conftest.er1
13485 ac_status=$?
13486 grep -v '^ *+' conftest.er1 >conftest.err
13487 rm -f conftest.er1
13488 cat conftest.err >&5
13489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13490 (exit $ac_status); } && {
13491 test -z "$ac_c_werror_flag" ||
13492 test ! -s conftest.err
13493 } && test -s conftest.$ac_objext; then
13494 ac_cv_type_time_t=yes
13495else
13496 echo "$as_me: failed program was:" >&5
13497sed 's/^/| /' conftest.$ac_ext >&5
13498
13499 ac_cv_type_time_t=no
13500fi
13501
13502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13503fi
13504{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13505echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13506
13507# The cast to long int works around a bug in the HP C Compiler
13508# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13509# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13510# This bug is HP SR number 8606223364.
13511{ echo "$as_me:$LINENO: checking size of time_t" >&5
13512echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13513if test "${ac_cv_sizeof_time_t+set}" = set; then
13514 echo $ECHO_N "(cached) $ECHO_C" >&6
13515else
13516 if test "$cross_compiling" = yes; then
13517 # Depending upon the size, compute the lo and hi bounds.
13518cat >conftest.$ac_ext <<_ACEOF
13519/* confdefs.h. */
13520_ACEOF
13521cat confdefs.h >>conftest.$ac_ext
13522cat >>conftest.$ac_ext <<_ACEOF
13523/* end confdefs.h. */
13524
13525#ifdef HAVE_SYS_TYPES_H
13526#include <sys/types.h>
13527#endif
13528#ifdef HAVE_TIME_H
13529#include <time.h>
13530#endif
13531
13532
13533 typedef time_t ac__type_sizeof_;
13534int
13535main ()
13536{
13537static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13538test_array [0] = 0
13539
13540 ;
13541 return 0;
13542}
13543_ACEOF
13544rm -f conftest.$ac_objext
13545if { (ac_try="$ac_compile"
13546case "(($ac_try" in
13547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13548 *) ac_try_echo=$ac_try;;
13549esac
13550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13551 (eval "$ac_compile") 2>conftest.er1
13552 ac_status=$?
13553 grep -v '^ *+' conftest.er1 >conftest.err
13554 rm -f conftest.er1
13555 cat conftest.err >&5
13556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13557 (exit $ac_status); } && {
13558 test -z "$ac_c_werror_flag" ||
13559 test ! -s conftest.err
13560 } && test -s conftest.$ac_objext; then
13561 ac_lo=0 ac_mid=0
13562 while :; do
13563 cat >conftest.$ac_ext <<_ACEOF
13564/* confdefs.h. */
13565_ACEOF
13566cat confdefs.h >>conftest.$ac_ext
13567cat >>conftest.$ac_ext <<_ACEOF
13568/* end confdefs.h. */
13569
13570#ifdef HAVE_SYS_TYPES_H
13571#include <sys/types.h>
13572#endif
13573#ifdef HAVE_TIME_H
13574#include <time.h>
13575#endif
13576
13577
13578 typedef time_t ac__type_sizeof_;
13579int
13580main ()
13581{
13582static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13583test_array [0] = 0
13584
13585 ;
13586 return 0;
13587}
13588_ACEOF
13589rm -f conftest.$ac_objext
13590if { (ac_try="$ac_compile"
13591case "(($ac_try" in
13592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13593 *) ac_try_echo=$ac_try;;
13594esac
13595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13596 (eval "$ac_compile") 2>conftest.er1
13597 ac_status=$?
13598 grep -v '^ *+' conftest.er1 >conftest.err
13599 rm -f conftest.er1
13600 cat conftest.err >&5
13601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13602 (exit $ac_status); } && {
13603 test -z "$ac_c_werror_flag" ||
13604 test ! -s conftest.err
13605 } && test -s conftest.$ac_objext; then
13606 ac_hi=$ac_mid; break
13607else
13608 echo "$as_me: failed program was:" >&5
13609sed 's/^/| /' conftest.$ac_ext >&5
13610
13611 ac_lo=`expr $ac_mid + 1`
13612 if test $ac_lo -le $ac_mid; then
13613 ac_lo= ac_hi=
13614 break
13615 fi
13616 ac_mid=`expr 2 '*' $ac_mid + 1`
13617fi
13618
13619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13620 done
13621else
13622 echo "$as_me: failed program was:" >&5
13623sed 's/^/| /' conftest.$ac_ext >&5
13624
13625 cat >conftest.$ac_ext <<_ACEOF
13626/* confdefs.h. */
13627_ACEOF
13628cat confdefs.h >>conftest.$ac_ext
13629cat >>conftest.$ac_ext <<_ACEOF
13630/* end confdefs.h. */
13631
13632#ifdef HAVE_SYS_TYPES_H
13633#include <sys/types.h>
13634#endif
13635#ifdef HAVE_TIME_H
13636#include <time.h>
13637#endif
13638
13639
13640 typedef time_t ac__type_sizeof_;
13641int
13642main ()
13643{
13644static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13645test_array [0] = 0
13646
13647 ;
13648 return 0;
13649}
13650_ACEOF
13651rm -f conftest.$ac_objext
13652if { (ac_try="$ac_compile"
13653case "(($ac_try" in
13654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13655 *) ac_try_echo=$ac_try;;
13656esac
13657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13658 (eval "$ac_compile") 2>conftest.er1
13659 ac_status=$?
13660 grep -v '^ *+' conftest.er1 >conftest.err
13661 rm -f conftest.er1
13662 cat conftest.err >&5
13663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13664 (exit $ac_status); } && {
13665 test -z "$ac_c_werror_flag" ||
13666 test ! -s conftest.err
13667 } && test -s conftest.$ac_objext; then
13668 ac_hi=-1 ac_mid=-1
13669 while :; do
13670 cat >conftest.$ac_ext <<_ACEOF
13671/* confdefs.h. */
13672_ACEOF
13673cat confdefs.h >>conftest.$ac_ext
13674cat >>conftest.$ac_ext <<_ACEOF
13675/* end confdefs.h. */
13676
13677#ifdef HAVE_SYS_TYPES_H
13678#include <sys/types.h>
13679#endif
13680#ifdef HAVE_TIME_H
13681#include <time.h>
13682#endif
13683
13684
13685 typedef time_t ac__type_sizeof_;
13686int
13687main ()
13688{
13689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13690test_array [0] = 0
13691
13692 ;
13693 return 0;
13694}
13695_ACEOF
13696rm -f conftest.$ac_objext
13697if { (ac_try="$ac_compile"
13698case "(($ac_try" in
13699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13700 *) ac_try_echo=$ac_try;;
13701esac
13702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13703 (eval "$ac_compile") 2>conftest.er1
13704 ac_status=$?
13705 grep -v '^ *+' conftest.er1 >conftest.err
13706 rm -f conftest.er1
13707 cat conftest.err >&5
13708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13709 (exit $ac_status); } && {
13710 test -z "$ac_c_werror_flag" ||
13711 test ! -s conftest.err
13712 } && test -s conftest.$ac_objext; then
13713 ac_lo=$ac_mid; break
13714else
13715 echo "$as_me: failed program was:" >&5
13716sed 's/^/| /' conftest.$ac_ext >&5
13717
13718 ac_hi=`expr '(' $ac_mid ')' - 1`
13719 if test $ac_mid -le $ac_hi; then
13720 ac_lo= ac_hi=
13721 break
13722 fi
13723 ac_mid=`expr 2 '*' $ac_mid`
13724fi
13725
13726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13727 done
13728else
13729 echo "$as_me: failed program was:" >&5
13730sed 's/^/| /' conftest.$ac_ext >&5
13731
13732 ac_lo= ac_hi=
13733fi
13734
13735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13736fi
13737
13738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13739# Binary search between lo and hi bounds.
13740while test "x$ac_lo" != "x$ac_hi"; do
13741 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13742 cat >conftest.$ac_ext <<_ACEOF
13743/* confdefs.h. */
13744_ACEOF
13745cat confdefs.h >>conftest.$ac_ext
13746cat >>conftest.$ac_ext <<_ACEOF
13747/* end confdefs.h. */
13748
13749#ifdef HAVE_SYS_TYPES_H
13750#include <sys/types.h>
13751#endif
13752#ifdef HAVE_TIME_H
13753#include <time.h>
13754#endif
13755
13756
13757 typedef time_t ac__type_sizeof_;
13758int
13759main ()
13760{
13761static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13762test_array [0] = 0
13763
13764 ;
13765 return 0;
13766}
13767_ACEOF
13768rm -f conftest.$ac_objext
13769if { (ac_try="$ac_compile"
13770case "(($ac_try" in
13771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13772 *) ac_try_echo=$ac_try;;
13773esac
13774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13775 (eval "$ac_compile") 2>conftest.er1
13776 ac_status=$?
13777 grep -v '^ *+' conftest.er1 >conftest.err
13778 rm -f conftest.er1
13779 cat conftest.err >&5
13780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13781 (exit $ac_status); } && {
13782 test -z "$ac_c_werror_flag" ||
13783 test ! -s conftest.err
13784 } && test -s conftest.$ac_objext; then
13785 ac_hi=$ac_mid
13786else
13787 echo "$as_me: failed program was:" >&5
13788sed 's/^/| /' conftest.$ac_ext >&5
13789
13790 ac_lo=`expr '(' $ac_mid ')' + 1`
13791fi
13792
13793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13794done
13795case $ac_lo in
13796?*) ac_cv_sizeof_time_t=$ac_lo;;
13797'') if test "$ac_cv_type_time_t" = yes; then
13798 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13799See \`config.log' for more details." >&5
13800echo "$as_me: error: cannot compute sizeof (time_t)
13801See \`config.log' for more details." >&2;}
13802 { (exit 77); exit 77; }; }
13803 else
13804 ac_cv_sizeof_time_t=0
13805 fi ;;
13806esac
13807else
13808 cat >conftest.$ac_ext <<_ACEOF
13809/* confdefs.h. */
13810_ACEOF
13811cat confdefs.h >>conftest.$ac_ext
13812cat >>conftest.$ac_ext <<_ACEOF
13813/* end confdefs.h. */
13814
13815#ifdef HAVE_SYS_TYPES_H
13816#include <sys/types.h>
13817#endif
13818#ifdef HAVE_TIME_H
13819#include <time.h>
13820#endif
13821
13822
13823 typedef time_t ac__type_sizeof_;
13824static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13825static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13826#include <stdio.h>
13827#include <stdlib.h>
13828int
13829main ()
13830{
13831
13832 FILE *f = fopen ("conftest.val", "w");
13833 if (! f)
13834 return 1;
13835 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13836 {
13837 long int i = longval ();
13838 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13839 return 1;
13840 fprintf (f, "%ld\n", i);
13841 }
13842 else
13843 {
13844 unsigned long int i = ulongval ();
13845 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13846 return 1;
13847 fprintf (f, "%lu\n", i);
13848 }
13849 return ferror (f) || fclose (f) != 0;
13850
13851 ;
13852 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013853}
Martin v. Löwis11437992002-04-12 09:54:03 +000013854_ACEOF
13855rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856if { (ac_try="$ac_link"
13857case "(($ac_try" in
13858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13859 *) ac_try_echo=$ac_try;;
13860esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013865 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013866 { (case "(($ac_try" in
13867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13868 *) ac_try_echo=$ac_try;;
13869esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013872 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013874 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013875 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013876else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013877 echo "$as_me: program exited with status $ac_status" >&5
13878echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013879sed 's/^/| /' conftest.$ac_ext >&5
13880
Martin v. Löwis11437992002-04-12 09:54:03 +000013881( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013882if test "$ac_cv_type_time_t" = yes; then
13883 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13884See \`config.log' for more details." >&5
13885echo "$as_me: error: cannot compute sizeof (time_t)
13886See \`config.log' for more details." >&2;}
13887 { (exit 77); exit 77; }; }
13888 else
13889 ac_cv_sizeof_time_t=0
13890 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892rm -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 +000013893fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013894rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013895fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013896{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13897echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013898
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013899
13900
Martin v. Löwis11437992002-04-12 09:54:03 +000013901cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013902#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013903_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013904
Michael W. Hudson54241132001-12-07 15:38:26 +000013905
13906
Trent Mick635f6fb2000-08-23 21:33:05 +000013907# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013908ac_save_cc="$CC"
13909if test "$ac_cv_kpthread" = "yes"
13910then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013911elif test "$ac_cv_kthread" = "yes"
13912then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013913elif test "$ac_cv_pthread" = "yes"
13914then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013915fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013916
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013917{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13918echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013919have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013920cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013921/* confdefs.h. */
13922_ACEOF
13923cat confdefs.h >>conftest.$ac_ext
13924cat >>conftest.$ac_ext <<_ACEOF
13925/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013926#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013927int
13928main ()
13929{
Guido van Rossum12580492000-09-24 16:47:19 +000013930pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ;
13932 return 0;
13933}
13934_ACEOF
13935rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936if { (ac_try="$ac_compile"
13937case "(($ac_try" in
13938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13939 *) ac_try_echo=$ac_try;;
13940esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013944 grep -v '^ *+' conftest.er1 >conftest.err
13945 rm -f conftest.er1
13946 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948 (exit $ac_status); } && {
13949 test -z "$ac_c_werror_flag" ||
13950 test ! -s conftest.err
13951 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013952 have_pthread_t=yes
13953else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013955sed 's/^/| /' conftest.$ac_ext >&5
13956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957
Trent Mick635f6fb2000-08-23 21:33:05 +000013958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013959
13960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013961{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13962echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013963if test "$have_pthread_t" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013964 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13965echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13966if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013967 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013968else
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013970/* confdefs.h. */
13971_ACEOF
13972cat confdefs.h >>conftest.$ac_ext
13973cat >>conftest.$ac_ext <<_ACEOF
13974/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013975
13976#ifdef HAVE_PTHREAD_H
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013977#include <pthread.h>
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013978#endif
13979
13980
13981typedef pthread_t ac__type_new_;
13982int
13983main ()
13984{
13985if ((ac__type_new_ *) 0)
13986 return 0;
13987if (sizeof (ac__type_new_))
13988 return 0;
13989 ;
13990 return 0;
13991}
13992_ACEOF
13993rm -f conftest.$ac_objext
13994if { (ac_try="$ac_compile"
13995case "(($ac_try" in
13996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13997 *) ac_try_echo=$ac_try;;
13998esac
13999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14000 (eval "$ac_compile") 2>conftest.er1
14001 ac_status=$?
14002 grep -v '^ *+' conftest.er1 >conftest.err
14003 rm -f conftest.er1
14004 cat conftest.err >&5
14005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14006 (exit $ac_status); } && {
14007 test -z "$ac_c_werror_flag" ||
14008 test ! -s conftest.err
14009 } && test -s conftest.$ac_objext; then
14010 ac_cv_type_pthread_t=yes
14011else
14012 echo "$as_me: failed program was:" >&5
14013sed 's/^/| /' conftest.$ac_ext >&5
14014
14015 ac_cv_type_pthread_t=no
14016fi
14017
14018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14019fi
14020{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14021echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14022
14023# The cast to long int works around a bug in the HP C Compiler
14024# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14025# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14026# This bug is HP SR number 8606223364.
14027{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14028echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14029if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14030 echo $ECHO_N "(cached) $ECHO_C" >&6
14031else
14032 if test "$cross_compiling" = yes; then
14033 # Depending upon the size, compute the lo and hi bounds.
14034cat >conftest.$ac_ext <<_ACEOF
14035/* confdefs.h. */
14036_ACEOF
14037cat confdefs.h >>conftest.$ac_ext
14038cat >>conftest.$ac_ext <<_ACEOF
14039/* end confdefs.h. */
14040
14041#ifdef HAVE_PTHREAD_H
14042#include <pthread.h>
14043#endif
14044
14045
14046 typedef pthread_t ac__type_sizeof_;
14047int
14048main ()
14049{
14050static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14051test_array [0] = 0
14052
14053 ;
14054 return 0;
14055}
14056_ACEOF
14057rm -f conftest.$ac_objext
14058if { (ac_try="$ac_compile"
14059case "(($ac_try" in
14060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14061 *) ac_try_echo=$ac_try;;
14062esac
14063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14064 (eval "$ac_compile") 2>conftest.er1
14065 ac_status=$?
14066 grep -v '^ *+' conftest.er1 >conftest.err
14067 rm -f conftest.er1
14068 cat conftest.err >&5
14069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14070 (exit $ac_status); } && {
14071 test -z "$ac_c_werror_flag" ||
14072 test ! -s conftest.err
14073 } && test -s conftest.$ac_objext; then
14074 ac_lo=0 ac_mid=0
14075 while :; do
14076 cat >conftest.$ac_ext <<_ACEOF
14077/* confdefs.h. */
14078_ACEOF
14079cat confdefs.h >>conftest.$ac_ext
14080cat >>conftest.$ac_ext <<_ACEOF
14081/* end confdefs.h. */
14082
14083#ifdef HAVE_PTHREAD_H
14084#include <pthread.h>
14085#endif
14086
14087
14088 typedef pthread_t ac__type_sizeof_;
14089int
14090main ()
14091{
14092static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14093test_array [0] = 0
14094
14095 ;
14096 return 0;
14097}
14098_ACEOF
14099rm -f conftest.$ac_objext
14100if { (ac_try="$ac_compile"
14101case "(($ac_try" in
14102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14103 *) ac_try_echo=$ac_try;;
14104esac
14105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14106 (eval "$ac_compile") 2>conftest.er1
14107 ac_status=$?
14108 grep -v '^ *+' conftest.er1 >conftest.err
14109 rm -f conftest.er1
14110 cat conftest.err >&5
14111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14112 (exit $ac_status); } && {
14113 test -z "$ac_c_werror_flag" ||
14114 test ! -s conftest.err
14115 } && test -s conftest.$ac_objext; then
14116 ac_hi=$ac_mid; break
14117else
14118 echo "$as_me: failed program was:" >&5
14119sed 's/^/| /' conftest.$ac_ext >&5
14120
14121 ac_lo=`expr $ac_mid + 1`
14122 if test $ac_lo -le $ac_mid; then
14123 ac_lo= ac_hi=
14124 break
14125 fi
14126 ac_mid=`expr 2 '*' $ac_mid + 1`
14127fi
14128
14129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14130 done
14131else
14132 echo "$as_me: failed program was:" >&5
14133sed 's/^/| /' conftest.$ac_ext >&5
14134
14135 cat >conftest.$ac_ext <<_ACEOF
14136/* confdefs.h. */
14137_ACEOF
14138cat confdefs.h >>conftest.$ac_ext
14139cat >>conftest.$ac_ext <<_ACEOF
14140/* end confdefs.h. */
14141
14142#ifdef HAVE_PTHREAD_H
14143#include <pthread.h>
14144#endif
14145
14146
14147 typedef pthread_t ac__type_sizeof_;
14148int
14149main ()
14150{
14151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14152test_array [0] = 0
14153
14154 ;
14155 return 0;
14156}
14157_ACEOF
14158rm -f conftest.$ac_objext
14159if { (ac_try="$ac_compile"
14160case "(($ac_try" in
14161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14162 *) ac_try_echo=$ac_try;;
14163esac
14164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14165 (eval "$ac_compile") 2>conftest.er1
14166 ac_status=$?
14167 grep -v '^ *+' conftest.er1 >conftest.err
14168 rm -f conftest.er1
14169 cat conftest.err >&5
14170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14171 (exit $ac_status); } && {
14172 test -z "$ac_c_werror_flag" ||
14173 test ! -s conftest.err
14174 } && test -s conftest.$ac_objext; then
14175 ac_hi=-1 ac_mid=-1
14176 while :; do
14177 cat >conftest.$ac_ext <<_ACEOF
14178/* confdefs.h. */
14179_ACEOF
14180cat confdefs.h >>conftest.$ac_ext
14181cat >>conftest.$ac_ext <<_ACEOF
14182/* end confdefs.h. */
14183
14184#ifdef HAVE_PTHREAD_H
14185#include <pthread.h>
14186#endif
14187
14188
14189 typedef pthread_t ac__type_sizeof_;
14190int
14191main ()
14192{
14193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14194test_array [0] = 0
14195
14196 ;
14197 return 0;
14198}
14199_ACEOF
14200rm -f conftest.$ac_objext
14201if { (ac_try="$ac_compile"
14202case "(($ac_try" in
14203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14204 *) ac_try_echo=$ac_try;;
14205esac
14206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14207 (eval "$ac_compile") 2>conftest.er1
14208 ac_status=$?
14209 grep -v '^ *+' conftest.er1 >conftest.err
14210 rm -f conftest.er1
14211 cat conftest.err >&5
14212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14213 (exit $ac_status); } && {
14214 test -z "$ac_c_werror_flag" ||
14215 test ! -s conftest.err
14216 } && test -s conftest.$ac_objext; then
14217 ac_lo=$ac_mid; break
14218else
14219 echo "$as_me: failed program was:" >&5
14220sed 's/^/| /' conftest.$ac_ext >&5
14221
14222 ac_hi=`expr '(' $ac_mid ')' - 1`
14223 if test $ac_mid -le $ac_hi; then
14224 ac_lo= ac_hi=
14225 break
14226 fi
14227 ac_mid=`expr 2 '*' $ac_mid`
14228fi
14229
14230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14231 done
14232else
14233 echo "$as_me: failed program was:" >&5
14234sed 's/^/| /' conftest.$ac_ext >&5
14235
14236 ac_lo= ac_hi=
14237fi
14238
14239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14240fi
14241
14242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14243# Binary search between lo and hi bounds.
14244while test "x$ac_lo" != "x$ac_hi"; do
14245 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14246 cat >conftest.$ac_ext <<_ACEOF
14247/* confdefs.h. */
14248_ACEOF
14249cat confdefs.h >>conftest.$ac_ext
14250cat >>conftest.$ac_ext <<_ACEOF
14251/* end confdefs.h. */
14252
14253#ifdef HAVE_PTHREAD_H
14254#include <pthread.h>
14255#endif
14256
14257
14258 typedef pthread_t ac__type_sizeof_;
14259int
14260main ()
14261{
14262static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14263test_array [0] = 0
14264
14265 ;
14266 return 0;
14267}
14268_ACEOF
14269rm -f conftest.$ac_objext
14270if { (ac_try="$ac_compile"
14271case "(($ac_try" in
14272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14273 *) ac_try_echo=$ac_try;;
14274esac
14275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14276 (eval "$ac_compile") 2>conftest.er1
14277 ac_status=$?
14278 grep -v '^ *+' conftest.er1 >conftest.err
14279 rm -f conftest.er1
14280 cat conftest.err >&5
14281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14282 (exit $ac_status); } && {
14283 test -z "$ac_c_werror_flag" ||
14284 test ! -s conftest.err
14285 } && test -s conftest.$ac_objext; then
14286 ac_hi=$ac_mid
14287else
14288 echo "$as_me: failed program was:" >&5
14289sed 's/^/| /' conftest.$ac_ext >&5
14290
14291 ac_lo=`expr '(' $ac_mid ')' + 1`
14292fi
14293
14294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14295done
14296case $ac_lo in
14297?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14298'') if test "$ac_cv_type_pthread_t" = yes; then
14299 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14300See \`config.log' for more details." >&5
14301echo "$as_me: error: cannot compute sizeof (pthread_t)
14302See \`config.log' for more details." >&2;}
14303 { (exit 77); exit 77; }; }
14304 else
14305 ac_cv_sizeof_pthread_t=0
14306 fi ;;
14307esac
14308else
14309 cat >conftest.$ac_ext <<_ACEOF
14310/* confdefs.h. */
14311_ACEOF
14312cat confdefs.h >>conftest.$ac_ext
14313cat >>conftest.$ac_ext <<_ACEOF
14314/* end confdefs.h. */
14315
14316#ifdef HAVE_PTHREAD_H
14317#include <pthread.h>
14318#endif
14319
14320
14321 typedef pthread_t ac__type_sizeof_;
14322static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14323static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14324#include <stdio.h>
14325#include <stdlib.h>
14326int
14327main ()
14328{
14329
14330 FILE *f = fopen ("conftest.val", "w");
14331 if (! f)
14332 return 1;
14333 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14334 {
14335 long int i = longval ();
14336 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14337 return 1;
14338 fprintf (f, "%ld\n", i);
14339 }
14340 else
14341 {
14342 unsigned long int i = ulongval ();
14343 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14344 return 1;
14345 fprintf (f, "%lu\n", i);
14346 }
14347 return ferror (f) || fclose (f) != 0;
14348
14349 ;
14350 return 0;
14351}
Martin v. Löwis11437992002-04-12 09:54:03 +000014352_ACEOF
14353rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014354if { (ac_try="$ac_link"
14355case "(($ac_try" in
14356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14357 *) ac_try_echo=$ac_try;;
14358esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014360 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014361 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364 { (case "(($ac_try" in
14365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14366 *) ac_try_echo=$ac_try;;
14367esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014370 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014372 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014373 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014374else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014375 echo "$as_me: program exited with status $ac_status" >&5
14376echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014377sed 's/^/| /' conftest.$ac_ext >&5
14378
Martin v. Löwis11437992002-04-12 09:54:03 +000014379( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014380if test "$ac_cv_type_pthread_t" = yes; then
14381 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14382See \`config.log' for more details." >&5
14383echo "$as_me: error: cannot compute sizeof (pthread_t)
14384See \`config.log' for more details." >&2;}
14385 { (exit 77); exit 77; }; }
14386 else
14387 ac_cv_sizeof_pthread_t=0
14388 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014390rm -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 +000014391fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014392rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014393fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014394{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014395echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014397
14398
Martin v. Löwis11437992002-04-12 09:54:03 +000014399cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014400#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014401_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014402
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014403
Trent Mick635f6fb2000-08-23 21:33:05 +000014404fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014405CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014406
Michael W. Hudson54241132001-12-07 15:38:26 +000014407
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014408case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014409 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014410 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14411 ;;
14412 Darwin/*)
14413 OTHER_LIBTOOL_OPT=""
14414 ;;
14415esac
14416
14417
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014418ARCH_RUN_32BIT=""
14419
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014420case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014421 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014422 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14423 if test "${enable_universalsdk}"; then
14424 :
14425 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014426 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014427 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014428 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014429 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014430 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014431 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14432 if test ${gcc_version} '<' 4.0
14433 then
14434 LIBTOOL_CRUFT="-lcc_dynamic"
14435 else
14436 LIBTOOL_CRUFT=""
14437 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014438 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014439 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014440else
14441 cat >conftest.$ac_ext <<_ACEOF
14442/* confdefs.h. */
14443_ACEOF
14444cat confdefs.h >>conftest.$ac_ext
14445cat >>conftest.$ac_ext <<_ACEOF
14446/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014447
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014448 #include <unistd.h>
14449 int main(int argc, char*argv[])
14450 {
14451 if (sizeof(long) == 4) {
14452 return 0;
14453 } else {
14454 return 1;
14455 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014456 }
14457
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014458_ACEOF
14459rm -f conftest$ac_exeext
14460if { (ac_try="$ac_link"
14461case "(($ac_try" in
14462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14463 *) ac_try_echo=$ac_try;;
14464esac
14465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14466 (eval "$ac_link") 2>&5
14467 ac_status=$?
14468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14469 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14470 { (case "(($ac_try" in
14471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14472 *) ac_try_echo=$ac_try;;
14473esac
14474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14475 (eval "$ac_try") 2>&5
14476 ac_status=$?
14477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14478 (exit $ac_status); }; }; then
14479 ac_osx_32bit=yes
14480else
14481 echo "$as_me: program exited with status $ac_status" >&5
14482echo "$as_me: failed program was:" >&5
14483sed 's/^/| /' conftest.$ac_ext >&5
14484
14485( exit $ac_status )
14486ac_osx_32bit=no
14487fi
14488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14489fi
14490
14491
14492
14493 if test "${ac_osx_32bit}" = "yes"; then
14494 case `arch` in
14495 i386)
14496 MACOSX_DEFAULT_ARCH="i386"
14497 ;;
14498 ppc)
14499 MACOSX_DEFAULT_ARCH="ppc"
14500 ;;
14501 *)
14502 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14503echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14504 { (exit 1); exit 1; }; }
14505 ;;
14506 esac
14507 else
14508 case `arch` in
14509 i386)
14510 MACOSX_DEFAULT_ARCH="x86_64"
14511 ;;
14512 ppc)
14513 MACOSX_DEFAULT_ARCH="ppc64"
14514 ;;
14515 *)
14516 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14517echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14518 { (exit 1); exit 1; }; }
14519 ;;
14520 esac
14521
14522 #ARCH_RUN_32BIT="true"
14523 fi
14524
14525 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014526 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014527 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014528esac
14529
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014530{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14531echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014532if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014533then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014534 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014535 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014536 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014537
Martin v. Löwis11437992002-04-12 09:54:03 +000014538cat >>confdefs.h <<\_ACEOF
14539#define WITH_NEXT_FRAMEWORK 1
14540_ACEOF
14541
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014542 { echo "$as_me:$LINENO: result: yes" >&5
14543echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014544 if test $enable_shared = "yes"
14545 then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014546 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14547echo "$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 +000014548 { (exit 1); exit 1; }; }
14549 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014550else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014551 { echo "$as_me:$LINENO: result: no" >&5
14552echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014553fi
14554
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014555{ echo "$as_me:$LINENO: checking for dyld" >&5
14556echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014557case $ac_sys_system/$ac_sys_release in
14558 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560cat >>confdefs.h <<\_ACEOF
14561#define WITH_DYLD 1
14562_ACEOF
14563
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014564 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14565echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014566 ;;
14567 *)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014568 { echo "$as_me:$LINENO: result: no" >&5
14569echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014570 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014571esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014572
Guido van Rossum0a516c91994-09-12 10:58:40 +000014573# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014574
Michael W. Hudson54241132001-12-07 15:38:26 +000014575
14576
14577
14578
Guido van Rossum0a516c91994-09-12 10:58:40 +000014579# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014580# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014581{ echo "$as_me:$LINENO: checking SO" >&5
14582echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014583if test -z "$SO"
14584then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014585 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014586 hp*|HP*)
14587 case `uname -m` in
14588 ia64) SO=.so;;
14589 *) SO=.sl;;
14590 esac
14591 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014592 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014593 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014594 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014595else
14596 # this might also be a termcap variable, see #610332
14597 echo
14598 echo '====================================================================='
14599 echo '+ +'
14600 echo '+ WARNING: You have set SO in your environment. +'
14601 echo '+ Do you really mean to change the extension for shared libraries? +'
14602 echo '+ Continuing in 10 seconds to let you to ponder. +'
14603 echo '+ +'
14604 echo '====================================================================='
14605 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014606fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014607{ echo "$as_me:$LINENO: result: $SO" >&5
14608echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014609
Georg Brandlb1441c72009-01-03 22:33:39 +000014610
Thomas Wouters477c8d52006-05-27 19:21:47 +000014611cat >>confdefs.h <<_ACEOF
14612#define SHLIB_EXT "$SO"
14613_ACEOF
14614
Guido van Rossum0a516c91994-09-12 10:58:40 +000014615# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014616# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014617# (Shared libraries in this instance are shared modules to be loaded into
14618# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014619{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14620echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014621if test -z "$LDSHARED"
14622then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014623 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014624 AIX*)
14625 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014626 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014627 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014628 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014629 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014630 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014631 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014632 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014633 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014634 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014635 hp*|HP*)
14636 if test "$GCC" = "yes"
14637 then LDSHARED='$(CC) -shared'
14638 else LDSHARED='ld -b';
14639 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014640 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014641 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014642 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14643 if test "$enable_framework" ; then
14644 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014645 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14646 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014647 else
14648 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014649 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014650 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014651 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014652 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14653 if test "$enable_framework" ; then
14654 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014655 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14656 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014657 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014658 # No framework, use the Python app as bundle-loader
14659 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014660 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014661 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014662 Darwin/*)
14663 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14664 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014665
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014666 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014667 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014668 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014669 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014670 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014671 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14672 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014673 else
14674 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14675 if test "$enable_framework" ; then
14676 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014677 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14678 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014679 else
14680 # No framework, use the Python app as bundle-loader
14681 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14682 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14683 fi
14684 fi
14685 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014686 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014687 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014688 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014689 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014690 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014691 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014692 else
14693 LDSHARED="ld -Bshareable ${LDFLAGS}"
14694 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014695 OpenBSD*)
14696 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14697 then
14698 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14699 else
14700 case `uname -r` in
14701 [01].* | 2.[0-7] | 2.[0-7].*)
14702 LDSHARED="ld -Bshareable ${LDFLAGS}"
14703 ;;
14704 *)
14705 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14706 ;;
14707 esac
14708 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014709 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014710 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014711 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014712 then LDSHARED='$(CC) -shared'
14713 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014714 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014715 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000014716 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014717 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014718 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014719 *) LDSHARED="ld";;
14720 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014721fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014722{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14723echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014724BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014725# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014726# library (module) -- this is only needed for a few systems
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014727{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14728echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014729if test -z "$CCSHARED"
14730then
Guido van Rossum07397971997-04-29 21:49:50 +000014731 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014732 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014733 then CCSHARED="-fPIC";
14734 elif test `uname -p` = sparc;
14735 then CCSHARED="-xcode=pic32";
14736 else CCSHARED="-Kpic";
14737 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014738 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014739 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014740 else CCSHARED="+z";
14741 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014742 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014743 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014744 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014745 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014746 if test "$GCC" = "yes"
14747 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014748 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014749 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014750 SCO_SV*)
14751 if test "$GCC" = "yes"
14752 then CCSHARED="-fPIC"
14753 else CCSHARED="-Kpic -belf"
14754 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000014755 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014756 IRIX*/6*) case $CC in
14757 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014758 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014759 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014760 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014761 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014762fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014763{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14764echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014765# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014766# the python executable -- this is only needed for a few systems
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014767{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14768echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014769if test -z "$LINKFORSHARED"
14770then
Guido van Rossum07397971997-04-29 21:49:50 +000014771 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014772 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014773 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014774 LINKFORSHARED="-Wl,-E -Wl,+s";;
14775# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014776 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014777 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014778 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014779 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014780 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014781 if test "$enable_framework"
14782 then
Jack Jansenda49e192005-01-07 13:08:22 +000014783 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014784 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014785 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014786 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014787 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014788 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014789 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014790 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14791 then
14792 LINKFORSHARED="-Wl,--export-dynamic"
14793 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014794 SunOS/5*) case $CC in
14795 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014796 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014797 then
14798 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014799 fi;;
14800 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014801 CYGWIN*)
14802 if test $enable_shared = "no"
14803 then
14804 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14805 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014806 QNX*)
14807 # -Wl,-E causes the symbols to be added to the dynamic
14808 # symbol table so that they can be found when a module
14809 # is loaded. -N 2048K causes the stack size to be set
14810 # to 2048 kilobytes so that the stack doesn't overflow
14811 # when running test_compile.py.
14812 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014813 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014814fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014815{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14816echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014817
Michael W. Hudson54241132001-12-07 15:38:26 +000014818
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014819
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014820{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14821echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014822if test ! "$LIBRARY" = "$LDLIBRARY"
14823then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014824 case $ac_sys_system in
14825 CYGWIN*)
14826 # Cygwin needs CCSHARED when building extension DLLs
14827 # but not when building the interpreter DLL.
14828 CFLAGSFORSHARED='';;
14829 *)
14830 CFLAGSFORSHARED='$(CCSHARED)'
14831 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014832fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014833{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14834echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014835
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014836# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14837# library (with --enable-shared).
14838# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014839# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14840# if it is not required, since it creates a dependency of the shared library
14841# to LIBS. This, in turn, means that applications linking the shared libpython
14842# don't need to link LIBS explicitly. The default should be only changed
14843# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014844
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014845{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14846echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014847case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014848 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014849 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014850esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014851{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14852echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014853
14854
Guido van Rossum627b2d71993-12-24 10:39:16 +000014855# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014856
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014857{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14858echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014859if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014860 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014861else
Martin v. Löwis11437992002-04-12 09:54:03 +000014862 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014863LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014864cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014865/* confdefs.h. */
14866_ACEOF
14867cat confdefs.h >>conftest.$ac_ext
14868cat >>conftest.$ac_ext <<_ACEOF
14869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871/* Override any GCC internal prototype to avoid an error.
14872 Use char because int might match the return type of a GCC
14873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014874#ifdef __cplusplus
14875extern "C"
14876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014877char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014878int
14879main ()
14880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014882 ;
14883 return 0;
14884}
14885_ACEOF
14886rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887if { (ac_try="$ac_link"
14888case "(($ac_try" in
14889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14890 *) ac_try_echo=$ac_try;;
14891esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014895 grep -v '^ *+' conftest.er1 >conftest.err
14896 rm -f conftest.er1
14897 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899 (exit $ac_status); } && {
14900 test -z "$ac_c_werror_flag" ||
14901 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014902 } && test -s conftest$ac_exeext &&
14903 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014905else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014907sed 's/^/| /' conftest.$ac_ext >&5
14908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911
14912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014914LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014915fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014916{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14917echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14918if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 cat >>confdefs.h <<_ACEOF
14920#define HAVE_LIBDL 1
14921_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014922
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014923 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014924
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014925fi
14926 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014927
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014928{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14929echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014930if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014932else
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014934LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014936/* confdefs.h. */
14937_ACEOF
14938cat confdefs.h >>conftest.$ac_ext
14939cat >>conftest.$ac_ext <<_ACEOF
14940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942/* Override any GCC internal prototype to avoid an error.
14943 Use char because int might match the return type of a GCC
14944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014945#ifdef __cplusplus
14946extern "C"
14947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014948char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014949int
14950main ()
14951{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 ;
14954 return 0;
14955}
14956_ACEOF
14957rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958if { (ac_try="$ac_link"
14959case "(($ac_try" in
14960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14961 *) ac_try_echo=$ac_try;;
14962esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014966 grep -v '^ *+' conftest.er1 >conftest.err
14967 rm -f conftest.er1
14968 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970 (exit $ac_status); } && {
14971 test -z "$ac_c_werror_flag" ||
14972 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014973 } && test -s conftest$ac_exeext &&
14974 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014976else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014978sed 's/^/| /' conftest.$ac_ext >&5
14979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982
14983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014984 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014985LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014986fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014987{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14988echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14989if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 cat >>confdefs.h <<_ACEOF
14991#define HAVE_LIBDLD 1
14992_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014993
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014994 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014995
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014996fi
14997 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014998
Georg Brandlb1441c72009-01-03 22:33:39 +000014999# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015000if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015001 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15002echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015003if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015004 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015005else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015006 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015007cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015008/* confdefs.h. */
15009_ACEOF
15010cat confdefs.h >>conftest.$ac_ext
15011cat >>conftest.$ac_ext <<_ACEOF
15012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014/* Override any GCC internal prototype to avoid an error.
15015 Use char because int might match the return type of a GCC
15016 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015017#ifdef __cplusplus
15018extern "C"
15019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015020char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015021int
15022main ()
15023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 ;
15026 return 0;
15027}
15028_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029for ac_lib in '' pthread rt posix4; do
15030 if test -z "$ac_lib"; then
15031 ac_res="none required"
15032 else
15033 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015034 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035 fi
15036 rm -f conftest.$ac_objext conftest$ac_exeext
15037if { (ac_try="$ac_link"
15038case "(($ac_try" in
15039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15040 *) ac_try_echo=$ac_try;;
15041esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015044 ac_status=$?
15045 grep -v '^ *+' conftest.er1 >conftest.err
15046 rm -f conftest.er1
15047 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049 (exit $ac_status); } && {
15050 test -z "$ac_c_werror_flag" ||
15051 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015052 } && test -s conftest$ac_exeext &&
15053 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015055else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015056 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015057sed 's/^/| /' conftest.$ac_ext >&5
15058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059
Thomas Wouters477c8d52006-05-27 19:21:47 +000015060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061
15062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15063 conftest$ac_exeext
15064 if test "${ac_cv_search_sem_init+set}" = set; then
15065 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067done
15068if test "${ac_cv_search_sem_init+set}" = set; then
15069 :
15070else
15071 ac_cv_search_sem_init=no
15072fi
15073rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015074LIBS=$ac_func_search_save_LIBS
15075fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015076{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15077echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078ac_res=$ac_cv_search_sem_init
15079if test "$ac_res" != no; then
15080 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015081
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015082fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015083 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015084 # posix4 on Solaris 2.6
15085 # pthread (first!) on Linux
15086fi
15087
Martin v. Löwis19d17342003-06-14 21:03:05 +000015088# check if we need libintl for locale functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015089{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15090echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015091if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015092 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015093else
15094 ac_check_lib_save_LIBS=$LIBS
15095LIBS="-lintl $LIBS"
15096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015097/* confdefs.h. */
15098_ACEOF
15099cat confdefs.h >>conftest.$ac_ext
15100cat >>conftest.$ac_ext <<_ACEOF
15101/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103/* Override any GCC internal prototype to avoid an error.
15104 Use char because int might match the return type of a GCC
15105 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015106#ifdef __cplusplus
15107extern "C"
15108#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015109char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015110int
15111main ()
15112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015114 ;
15115 return 0;
15116}
15117_ACEOF
15118rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119if { (ac_try="$ac_link"
15120case "(($ac_try" in
15121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15122 *) ac_try_echo=$ac_try;;
15123esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015127 grep -v '^ *+' conftest.er1 >conftest.err
15128 rm -f conftest.er1
15129 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131 (exit $ac_status); } && {
15132 test -z "$ac_c_werror_flag" ||
15133 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015134 } && test -s conftest$ac_exeext &&
15135 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015136 ac_cv_lib_intl_textdomain=yes
15137else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015139sed 's/^/| /' conftest.$ac_ext >&5
15140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015143
15144rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015145 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015146LIBS=$ac_check_lib_save_LIBS
15147fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015148{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15149echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15150if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015151
15152cat >>confdefs.h <<\_ACEOF
15153#define WITH_LIBINTL 1
15154_ACEOF
15155
Brett Cannonc6d936e2009-06-07 20:09:53 +000015156 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015157fi
15158
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015159
15160# checks for system dependent C++ extensions support
15161case "$ac_sys_system" in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015162 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15163echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015165/* confdefs.h. */
15166_ACEOF
15167cat confdefs.h >>conftest.$ac_ext
15168cat >>conftest.$ac_ext <<_ACEOF
15169/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015170#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015171int
15172main ()
15173{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015174loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 ;
15176 return 0;
15177}
15178_ACEOF
15179rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180if { (ac_try="$ac_link"
15181case "(($ac_try" in
15182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15183 *) ac_try_echo=$ac_try;;
15184esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015188 grep -v '^ *+' conftest.er1 >conftest.err
15189 rm -f conftest.er1
15190 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192 (exit $ac_status); } && {
15193 test -z "$ac_c_werror_flag" ||
15194 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015195 } && test -s conftest$ac_exeext &&
15196 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015197
Martin v. Löwis11437992002-04-12 09:54:03 +000015198cat >>confdefs.h <<\_ACEOF
15199#define AIX_GENUINE_CPLUSPLUS 1
15200_ACEOF
15201
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015202 { echo "$as_me:$LINENO: result: yes" >&5
15203echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015204else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015206sed 's/^/| /' conftest.$ac_ext >&5
15207
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015208 { echo "$as_me:$LINENO: result: no" >&5
15209echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211
15212rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015213 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015214 *) ;;
15215esac
15216
Guido van Rossum70c7f481998-03-26 18:44:10 +000015217# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015218{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15219echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015220if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015221 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015222else
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015224LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015225cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015226/* confdefs.h. */
15227_ACEOF
15228cat confdefs.h >>conftest.$ac_ext
15229cat >>conftest.$ac_ext <<_ACEOF
15230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015232/* Override any GCC internal prototype to avoid an error.
15233 Use char because int might match the return type of a GCC
15234 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015235#ifdef __cplusplus
15236extern "C"
15237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015238char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015239int
15240main ()
15241{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015243 ;
15244 return 0;
15245}
15246_ACEOF
15247rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015248if { (ac_try="$ac_link"
15249case "(($ac_try" in
15250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15251 *) ac_try_echo=$ac_try;;
15252esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015256 grep -v '^ *+' conftest.er1 >conftest.err
15257 rm -f conftest.er1
15258 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015260 (exit $ac_status); } && {
15261 test -z "$ac_c_werror_flag" ||
15262 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015263 } && test -s conftest$ac_exeext &&
15264 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015266else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015268sed 's/^/| /' conftest.$ac_ext >&5
15269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015270 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015272
15273rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015274 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015275LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015276fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015277{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15278echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15279if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015280 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015281fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015282 # SVR4
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015283{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15284echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015285if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015286 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015287else
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015289LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015291/* confdefs.h. */
15292_ACEOF
15293cat confdefs.h >>conftest.$ac_ext
15294cat >>conftest.$ac_ext <<_ACEOF
15295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297/* Override any GCC internal prototype to avoid an error.
15298 Use char because int might match the return type of a GCC
15299 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015300#ifdef __cplusplus
15301extern "C"
15302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015303char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015304int
15305main ()
15306{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 ;
15309 return 0;
15310}
15311_ACEOF
15312rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015313if { (ac_try="$ac_link"
15314case "(($ac_try" in
15315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15316 *) ac_try_echo=$ac_try;;
15317esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015321 grep -v '^ *+' conftest.er1 >conftest.err
15322 rm -f conftest.er1
15323 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325 (exit $ac_status); } && {
15326 test -z "$ac_c_werror_flag" ||
15327 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015328 } && test -s conftest$ac_exeext &&
15329 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015330 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015331else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015333sed 's/^/| /' conftest.$ac_ext >&5
15334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015335 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337
15338rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015339 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015340LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015341fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015342{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15343echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15344if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015345 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015346fi
15347 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015348
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015349{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15350echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015352# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015353if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354 withval=$with_libs;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015355{ echo "$as_me:$LINENO: result: $withval" >&5
15356echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015357LIBS="$withval $LIBS"
15358
15359else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015360 { echo "$as_me:$LINENO: result: no" >&5
15361echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362fi
15363
Guido van Rossum7f43da71994-08-01 12:15:30 +000015364
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015365# Check for use of the system libffi library
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015366{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15367echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015370if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371 withval=$with_system_ffi;
15372fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015373
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015374
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015375{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15376echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015377
Matthias Klose55708cc2009-04-30 08:06:49 +000015378# Check for --with-dbmliborder
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015379{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15380echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015381
15382# Check whether --with-dbmliborder was given.
15383if test "${with_dbmliborder+set}" = set; then
15384 withval=$with_dbmliborder;
15385if test x$with_dbmliborder = xyes
15386then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015387{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15388echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015389 { (exit 1); exit 1; }; }
15390else
15391 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15392 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15393 then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015394 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15395echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015396 { (exit 1); exit 1; }; }
15397 fi
15398 done
15399fi
15400fi
15401
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015402{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15403echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015404
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015405# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015406
15407
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015408{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15409echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015412if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413 withval=$with_signal_module;
15414fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015415
15416
15417if test -z "$with_signal_module"
15418then with_signal_module="yes"
15419fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015420{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15421echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015422
15423if test "${with_signal_module}" = "yes"; then
15424 USE_SIGNAL_MODULE=""
15425 SIGNAL_OBJS=""
15426else
15427 USE_SIGNAL_MODULE="#"
15428 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15429fi
15430
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015431# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015432
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015433USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015434
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015435{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15436echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015437
Guido van Rossumec2f0731997-01-22 20:54:01 +000015438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015439# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015440if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015441 withval=$with_dec_threads;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015442{ echo "$as_me:$LINENO: result: $withval" >&5
15443echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015444LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015445if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015446 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015447fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015448else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015449 { echo "$as_me:$LINENO: result: no" >&5
15450echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451fi
15452
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
15454# Templates for things AC_DEFINEd more than once.
15455# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015456
15457
Martin v. Löwis11437992002-04-12 09:54:03 +000015458
15459
15460
15461
15462
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015463{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15464echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015466# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015467if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015468 withval=$with_threads;
15469fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015470
15471
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015472# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015474# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015475if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476 withval=$with_thread; with_threads=$with_thread
15477fi
15478
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015479
15480if test -z "$with_threads"
15481then with_threads="yes"
15482fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015483{ echo "$as_me:$LINENO: result: $with_threads" >&5
15484echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015485
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015486
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015487if test "$with_threads" = "no"
15488then
15489 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015490elif test "$ac_cv_pthread_is_default" = yes
15491then
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015493#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015494_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015495
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015496 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015497 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015498#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015499_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015500
15501 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015503elif test "$ac_cv_kpthread" = "yes"
15504then
15505 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015506 if test "$ac_cv_cxx_thread" = "yes"; then
15507 CXX="$CXX -Kpthread"
15508 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015510#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015511_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015512
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015513 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015514 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015515elif test "$ac_cv_kthread" = "yes"
15516then
15517 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015518 if test "$ac_cv_cxx_thread" = "yes"; then
15519 CXX="$CXX -Kthread"
15520 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015521 cat >>confdefs.h <<\_ACEOF
15522#define WITH_THREAD 1
15523_ACEOF
15524
15525 posix_threads=yes
15526 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015527elif test "$ac_cv_pthread" = "yes"
15528then
15529 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015530 if test "$ac_cv_cxx_thread" = "yes"; then
15531 CXX="$CXX -pthread"
15532 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015533 cat >>confdefs.h <<\_ACEOF
15534#define WITH_THREAD 1
15535_ACEOF
15536
15537 posix_threads=yes
15538 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015539else
15540 if test ! -z "$with_threads" -a -d "$with_threads"
15541 then LDFLAGS="$LDFLAGS -L$with_threads"
15542 fi
15543 if test ! -z "$withval" -a -d "$withval"
15544 then LDFLAGS="$LDFLAGS -L$withval"
15545 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015546
15547 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015548 # define _POSIX_THREADS in unistd.h. Some apparently don't
15549 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015550 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15551echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015553/* confdefs.h. */
15554_ACEOF
15555cat confdefs.h >>conftest.$ac_ext
15556cat >>conftest.$ac_ext <<_ACEOF
15557/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015558
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015559#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015560#ifdef _POSIX_THREADS
15561yes
15562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015563
15564_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015566 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015567 unistd_defines_pthreads=yes
15568else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015569 unistd_defines_pthreads=no
15570fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000015571rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015572
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015573 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15574echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015575
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015577#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015578_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015579
Martin v. Löwis11437992002-04-12 09:54:03 +000015580 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015581 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15582echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015583if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015584 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015585fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015586{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15587echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015588else
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015590{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15591echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015593/* confdefs.h. */
15594_ACEOF
15595cat confdefs.h >>conftest.$ac_ext
15596cat >>conftest.$ac_ext <<_ACEOF
15597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015598$ac_includes_default
15599#include <cthreads.h>
15600_ACEOF
15601rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602if { (ac_try="$ac_compile"
15603case "(($ac_try" in
15604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15605 *) ac_try_echo=$ac_try;;
15606esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015610 grep -v '^ *+' conftest.er1 >conftest.err
15611 rm -f conftest.er1
15612 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614 (exit $ac_status); } && {
15615 test -z "$ac_c_werror_flag" ||
15616 test ! -s conftest.err
15617 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 ac_header_compiler=yes
15619else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015621sed 's/^/| /' conftest.$ac_ext >&5
15622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625
15626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015627{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15628echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
15630# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015631{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15632echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015634/* confdefs.h. */
15635_ACEOF
15636cat confdefs.h >>conftest.$ac_ext
15637cat >>conftest.$ac_ext <<_ACEOF
15638/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015639#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015641if { (ac_try="$ac_cpp conftest.$ac_ext"
15642case "(($ac_try" in
15643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15644 *) ac_try_echo=$ac_try;;
15645esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015649 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015650 rm -f conftest.er1
15651 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015653 (exit $ac_status); } >/dev/null && {
15654 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15655 test ! -s conftest.err
15656 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015657 ac_header_preproc=yes
15658else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015660sed 's/^/| /' conftest.$ac_ext >&5
15661
Martin v. Löwis11437992002-04-12 09:54:03 +000015662 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664
Martin v. Löwis11437992002-04-12 09:54:03 +000015665rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015666{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15667echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015668
15669# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015670case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15671 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015672 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15673echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15674 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15675echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015676 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015677 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015678 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015679 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15680echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15681 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15682echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15683 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15684echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15685 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15686echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15687 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15688echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15689 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15690echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015692## -------------------------------------- ##
15693## Report this to http://bugs.python.org/ ##
15694## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015695_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015696 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015697 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015698esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015699{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15700echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015701if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015702 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015703else
15704 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015705fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015706{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15707echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015708
15709fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015710if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015712#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015713_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015714
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015716#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015717_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015718
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
15720cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015721#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015722_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015723
15724 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015725 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015726else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015727
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015729 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15730echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015731if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015732 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015733fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015734{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15735echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015736else
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015738{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15739echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015740cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015741/* confdefs.h. */
15742_ACEOF
15743cat confdefs.h >>conftest.$ac_ext
15744cat >>conftest.$ac_ext <<_ACEOF
15745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015746$ac_includes_default
15747#include <mach/cthreads.h>
15748_ACEOF
15749rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750if { (ac_try="$ac_compile"
15751case "(($ac_try" in
15752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15753 *) ac_try_echo=$ac_try;;
15754esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015758 grep -v '^ *+' conftest.er1 >conftest.err
15759 rm -f conftest.er1
15760 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762 (exit $ac_status); } && {
15763 test -z "$ac_c_werror_flag" ||
15764 test ! -s conftest.err
15765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ac_header_compiler=yes
15767else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015769sed 's/^/| /' conftest.$ac_ext >&5
15770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015771 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773
15774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015775{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15776echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015777
15778# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015779{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15780echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015782/* confdefs.h. */
15783_ACEOF
15784cat confdefs.h >>conftest.$ac_ext
15785cat >>conftest.$ac_ext <<_ACEOF
15786/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015787#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015788_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789if { (ac_try="$ac_cpp conftest.$ac_ext"
15790case "(($ac_try" in
15791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15792 *) ac_try_echo=$ac_try;;
15793esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015795 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015796 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015797 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 rm -f conftest.er1
15799 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015801 (exit $ac_status); } >/dev/null && {
15802 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15803 test ! -s conftest.err
15804 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 ac_header_preproc=yes
15806else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015808sed 's/^/| /' conftest.$ac_ext >&5
15809
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812
Martin v. Löwis11437992002-04-12 09:54:03 +000015813rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015814{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15815echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015816
15817# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015818case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15819 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015820 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15821echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15822 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15823echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015824 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015825 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015826 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015827 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15828echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15829 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15830echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15831 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15832echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15833 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15834echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15835 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15836echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15837 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15838echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015840## -------------------------------------- ##
15841## Report this to http://bugs.python.org/ ##
15842## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015843_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015845 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015846esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015847{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15848echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015849if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015850 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015851else
15852 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015853fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015854{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15855echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015856
15857fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015858if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015860#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015861_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015862
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015864#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015865_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867
15868cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015869#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015870_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015871
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015872 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015873else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015874
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015875 { echo "$as_me:$LINENO: checking for --with-pth" >&5
15876echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015878# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015879if test "${with_pth+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015880 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
15881echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015882 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015883#define WITH_THREAD 1
15884_ACEOF
15885
15886
15887cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015888#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015889_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015890
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015891 LIBS="-lpth $LIBS"
15892 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015893else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015894 { echo "$as_me:$LINENO: result: no" >&5
15895echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015896
15897 # Just looking for pthread_create in libpthread is not enough:
15898 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15899 # So we really have to include pthread.h, and then link.
15900 _libs=$LIBS
15901 LIBS="$LIBS -lpthread"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015902 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15903echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015905/* confdefs.h. */
15906_ACEOF
15907cat confdefs.h >>conftest.$ac_ext
15908cat >>conftest.$ac_ext <<_ACEOF
15909/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015910#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015911
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015912void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015913int
15914main ()
15915{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015916
15917pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015918 ;
15919 return 0;
15920}
15921_ACEOF
15922rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923if { (ac_try="$ac_link"
15924case "(($ac_try" in
15925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15926 *) ac_try_echo=$ac_try;;
15927esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015931 grep -v '^ *+' conftest.er1 >conftest.err
15932 rm -f conftest.er1
15933 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015935 (exit $ac_status); } && {
15936 test -z "$ac_c_werror_flag" ||
15937 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015938 } && test -s conftest$ac_exeext &&
15939 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015940
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015941 { echo "$as_me:$LINENO: result: yes" >&5
15942echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015943 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015944#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015945_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015946
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015947 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015948 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015949else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015951sed 's/^/| /' conftest.$ac_ext >&5
15952
Martin v. Löwis11437992002-04-12 09:54:03 +000015953
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015954 LIBS=$_libs
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015955 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15956echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015957if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015958 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015959else
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015961/* confdefs.h. */
15962_ACEOF
15963cat confdefs.h >>conftest.$ac_ext
15964cat >>conftest.$ac_ext <<_ACEOF
15965/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015966/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15967 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15968#define pthread_detach innocuous_pthread_detach
15969
Guido van Rossumad678af1998-10-02 14:42:15 +000015970/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015971 which can conflict with char pthread_detach (); below.
15972 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015973 <limits.h> exists even on freestanding compilers. */
15974
15975#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015976# include <limits.h>
15977#else
15978# include <assert.h>
15979#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015980
15981#undef pthread_detach
15982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015983/* Override any GCC internal prototype to avoid an error.
15984 Use char because int might match the return type of a GCC
15985 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015986#ifdef __cplusplus
15987extern "C"
15988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015989char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015990/* The GNU C library defines this for functions which it implements
15991 to always fail with ENOSYS. Some functions are actually named
15992 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015993#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015994choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015995#endif
15996
Skip Montanaro6dead952003-09-25 14:50:04 +000015997int
15998main ()
15999{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016000return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016001 ;
16002 return 0;
16003}
16004_ACEOF
16005rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016006if { (ac_try="$ac_link"
16007case "(($ac_try" in
16008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16009 *) ac_try_echo=$ac_try;;
16010esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016012 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016014 grep -v '^ *+' conftest.er1 >conftest.err
16015 rm -f conftest.er1
16016 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016018 (exit $ac_status); } && {
16019 test -z "$ac_c_werror_flag" ||
16020 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016021 } && test -s conftest$ac_exeext &&
16022 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016023 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016024else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016026sed 's/^/| /' conftest.$ac_ext >&5
16027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016028 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016030
16031rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016032 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016033fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016034{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16035echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16036if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016037 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016038#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016039_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016040
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016041 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016042 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016043else
Guido van Rossumad678af1998-10-02 14:42:15 +000016044
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016045 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016046 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16047echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016048if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016049 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016050fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016051{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16052echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016053else
16054 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016055{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16056echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016058/* confdefs.h. */
16059_ACEOF
16060cat confdefs.h >>conftest.$ac_ext
16061cat >>conftest.$ac_ext <<_ACEOF
16062/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016063$ac_includes_default
16064#include <atheos/threads.h>
16065_ACEOF
16066rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016067if { (ac_try="$ac_compile"
16068case "(($ac_try" in
16069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16070 *) ac_try_echo=$ac_try;;
16071esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016075 grep -v '^ *+' conftest.er1 >conftest.err
16076 rm -f conftest.er1
16077 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016079 (exit $ac_status); } && {
16080 test -z "$ac_c_werror_flag" ||
16081 test ! -s conftest.err
16082 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016083 ac_header_compiler=yes
16084else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016086sed 's/^/| /' conftest.$ac_ext >&5
16087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016090
16091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016092{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16093echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016094
16095# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016096{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16097echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016099/* confdefs.h. */
16100_ACEOF
16101cat confdefs.h >>conftest.$ac_ext
16102cat >>conftest.$ac_ext <<_ACEOF
16103/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016104#include <atheos/threads.h>
16105_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016106if { (ac_try="$ac_cpp conftest.$ac_ext"
16107case "(($ac_try" in
16108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16109 *) ac_try_echo=$ac_try;;
16110esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016112 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016113 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016114 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016115 rm -f conftest.er1
16116 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016118 (exit $ac_status); } >/dev/null && {
16119 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16120 test ! -s conftest.err
16121 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016122 ac_header_preproc=yes
16123else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016125sed 's/^/| /' conftest.$ac_ext >&5
16126
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016127 ac_header_preproc=no
16128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016130rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016131{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16132echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016133
16134# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016135case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16136 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016137 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16138echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16139 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16140echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016141 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016142 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016143 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016144 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16145echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16146 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16147echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16148 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16149echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16150 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16151echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16152 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16153echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16154 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16155echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000016157## -------------------------------------- ##
16158## Report this to http://bugs.python.org/ ##
16159## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016160_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016161 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016162 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016163esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016164{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16165echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016166if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016167 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016168else
16169 ac_cv_header_atheos_threads_h=$ac_header_preproc
16170fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016171{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16172echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016173
16174fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016175if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016176 cat >>confdefs.h <<\_ACEOF
16177#define WITH_THREAD 1
16178_ACEOF
16179
16180
16181cat >>confdefs.h <<\_ACEOF
16182#define ATHEOS_THREADS 1
16183_ACEOF
16184
16185 THREADOBJ="Python/thread.o"
16186else
16187
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016188 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16189echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016190if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016191 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016192else
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016194LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016196/* confdefs.h. */
16197_ACEOF
16198cat confdefs.h >>conftest.$ac_ext
16199cat >>conftest.$ac_ext <<_ACEOF
16200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202/* Override any GCC internal prototype to avoid an error.
16203 Use char because int might match the return type of a GCC
16204 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016205#ifdef __cplusplus
16206extern "C"
16207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016208char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016209int
16210main ()
16211{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 ;
16214 return 0;
16215}
16216_ACEOF
16217rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218if { (ac_try="$ac_link"
16219case "(($ac_try" in
16220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16221 *) ac_try_echo=$ac_try;;
16222esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016226 grep -v '^ *+' conftest.er1 >conftest.err
16227 rm -f conftest.er1
16228 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230 (exit $ac_status); } && {
16231 test -z "$ac_c_werror_flag" ||
16232 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016233 } && test -s conftest$ac_exeext &&
16234 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016235 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016236else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016238sed 's/^/| /' conftest.$ac_ext >&5
16239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016240 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016242
16243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016245LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016246fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016247{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16248echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16249if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016250 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016251#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016252_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016253
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016254 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016255 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016256 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016257else
Greg Steinadf63d62000-07-05 10:38:09 +000016258
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016259 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16260echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016261if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016262 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016263else
Martin v. Löwis11437992002-04-12 09:54:03 +000016264 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016265LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016266cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016267/* confdefs.h. */
16268_ACEOF
16269cat confdefs.h >>conftest.$ac_ext
16270cat >>conftest.$ac_ext <<_ACEOF
16271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273/* Override any GCC internal prototype to avoid an error.
16274 Use char because int might match the return type of a GCC
16275 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016276#ifdef __cplusplus
16277extern "C"
16278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016279char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016280int
16281main ()
16282{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 ;
16285 return 0;
16286}
16287_ACEOF
16288rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289if { (ac_try="$ac_link"
16290case "(($ac_try" in
16291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16292 *) ac_try_echo=$ac_try;;
16293esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016295 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016297 grep -v '^ *+' conftest.er1 >conftest.err
16298 rm -f conftest.er1
16299 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301 (exit $ac_status); } && {
16302 test -z "$ac_c_werror_flag" ||
16303 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016304 } && test -s conftest$ac_exeext &&
16305 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016306 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016307else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016309sed 's/^/| /' conftest.$ac_ext >&5
16310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016311 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313
16314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016315 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016316LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016317fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016318{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16319echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16320if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016321 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016322#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016323_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016324
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016325 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016326 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016327 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016328else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016329
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016330 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16331echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016332if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016333 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016334else
Martin v. Löwis11437992002-04-12 09:54:03 +000016335 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016336LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016338/* confdefs.h. */
16339_ACEOF
16340cat confdefs.h >>conftest.$ac_ext
16341cat >>conftest.$ac_ext <<_ACEOF
16342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344/* Override any GCC internal prototype to avoid an error.
16345 Use char because int might match the return type of a GCC
16346 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016347#ifdef __cplusplus
16348extern "C"
16349#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016350char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016351int
16352main ()
16353{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016355 ;
16356 return 0;
16357}
16358_ACEOF
16359rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016360if { (ac_try="$ac_link"
16361case "(($ac_try" in
16362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16363 *) ac_try_echo=$ac_try;;
16364esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016366 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016368 grep -v '^ *+' conftest.er1 >conftest.err
16369 rm -f conftest.er1
16370 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016372 (exit $ac_status); } && {
16373 test -z "$ac_c_werror_flag" ||
16374 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016375 } && test -s conftest$ac_exeext &&
16376 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016377 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016378else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016380sed 's/^/| /' conftest.$ac_ext >&5
16381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016382 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016384
16385rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016387LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016388fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016389{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16390echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16391if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016392 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016393#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016394_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016395
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016396 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016397 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016398 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016399else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016400
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016401 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16402echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016403if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016404 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016405else
Martin v. Löwis11437992002-04-12 09:54:03 +000016406 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016407LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016408cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016409/* confdefs.h. */
16410_ACEOF
16411cat confdefs.h >>conftest.$ac_ext
16412cat >>conftest.$ac_ext <<_ACEOF
16413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016415/* Override any GCC internal prototype to avoid an error.
16416 Use char because int might match the return type of a GCC
16417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016418#ifdef __cplusplus
16419extern "C"
16420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016421char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016422int
16423main ()
16424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 ;
16427 return 0;
16428}
16429_ACEOF
16430rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016431if { (ac_try="$ac_link"
16432case "(($ac_try" in
16433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16434 *) ac_try_echo=$ac_try;;
16435esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016437 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016439 grep -v '^ *+' conftest.er1 >conftest.err
16440 rm -f conftest.er1
16441 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016443 (exit $ac_status); } && {
16444 test -z "$ac_c_werror_flag" ||
16445 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016446 } && test -s conftest$ac_exeext &&
16447 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016448 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016449else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016451sed 's/^/| /' conftest.$ac_ext >&5
16452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016453 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016455
16456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016457 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016458LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016459fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016460{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16461echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16462if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016463 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016464#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016465_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016466
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016467 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016468 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016469 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016470else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016471
Martin v. Löwis130fb172001-07-19 11:00:41 +000016472 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016473fi
16474
Guido van Rossum627b2d71993-12-24 10:39:16 +000016475
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016476fi
16477
Guido van Rossum0be3e491997-05-22 20:33:33 +000016478fi
16479
Guido van Rossum49545951997-12-02 19:28:29 +000016480fi
16481
Guido van Rossumb93a8621998-05-07 13:27:32 +000016482fi
16483
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016484
Michael W. Hudson54241132001-12-07 15:38:26 +000016485fi
16486
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016488
16489rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016490 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016491fi
16492
Martin v. Löwis11437992002-04-12 09:54:03 +000016493fi
16494
16495
16496fi
16497
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016498
Michael W. Hudson54241132001-12-07 15:38:26 +000016499
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016500 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16501echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016502if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016504else
Martin v. Löwis11437992002-04-12 09:54:03 +000016505 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016506LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016508/* confdefs.h. */
16509_ACEOF
16510cat confdefs.h >>conftest.$ac_ext
16511cat >>conftest.$ac_ext <<_ACEOF
16512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016514/* Override any GCC internal prototype to avoid an error.
16515 Use char because int might match the return type of a GCC
16516 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016517#ifdef __cplusplus
16518extern "C"
16519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016520char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016521int
16522main ()
16523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016524return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016525 ;
16526 return 0;
16527}
16528_ACEOF
16529rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016530if { (ac_try="$ac_link"
16531case "(($ac_try" in
16532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16533 *) ac_try_echo=$ac_try;;
16534esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016536 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016538 grep -v '^ *+' conftest.er1 >conftest.err
16539 rm -f conftest.er1
16540 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542 (exit $ac_status); } && {
16543 test -z "$ac_c_werror_flag" ||
16544 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016545 } && test -s conftest$ac_exeext &&
16546 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016548else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016550sed 's/^/| /' conftest.$ac_ext >&5
16551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016554
16555rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016556 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016557LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016558fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016559{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16560echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16561if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016563#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016564_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016565
Martin v. Löwis130fb172001-07-19 11:00:41 +000016566 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016567 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016568 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016569fi
16570
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016571
Neal Norwitza978ab02002-11-02 16:58:05 +000016572 if test "$posix_threads" != "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016573 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16574echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016575if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016576 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016577else
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016579LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016580cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016581/* confdefs.h. */
16582_ACEOF
16583cat confdefs.h >>conftest.$ac_ext
16584cat >>conftest.$ac_ext <<_ACEOF
16585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016587/* Override any GCC internal prototype to avoid an error.
16588 Use char because int might match the return type of a GCC
16589 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016590#ifdef __cplusplus
16591extern "C"
16592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016593char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016594int
16595main ()
16596{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016598 ;
16599 return 0;
16600}
16601_ACEOF
16602rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016603if { (ac_try="$ac_link"
16604case "(($ac_try" in
16605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16606 *) ac_try_echo=$ac_try;;
16607esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016611 grep -v '^ *+' conftest.er1 >conftest.err
16612 rm -f conftest.er1
16613 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615 (exit $ac_status); } && {
16616 test -z "$ac_c_werror_flag" ||
16617 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016618 } && test -s conftest$ac_exeext &&
16619 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016620 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016621else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016623sed 's/^/| /' conftest.$ac_ext >&5
16624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016625 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627
16628rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016630LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016631fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016632{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16633echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16634if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016635 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016636#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016637_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016638
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016639 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016640 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016641 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016642fi
16643
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016644 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016645
Martin v. Löwis130fb172001-07-19 11:00:41 +000016646 if test "$USE_THREAD_MODULE" != "#"
16647 then
16648 # If the above checks didn't disable threads, (at least) OSF1
16649 # needs this '-threads' argument during linking.
16650 case $ac_sys_system in
16651 OSF1) LDLAST=-threads;;
16652 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016653 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016654fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016655
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016656if test "$posix_threads" = "yes"; then
16657 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016658
16659cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016660#define _POSIX_THREADS 1
16661_ACEOF
16662
16663 fi
16664
16665 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16666 case $ac_sys_system/$ac_sys_release in
16667 SunOS/5.6)
16668cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016669#define HAVE_PTHREAD_DESTRUCTOR 1
16670_ACEOF
16671
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016672 ;;
16673 SunOS/5.8)
16674cat >>confdefs.h <<\_ACEOF
16675#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16676_ACEOF
16677
16678 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016679 AIX/5)
16680cat >>confdefs.h <<\_ACEOF
16681#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16682_ACEOF
16683
16684 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016685 esac
16686
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016687 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16688echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016689 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016690 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016691else
16692 if test "$cross_compiling" = yes; then
16693 ac_cv_pthread_system_supported=no
16694else
16695 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016696/* confdefs.h. */
16697_ACEOF
16698cat confdefs.h >>conftest.$ac_ext
16699cat >>conftest.$ac_ext <<_ACEOF
16700/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016701#include <pthread.h>
16702 void *foo(void *parm) {
16703 return NULL;
16704 }
16705 main() {
16706 pthread_attr_t attr;
16707 pthread_t id;
16708 if (pthread_attr_init(&attr)) exit(-1);
16709 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16710 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16711 exit(0);
16712 }
16713_ACEOF
16714rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016715if { (ac_try="$ac_link"
16716case "(($ac_try" in
16717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16718 *) ac_try_echo=$ac_try;;
16719esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016722 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016724 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016725 { (case "(($ac_try" in
16726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16727 *) ac_try_echo=$ac_try;;
16728esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016730 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016731 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016733 (exit $ac_status); }; }; then
16734 ac_cv_pthread_system_supported=yes
16735else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016736 echo "$as_me: program exited with status $ac_status" >&5
16737echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016738sed 's/^/| /' conftest.$ac_ext >&5
16739
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016740( exit $ac_status )
16741ac_cv_pthread_system_supported=no
16742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016743rm -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 +000016744fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746
16747
Guido van Rossum627b2d71993-12-24 10:39:16 +000016748fi
16749
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016750 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16751echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016752 if test "$ac_cv_pthread_system_supported" = "yes"; then
16753
16754cat >>confdefs.h <<\_ACEOF
16755#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16756_ACEOF
16757
16758 fi
16759
16760for ac_func in pthread_sigmask
16761do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016762as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16763{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16764echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016766 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016767else
16768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016769/* confdefs.h. */
16770_ACEOF
16771cat confdefs.h >>conftest.$ac_ext
16772cat >>conftest.$ac_ext <<_ACEOF
16773/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016774/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16775 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16776#define $ac_func innocuous_$ac_func
16777
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016778/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016779 which can conflict with char $ac_func (); below.
16780 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016781 <limits.h> exists even on freestanding compilers. */
16782
16783#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016784# include <limits.h>
16785#else
16786# include <assert.h>
16787#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016788
16789#undef $ac_func
16790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016791/* Override any GCC internal prototype to avoid an error.
16792 Use char because int might match the return type of a GCC
16793 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016794#ifdef __cplusplus
16795extern "C"
16796#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016797char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016798/* The GNU C library defines this for functions which it implements
16799 to always fail with ENOSYS. Some functions are actually named
16800 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016802choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016803#endif
16804
Skip Montanaro6dead952003-09-25 14:50:04 +000016805int
16806main ()
16807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016809 ;
16810 return 0;
16811}
16812_ACEOF
16813rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814if { (ac_try="$ac_link"
16815case "(($ac_try" in
16816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16817 *) ac_try_echo=$ac_try;;
16818esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016820 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016822 grep -v '^ *+' conftest.er1 >conftest.err
16823 rm -f conftest.er1
16824 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016826 (exit $ac_status); } && {
16827 test -z "$ac_c_werror_flag" ||
16828 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016829 } && test -s conftest$ac_exeext &&
16830 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016831 eval "$as_ac_var=yes"
16832else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016834sed 's/^/| /' conftest.$ac_ext >&5
16835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016836 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016838
16839rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016840 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016841fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016842ac_res=`eval echo '${'$as_ac_var'}'`
16843 { echo "$as_me:$LINENO: result: $ac_res" >&5
16844echo "${ECHO_T}$ac_res" >&6; }
16845if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016846 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016847#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016848_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016849 case $ac_sys_system in
16850 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016851
Jason Tishlerfac083d2003-07-22 15:20:49 +000016852cat >>confdefs.h <<\_ACEOF
16853#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16854_ACEOF
16855
16856 ;;
16857 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016858fi
16859done
16860
16861fi
16862
16863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016864# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016865
16866
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016867{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16868echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016870if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016871 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016872 no)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016873 { echo "$as_me:$LINENO: result: no" >&5
16874echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016875 ipv6=no
16876 ;;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016877 *) { echo "$as_me:$LINENO: result: yes" >&5
16878echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016879 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016880#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016881_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016882
16883 ipv6=yes
16884 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016885 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016886else
Martin v. Löwis11437992002-04-12 09:54:03 +000016887
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016888 if test "$cross_compiling" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016889 { echo "$as_me:$LINENO: result: no" >&5
16890echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016891 ipv6=no
16892
16893else
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016895/* confdefs.h. */
16896_ACEOF
16897cat confdefs.h >>conftest.$ac_ext
16898cat >>conftest.$ac_ext <<_ACEOF
16899/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016900 /* AF_INET6 available check */
16901#include <sys/types.h>
16902#include <sys/socket.h>
16903main()
16904{
16905 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16906 exit(1);
16907 else
16908 exit(0);
16909}
16910
Martin v. Löwis11437992002-04-12 09:54:03 +000016911_ACEOF
16912rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016913if { (ac_try="$ac_link"
16914case "(($ac_try" in
16915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16916 *) ac_try_echo=$ac_try;;
16917esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016919 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016920 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923 { (case "(($ac_try" in
16924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16925 *) ac_try_echo=$ac_try;;
16926esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016928 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016929 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016931 (exit $ac_status); }; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016932 { echo "$as_me:$LINENO: result: yes" >&5
16933echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016934 ipv6=yes
16935else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016936 echo "$as_me: program exited with status $ac_status" >&5
16937echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016938sed 's/^/| /' conftest.$ac_ext >&5
16939
Martin v. Löwis11437992002-04-12 09:54:03 +000016940( exit $ac_status )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016941{ echo "$as_me:$LINENO: result: no" >&5
16942echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016943 ipv6=no
16944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016945rm -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 +000016946fi
16947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016948
16949
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016950if test "$ipv6" = "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016951 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16952echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016954/* confdefs.h. */
16955_ACEOF
16956cat confdefs.h >>conftest.$ac_ext
16957cat >>conftest.$ac_ext <<_ACEOF
16958/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016959#include <sys/types.h>
16960#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016961int
16962main ()
16963{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016964struct sockaddr_in6 x;
16965x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 ;
16967 return 0;
16968}
16969_ACEOF
16970rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016971if { (ac_try="$ac_compile"
16972case "(($ac_try" in
16973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16974 *) ac_try_echo=$ac_try;;
16975esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016979 grep -v '^ *+' conftest.er1 >conftest.err
16980 rm -f conftest.er1
16981 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016983 (exit $ac_status); } && {
16984 test -z "$ac_c_werror_flag" ||
16985 test ! -s conftest.err
16986 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016987 { echo "$as_me:$LINENO: result: yes" >&5
16988echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016989 ipv6=yes
16990else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016992sed 's/^/| /' conftest.$ac_ext >&5
16993
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016994 { echo "$as_me:$LINENO: result: no" >&5
16995echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016996 ipv6=no
16997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016998
16999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017000fi
17001
17002if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017003 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017004#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017005_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017006
17007fi
17008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017009fi
17010
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017011
17012ipv6type=unknown
17013ipv6lib=none
17014ipv6trylibc=no
17015
17016if test "$ipv6" = "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017017 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17018echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017019 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17020 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017021 case $i in
17022 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017024/* confdefs.h. */
17025_ACEOF
17026cat confdefs.h >>conftest.$ac_ext
17027cat >>conftest.$ac_ext <<_ACEOF
17028/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017029
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017030#include <netinet/in.h>
17031#ifdef IPV6_INRIA_VERSION
17032yes
17033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017034_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017035if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017036 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017037 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017038fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017039rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017040
17041 ;;
17042 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017044/* confdefs.h. */
17045_ACEOF
17046cat confdefs.h >>conftest.$ac_ext
17047cat >>conftest.$ac_ext <<_ACEOF
17048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017050#include <netinet/in.h>
17051#ifdef __KAME__
17052yes
17053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017056 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017057 ipv6type=$i;
17058 ipv6lib=inet6
17059 ipv6libdir=/usr/local/v6/lib
17060 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017061fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017062rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017063
17064 ;;
17065 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017067/* confdefs.h. */
17068_ACEOF
17069cat confdefs.h >>conftest.$ac_ext
17070cat >>conftest.$ac_ext <<_ACEOF
17071/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017072
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017073#include <features.h>
17074#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17075yes
17076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017077_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017079 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017080 ipv6type=$i;
17081 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017082fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017083rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017084
17085 ;;
17086 linux-inet6)
17087 if test -d /usr/inet6; then
17088 ipv6type=$i
17089 ipv6lib=inet6
17090 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017091 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017092 fi
17093 ;;
17094 solaris)
17095 if test -f /etc/netconfig; then
17096 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17097 ipv6type=$i
17098 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017099 fi
17100 fi
17101 ;;
17102 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017104/* confdefs.h. */
17105_ACEOF
17106cat confdefs.h >>conftest.$ac_ext
17107cat >>conftest.$ac_ext <<_ACEOF
17108/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017109
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017110#include <sys/param.h>
17111#ifdef _TOSHIBA_INET6
17112yes
17113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017114_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017116 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017117 ipv6type=$i;
17118 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017119 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017120fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017121rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017122
17123 ;;
17124 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017126/* confdefs.h. */
17127_ACEOF
17128cat confdefs.h >>conftest.$ac_ext
17129cat >>conftest.$ac_ext <<_ACEOF
17130/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017131
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017132#include </usr/local/v6/include/sys/v6config.h>
17133#ifdef __V6D__
17134yes
17135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017136_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017138 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017139 ipv6type=$i;
17140 ipv6lib=v6;
17141 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017142 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017143fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017144rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017145
17146 ;;
17147 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017149/* confdefs.h. */
17150_ACEOF
17151cat confdefs.h >>conftest.$ac_ext
17152cat >>conftest.$ac_ext <<_ACEOF
17153/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017154
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017155#include <sys/param.h>
17156#ifdef _ZETA_MINAMI_INET6
17157yes
17158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017159_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017161 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017162 ipv6type=$i;
17163 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017164 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017165fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017166rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017167
17168 ;;
17169 esac
17170 if test "$ipv6type" != "unknown"; then
17171 break
17172 fi
17173 done
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017174 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17175echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017176fi
17177
17178if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17179 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17180 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17181 echo "using lib$ipv6lib"
17182 else
17183 if test $ipv6trylibc = "yes"; then
17184 echo "using libc"
17185 else
17186 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17187 echo "You need to fetch lib$ipv6lib.a from appropriate"
17188 echo 'ipv6 kit and compile beforehand.'
17189 exit 1
17190 fi
17191 fi
17192fi
17193
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017194{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17195echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017196cat >conftest.$ac_ext <<_ACEOF
17197/* confdefs.h. */
17198_ACEOF
17199cat confdefs.h >>conftest.$ac_ext
17200cat >>conftest.$ac_ext <<_ACEOF
17201/* end confdefs.h. */
17202#include <Carbon/Carbon.h>
17203int
17204main ()
17205{
17206FSIORefNum fRef = 0
17207 ;
17208 return 0;
17209}
17210_ACEOF
17211rm -f conftest.$ac_objext
17212if { (ac_try="$ac_compile"
17213case "(($ac_try" in
17214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17215 *) ac_try_echo=$ac_try;;
17216esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017218 (eval "$ac_compile") 2>conftest.er1
17219 ac_status=$?
17220 grep -v '^ *+' conftest.er1 >conftest.err
17221 rm -f conftest.er1
17222 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017224 (exit $ac_status); } && {
17225 test -z "$ac_c_werror_flag" ||
17226 test ! -s conftest.err
17227 } && test -s conftest.$ac_objext; then
17228
17229cat >>confdefs.h <<\_ACEOF
17230#define HAVE_OSX105_SDK 1
17231_ACEOF
17232
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017233 { echo "$as_me:$LINENO: result: yes" >&5
17234echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017235else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017236 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017237sed 's/^/| /' conftest.$ac_ext >&5
17238
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017239 { echo "$as_me:$LINENO: result: no" >&5
17240echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017241
17242fi
17243
17244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17245
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017246# Check for --with-doc-strings
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017247{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17248echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017251if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252 withval=$with_doc_strings;
17253fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017254
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017255
17256if test -z "$with_doc_strings"
17257then with_doc_strings="yes"
17258fi
17259if test "$with_doc_strings" != "no"
17260then
17261
17262cat >>confdefs.h <<\_ACEOF
17263#define WITH_DOC_STRINGS 1
17264_ACEOF
17265
17266fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017267{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17268echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017269
Neil Schemenauera35c6882001-02-27 04:45:05 +000017270# Check for Python-specific malloc support
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017271{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17272echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017275if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017277if test "$withval" != no
17278then
17279
17280cat >>confdefs.h <<\_ACEOF
17281#define WITH_TSC 1
17282_ACEOF
17283
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017284 { echo "$as_me:$LINENO: result: yes" >&5
17285echo "${ECHO_T}yes" >&6; }
17286else { echo "$as_me:$LINENO: result: no" >&5
17287echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017288fi
17289else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017290 { echo "$as_me:$LINENO: result: no" >&5
17291echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292fi
17293
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017294
17295# Check for Python-specific malloc support
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017296{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17297echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017300if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301 withval=$with_pymalloc;
17302fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017303
Neil Schemenauera35c6882001-02-27 04:45:05 +000017304
Neil Schemenauer16c22972002-03-22 15:34:49 +000017305if test -z "$with_pymalloc"
17306then with_pymalloc="yes"
17307fi
17308if test "$with_pymalloc" != "no"
17309then
Martin v. Löwis11437992002-04-12 09:54:03 +000017310
17311cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017312#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017313_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017314
17315fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017316{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17317echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017318
Barry Warsawef82cd72000-06-30 16:21:01 +000017319# Check for --with-wctype-functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017320{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17321echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017324if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017326if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017327then
17328
17329cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017330#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017331_ACEOF
17332
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017333 { echo "$as_me:$LINENO: result: yes" >&5
17334echo "${ECHO_T}yes" >&6; }
17335else { echo "$as_me:$LINENO: result: no" >&5
17336echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017337fi
17338else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017339 { echo "$as_me:$LINENO: result: no" >&5
17340echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341fi
17342
Barry Warsawef82cd72000-06-30 16:21:01 +000017343
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017344# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017345
Guido van Rossum98935bf2001-09-05 19:13:16 +000017346DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017347
Guido van Rossume97ee181999-12-20 21:27:22 +000017348# the dlopen() function means we might want to use dynload_shlib.o. some
17349# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017350
Thomas Wouters3a584202000-08-05 23:28:51 +000017351for ac_func in dlopen
17352do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017353as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17354{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17355echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017358else
Martin v. Löwis11437992002-04-12 09:54:03 +000017359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017360/* confdefs.h. */
17361_ACEOF
17362cat confdefs.h >>conftest.$ac_ext
17363cat >>conftest.$ac_ext <<_ACEOF
17364/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017365/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17366 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17367#define $ac_func innocuous_$ac_func
17368
Guido van Rossume97ee181999-12-20 21:27:22 +000017369/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017370 which can conflict with char $ac_func (); below.
17371 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017372 <limits.h> exists even on freestanding compilers. */
17373
17374#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017375# include <limits.h>
17376#else
17377# include <assert.h>
17378#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017379
17380#undef $ac_func
17381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382/* Override any GCC internal prototype to avoid an error.
17383 Use char because int might match the return type of a GCC
17384 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017385#ifdef __cplusplus
17386extern "C"
17387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017388char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017389/* The GNU C library defines this for functions which it implements
17390 to always fail with ENOSYS. Some functions are actually named
17391 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017393choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017394#endif
17395
Skip Montanaro6dead952003-09-25 14:50:04 +000017396int
17397main ()
17398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017400 ;
17401 return 0;
17402}
17403_ACEOF
17404rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405if { (ac_try="$ac_link"
17406case "(($ac_try" in
17407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17408 *) ac_try_echo=$ac_try;;
17409esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017413 grep -v '^ *+' conftest.er1 >conftest.err
17414 rm -f conftest.er1
17415 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417 (exit $ac_status); } && {
17418 test -z "$ac_c_werror_flag" ||
17419 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017420 } && test -s conftest$ac_exeext &&
17421 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017422 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017423else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017425sed 's/^/| /' conftest.$ac_ext >&5
17426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429
17430rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017431 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017432fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017433ac_res=`eval echo '${'$as_ac_var'}'`
17434 { echo "$as_me:$LINENO: result: $ac_res" >&5
17435echo "${ECHO_T}$ac_res" >&6; }
17436if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017437 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017438#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017439_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017440
Guido van Rossume97ee181999-12-20 21:27:22 +000017441fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017442done
Guido van Rossume97ee181999-12-20 21:27:22 +000017443
Michael W. Hudson54241132001-12-07 15:38:26 +000017444
Guido van Rossume97ee181999-12-20 21:27:22 +000017445# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17446# loading of modules.
17447
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017448{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17449echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017450if test -z "$DYNLOADFILE"
17451then
17452 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017453 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17454 if test "$ac_cv_func_dlopen" = yes
17455 then DYNLOADFILE="dynload_shlib.o"
17456 else DYNLOADFILE="dynload_aix.o"
17457 fi
17458 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017459 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017460 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17461 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017462 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017463 *)
17464 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17465 # out any dynamic loading
17466 if test "$ac_cv_func_dlopen" = yes
17467 then DYNLOADFILE="dynload_shlib.o"
17468 else DYNLOADFILE="dynload_stub.o"
17469 fi
17470 ;;
17471 esac
17472fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017473{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17474echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017475if test "$DYNLOADFILE" != "dynload_stub.o"
17476then
Martin v. Löwis11437992002-04-12 09:54:03 +000017477
17478cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017479#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017480_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017481
17482fi
17483
Neil Schemenauer4e425612001-06-19 15:44:15 +000017484# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17485
Michael W. Hudson54241132001-12-07 15:38:26 +000017486
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017487{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17488echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017489if test -z "$MACHDEP_OBJS"
17490then
Jack Jansene578a632001-08-15 01:27:14 +000017491 MACHDEP_OBJS=$extra_machdep_objs
17492else
17493 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017494fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017495{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17496echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017497
Guido van Rossum627b2d71993-12-24 10:39:16 +000017498# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
Martin v. Löwisd6320502004-08-12 13:45:08 +000017570
Martin v. Löwisc3001752005-01-23 09:27:24 +000017571
17572
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017573
17574
Thomas Wouterscf297e42007-02-23 15:07:44 +000017575
17576
Gregory P. Smith25523d22007-09-03 16:44:55 +000017577
Christian Heimes4e30a842007-11-30 22:12:06 +000017578
Martin v. Löwis92fab752008-03-08 10:40:41 +000017579
Martin v. Löwis823725e2008-03-24 13:39:54 +000017580
17581
Benjamin Peterson965ce872009-04-05 21:24:58 +000017582
17583
17584
17585
Martin v. Löwis011e8422009-05-05 04:43:17 +000017586
Martin v. Löwis113a0852009-05-29 17:25:39 +000017587
Martin v. Löwis823725e2008-03-24 13:39:54 +000017588for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17589 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017590 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017591 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000017592 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017593 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017594 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017595 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17596 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017597 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000017598 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017599 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017600 truncate uname unsetenv utimes waitpid wait3 wait4 \
17601 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017602do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017603as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17604{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17605echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017606if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017607 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017608else
Martin v. Löwis11437992002-04-12 09:54:03 +000017609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017610/* confdefs.h. */
17611_ACEOF
17612cat confdefs.h >>conftest.$ac_ext
17613cat >>conftest.$ac_ext <<_ACEOF
17614/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017615/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17616 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17617#define $ac_func innocuous_$ac_func
17618
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017619/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017620 which can conflict with char $ac_func (); below.
17621 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017622 <limits.h> exists even on freestanding compilers. */
17623
17624#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017625# include <limits.h>
17626#else
17627# include <assert.h>
17628#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017629
17630#undef $ac_func
17631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632/* Override any GCC internal prototype to avoid an error.
17633 Use char because int might match the return type of a GCC
17634 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017635#ifdef __cplusplus
17636extern "C"
17637#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017638char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017639/* The GNU C library defines this for functions which it implements
17640 to always fail with ENOSYS. Some functions are actually named
17641 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017643choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017644#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017645
Skip Montanaro6dead952003-09-25 14:50:04 +000017646int
17647main ()
17648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017650 ;
17651 return 0;
17652}
17653_ACEOF
17654rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655if { (ac_try="$ac_link"
17656case "(($ac_try" in
17657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17658 *) ac_try_echo=$ac_try;;
17659esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017661 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017663 grep -v '^ *+' conftest.er1 >conftest.err
17664 rm -f conftest.er1
17665 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667 (exit $ac_status); } && {
17668 test -z "$ac_c_werror_flag" ||
17669 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017670 } && test -s conftest$ac_exeext &&
17671 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017672 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017673else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017675sed 's/^/| /' conftest.$ac_ext >&5
17676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679
17680rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017681 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017682fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017683ac_res=`eval echo '${'$as_ac_var'}'`
17684 { echo "$as_me:$LINENO: result: $ac_res" >&5
17685echo "${ECHO_T}$ac_res" >&6; }
17686if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017687 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017688#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017689_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017690
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017691fi
17692done
17693
Michael W. Hudson54241132001-12-07 15:38:26 +000017694
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017695# For some functions, having a definition is not sufficient, since
17696# we want to take their address.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017697{ echo "$as_me:$LINENO: checking for chroot" >&5
17698echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017700/* confdefs.h. */
17701_ACEOF
17702cat confdefs.h >>conftest.$ac_ext
17703cat >>conftest.$ac_ext <<_ACEOF
17704/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017705#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017706int
17707main ()
17708{
17709void *x=chroot
17710 ;
17711 return 0;
17712}
17713_ACEOF
17714rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715if { (ac_try="$ac_compile"
17716case "(($ac_try" in
17717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17718 *) ac_try_echo=$ac_try;;
17719esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017723 grep -v '^ *+' conftest.er1 >conftest.err
17724 rm -f conftest.er1
17725 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727 (exit $ac_status); } && {
17728 test -z "$ac_c_werror_flag" ||
17729 test ! -s conftest.err
17730 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017731
17732cat >>confdefs.h <<\_ACEOF
17733#define HAVE_CHROOT 1
17734_ACEOF
17735
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017736 { echo "$as_me:$LINENO: result: yes" >&5
17737echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017738else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017740sed 's/^/| /' conftest.$ac_ext >&5
17741
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017742 { echo "$as_me:$LINENO: result: no" >&5
17743echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017744
17745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746
17747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017748{ echo "$as_me:$LINENO: checking for link" >&5
17749echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017750cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017751/* confdefs.h. */
17752_ACEOF
17753cat confdefs.h >>conftest.$ac_ext
17754cat >>conftest.$ac_ext <<_ACEOF
17755/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017756#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017757int
17758main ()
17759{
17760void *x=link
17761 ;
17762 return 0;
17763}
17764_ACEOF
17765rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766if { (ac_try="$ac_compile"
17767case "(($ac_try" in
17768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17769 *) ac_try_echo=$ac_try;;
17770esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017774 grep -v '^ *+' conftest.er1 >conftest.err
17775 rm -f conftest.er1
17776 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017778 (exit $ac_status); } && {
17779 test -z "$ac_c_werror_flag" ||
17780 test ! -s conftest.err
17781 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017782
17783cat >>confdefs.h <<\_ACEOF
17784#define HAVE_LINK 1
17785_ACEOF
17786
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017787 { echo "$as_me:$LINENO: result: yes" >&5
17788echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017789else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017791sed 's/^/| /' conftest.$ac_ext >&5
17792
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017793 { echo "$as_me:$LINENO: result: no" >&5
17794echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017795
17796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797
17798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017799{ echo "$as_me:$LINENO: checking for symlink" >&5
17800echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017801cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017802/* confdefs.h. */
17803_ACEOF
17804cat confdefs.h >>conftest.$ac_ext
17805cat >>conftest.$ac_ext <<_ACEOF
17806/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017807#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017808int
17809main ()
17810{
17811void *x=symlink
17812 ;
17813 return 0;
17814}
17815_ACEOF
17816rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817if { (ac_try="$ac_compile"
17818case "(($ac_try" in
17819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17820 *) ac_try_echo=$ac_try;;
17821esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017825 grep -v '^ *+' conftest.er1 >conftest.err
17826 rm -f conftest.er1
17827 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829 (exit $ac_status); } && {
17830 test -z "$ac_c_werror_flag" ||
17831 test ! -s conftest.err
17832 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017833
17834cat >>confdefs.h <<\_ACEOF
17835#define HAVE_SYMLINK 1
17836_ACEOF
17837
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017838 { echo "$as_me:$LINENO: result: yes" >&5
17839echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017840else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017842sed 's/^/| /' conftest.$ac_ext >&5
17843
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017844 { echo "$as_me:$LINENO: result: no" >&5
17845echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017846
17847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848
17849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017850{ echo "$as_me:$LINENO: checking for fchdir" >&5
17851echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017853/* confdefs.h. */
17854_ACEOF
17855cat confdefs.h >>conftest.$ac_ext
17856cat >>conftest.$ac_ext <<_ACEOF
17857/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017858#include <unistd.h>
17859int
17860main ()
17861{
17862void *x=fchdir
17863 ;
17864 return 0;
17865}
17866_ACEOF
17867rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868if { (ac_try="$ac_compile"
17869case "(($ac_try" in
17870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17871 *) ac_try_echo=$ac_try;;
17872esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017876 grep -v '^ *+' conftest.er1 >conftest.err
17877 rm -f conftest.er1
17878 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880 (exit $ac_status); } && {
17881 test -z "$ac_c_werror_flag" ||
17882 test ! -s conftest.err
17883 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017884
17885cat >>confdefs.h <<\_ACEOF
17886#define HAVE_FCHDIR 1
17887_ACEOF
17888
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017889 { echo "$as_me:$LINENO: result: yes" >&5
17890echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017891else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017893sed 's/^/| /' conftest.$ac_ext >&5
17894
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017895 { echo "$as_me:$LINENO: result: no" >&5
17896echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017897
17898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899
17900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017901{ echo "$as_me:$LINENO: checking for fsync" >&5
17902echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017904/* confdefs.h. */
17905_ACEOF
17906cat confdefs.h >>conftest.$ac_ext
17907cat >>conftest.$ac_ext <<_ACEOF
17908/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017909#include <unistd.h>
17910int
17911main ()
17912{
17913void *x=fsync
17914 ;
17915 return 0;
17916}
17917_ACEOF
17918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017919if { (ac_try="$ac_compile"
17920case "(($ac_try" in
17921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17922 *) ac_try_echo=$ac_try;;
17923esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017927 grep -v '^ *+' conftest.er1 >conftest.err
17928 rm -f conftest.er1
17929 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017931 (exit $ac_status); } && {
17932 test -z "$ac_c_werror_flag" ||
17933 test ! -s conftest.err
17934 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017935
17936cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017937#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017938_ACEOF
17939
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017940 { echo "$as_me:$LINENO: result: yes" >&5
17941echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017942else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017944sed 's/^/| /' conftest.$ac_ext >&5
17945
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017946 { echo "$as_me:$LINENO: result: no" >&5
17947echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017948
17949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017950
17951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017952{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17953echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017954cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017955/* confdefs.h. */
17956_ACEOF
17957cat confdefs.h >>conftest.$ac_ext
17958cat >>conftest.$ac_ext <<_ACEOF
17959/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017960#include <unistd.h>
17961int
17962main ()
17963{
17964void *x=fdatasync
17965 ;
17966 return 0;
17967}
17968_ACEOF
17969rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017970if { (ac_try="$ac_compile"
17971case "(($ac_try" in
17972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17973 *) ac_try_echo=$ac_try;;
17974esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017978 grep -v '^ *+' conftest.er1 >conftest.err
17979 rm -f conftest.er1
17980 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982 (exit $ac_status); } && {
17983 test -z "$ac_c_werror_flag" ||
17984 test ! -s conftest.err
17985 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017986
17987cat >>confdefs.h <<\_ACEOF
17988#define HAVE_FDATASYNC 1
17989_ACEOF
17990
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017991 { echo "$as_me:$LINENO: result: yes" >&5
17992echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017993else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017995sed 's/^/| /' conftest.$ac_ext >&5
17996
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017997 { echo "$as_me:$LINENO: result: no" >&5
17998echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017999
18000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018001
18002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018003{ echo "$as_me:$LINENO: checking for epoll" >&5
18004echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018005cat >conftest.$ac_ext <<_ACEOF
18006/* confdefs.h. */
18007_ACEOF
18008cat confdefs.h >>conftest.$ac_ext
18009cat >>conftest.$ac_ext <<_ACEOF
18010/* end confdefs.h. */
18011#include <sys/epoll.h>
18012int
18013main ()
18014{
18015void *x=epoll_create
18016 ;
18017 return 0;
18018}
18019_ACEOF
18020rm -f conftest.$ac_objext
18021if { (ac_try="$ac_compile"
18022case "(($ac_try" in
18023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18024 *) ac_try_echo=$ac_try;;
18025esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018027 (eval "$ac_compile") 2>conftest.er1
18028 ac_status=$?
18029 grep -v '^ *+' conftest.er1 >conftest.err
18030 rm -f conftest.er1
18031 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018033 (exit $ac_status); } && {
18034 test -z "$ac_c_werror_flag" ||
18035 test ! -s conftest.err
18036 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018037
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018038cat >>confdefs.h <<\_ACEOF
18039#define HAVE_EPOLL 1
18040_ACEOF
18041
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018042 { echo "$as_me:$LINENO: result: yes" >&5
18043echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018044else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018045 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018046sed 's/^/| /' conftest.$ac_ext >&5
18047
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018048 { echo "$as_me:$LINENO: result: no" >&5
18049echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018050
18051fi
18052
18053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018054{ echo "$as_me:$LINENO: checking for kqueue" >&5
18055echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018056cat >conftest.$ac_ext <<_ACEOF
18057/* confdefs.h. */
18058_ACEOF
18059cat confdefs.h >>conftest.$ac_ext
18060cat >>conftest.$ac_ext <<_ACEOF
18061/* end confdefs.h. */
18062
18063#include <sys/types.h>
18064#include <sys/event.h>
18065
18066int
18067main ()
18068{
18069int x=kqueue()
18070 ;
18071 return 0;
18072}
18073_ACEOF
18074rm -f conftest.$ac_objext
18075if { (ac_try="$ac_compile"
18076case "(($ac_try" in
18077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18078 *) ac_try_echo=$ac_try;;
18079esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018081 (eval "$ac_compile") 2>conftest.er1
18082 ac_status=$?
18083 grep -v '^ *+' conftest.er1 >conftest.err
18084 rm -f conftest.er1
18085 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018087 (exit $ac_status); } && {
18088 test -z "$ac_c_werror_flag" ||
18089 test ! -s conftest.err
18090 } && test -s conftest.$ac_objext; then
18091
18092cat >>confdefs.h <<\_ACEOF
18093#define HAVE_KQUEUE 1
18094_ACEOF
18095
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018096 { echo "$as_me:$LINENO: result: yes" >&5
18097echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018098else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018099 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018100sed 's/^/| /' conftest.$ac_ext >&5
18101
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018102 { echo "$as_me:$LINENO: result: no" >&5
18103echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018104
18105fi
18106
18107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018108# On some systems (eg. FreeBSD 5), we would find a definition of the
18109# functions ctermid_r, setgroups in the library, but no prototype
18110# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18111# address to avoid compiler warnings and potential miscompilations
18112# because of the missing prototypes.
18113
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018114{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18115echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018116cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018117/* confdefs.h. */
18118_ACEOF
18119cat confdefs.h >>conftest.$ac_ext
18120cat >>conftest.$ac_ext <<_ACEOF
18121/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018122
18123#include "confdefs.h"
18124#include <stdio.h>
18125
Martin v. Löwisd5843682002-11-21 20:41:28 +000018126int
18127main ()
18128{
18129void* p = ctermid_r
18130 ;
18131 return 0;
18132}
18133_ACEOF
18134rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018135if { (ac_try="$ac_compile"
18136case "(($ac_try" in
18137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18138 *) ac_try_echo=$ac_try;;
18139esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018143 grep -v '^ *+' conftest.er1 >conftest.err
18144 rm -f conftest.er1
18145 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147 (exit $ac_status); } && {
18148 test -z "$ac_c_werror_flag" ||
18149 test ! -s conftest.err
18150 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018151
18152cat >>confdefs.h <<\_ACEOF
18153#define HAVE_CTERMID_R 1
18154_ACEOF
18155
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018156 { echo "$as_me:$LINENO: result: yes" >&5
18157echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018158else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018160sed 's/^/| /' conftest.$ac_ext >&5
18161
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018162 { echo "$as_me:$LINENO: result: no" >&5
18163echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018164
18165fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18168
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018169{ echo "$as_me:$LINENO: checking for flock" >&5
18170echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018172/* confdefs.h. */
18173_ACEOF
18174cat confdefs.h >>conftest.$ac_ext
18175cat >>conftest.$ac_ext <<_ACEOF
18176/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018177
18178#include "confdefs.h"
18179#include <sys/file.h>
18180
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018181int
18182main ()
18183{
18184void* p = flock
18185 ;
18186 return 0;
18187}
18188_ACEOF
18189rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018190if { (ac_try="$ac_compile"
18191case "(($ac_try" in
18192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18193 *) ac_try_echo=$ac_try;;
18194esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018198 grep -v '^ *+' conftest.er1 >conftest.err
18199 rm -f conftest.er1
18200 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018202 (exit $ac_status); } && {
18203 test -z "$ac_c_werror_flag" ||
18204 test ! -s conftest.err
18205 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018206
18207cat >>confdefs.h <<\_ACEOF
18208#define HAVE_FLOCK 1
18209_ACEOF
18210
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018211 { echo "$as_me:$LINENO: result: yes" >&5
18212echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018213else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018215sed 's/^/| /' conftest.$ac_ext >&5
18216
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018217 { echo "$as_me:$LINENO: result: no" >&5
18218echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018219
18220fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18223
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018224{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18225echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018226cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018227/* confdefs.h. */
18228_ACEOF
18229cat confdefs.h >>conftest.$ac_ext
18230cat >>conftest.$ac_ext <<_ACEOF
18231/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018232
18233#include "confdefs.h"
18234#include <unistd.h>
18235
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018236int
18237main ()
18238{
18239void* p = getpagesize
18240 ;
18241 return 0;
18242}
18243_ACEOF
18244rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018245if { (ac_try="$ac_compile"
18246case "(($ac_try" in
18247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18248 *) ac_try_echo=$ac_try;;
18249esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018253 grep -v '^ *+' conftest.er1 >conftest.err
18254 rm -f conftest.er1
18255 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018257 (exit $ac_status); } && {
18258 test -z "$ac_c_werror_flag" ||
18259 test ! -s conftest.err
18260 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018261
18262cat >>confdefs.h <<\_ACEOF
18263#define HAVE_GETPAGESIZE 1
18264_ACEOF
18265
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018266 { echo "$as_me:$LINENO: result: yes" >&5
18267echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018268else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018270sed 's/^/| /' conftest.$ac_ext >&5
18271
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018272 { echo "$as_me:$LINENO: result: no" >&5
18273echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018274
18275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018276
18277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018278
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018279for ac_prog in true
18280do
18281 # Extract the first word of "$ac_prog", so it can be a program name with args.
18282set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018283{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18284echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018285if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018286 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018287else
18288 if test -n "$TRUE"; then
18289 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18290else
18291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18292for as_dir in $PATH
18293do
18294 IFS=$as_save_IFS
18295 test -z "$as_dir" && as_dir=.
18296 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018297 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 +000018298 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018299 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018300 break 2
18301 fi
18302done
18303done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018304IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018305
18306fi
18307fi
18308TRUE=$ac_cv_prog_TRUE
18309if test -n "$TRUE"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018310 { echo "$as_me:$LINENO: result: $TRUE" >&5
18311echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018312else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018313 { echo "$as_me:$LINENO: result: no" >&5
18314echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018315fi
18316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018318 test -n "$TRUE" && break
18319done
18320test -n "$TRUE" || TRUE="/bin/true"
18321
18322
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018323{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18324echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018325if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018327else
18328 ac_check_lib_save_LIBS=$LIBS
18329LIBS="-lc $LIBS"
18330cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018331/* confdefs.h. */
18332_ACEOF
18333cat confdefs.h >>conftest.$ac_ext
18334cat >>conftest.$ac_ext <<_ACEOF
18335/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018337/* Override any GCC internal prototype to avoid an error.
18338 Use char because int might match the return type of a GCC
18339 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018340#ifdef __cplusplus
18341extern "C"
18342#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018343char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018344int
18345main ()
18346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018348 ;
18349 return 0;
18350}
18351_ACEOF
18352rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018353if { (ac_try="$ac_link"
18354case "(($ac_try" in
18355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18356 *) ac_try_echo=$ac_try;;
18357esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018359 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018361 grep -v '^ *+' conftest.er1 >conftest.err
18362 rm -f conftest.er1
18363 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018365 (exit $ac_status); } && {
18366 test -z "$ac_c_werror_flag" ||
18367 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018368 } && test -s conftest$ac_exeext &&
18369 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018370 ac_cv_lib_c_inet_aton=yes
18371else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018373sed 's/^/| /' conftest.$ac_ext >&5
18374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018375 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377
18378rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018379 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018380LIBS=$ac_check_lib_save_LIBS
18381fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018382{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18383echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18384if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018385 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018386else
18387
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018388{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18389echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018390if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018392else
18393 ac_check_lib_save_LIBS=$LIBS
18394LIBS="-lresolv $LIBS"
18395cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018396/* confdefs.h. */
18397_ACEOF
18398cat confdefs.h >>conftest.$ac_ext
18399cat >>conftest.$ac_ext <<_ACEOF
18400/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402/* Override any GCC internal prototype to avoid an error.
18403 Use char because int might match the return type of a GCC
18404 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018405#ifdef __cplusplus
18406extern "C"
18407#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018408char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018409int
18410main ()
18411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018412return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018413 ;
18414 return 0;
18415}
18416_ACEOF
18417rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018418if { (ac_try="$ac_link"
18419case "(($ac_try" in
18420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18421 *) ac_try_echo=$ac_try;;
18422esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018424 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018426 grep -v '^ *+' conftest.er1 >conftest.err
18427 rm -f conftest.er1
18428 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430 (exit $ac_status); } && {
18431 test -z "$ac_c_werror_flag" ||
18432 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018433 } && test -s conftest$ac_exeext &&
18434 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018435 ac_cv_lib_resolv_inet_aton=yes
18436else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018438sed 's/^/| /' conftest.$ac_ext >&5
18439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442
18443rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018444 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018445LIBS=$ac_check_lib_save_LIBS
18446fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018447{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18448echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18449if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018450 cat >>confdefs.h <<_ACEOF
18451#define HAVE_LIBRESOLV 1
18452_ACEOF
18453
18454 LIBS="-lresolv $LIBS"
18455
18456fi
18457
18458
18459fi
18460
18461
Christian Heimesd0764e22007-12-04 15:00:33 +000018462# On Tru64, chflags seems to be present, but calling it will
18463# exit Python
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018464{ echo "$as_me:$LINENO: checking for chflags" >&5
18465echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018466if test "${ac_cv_have_chflags+set}" = set; then
18467 echo $ECHO_N "(cached) $ECHO_C" >&6
18468else
18469 if test "$cross_compiling" = yes; then
18470 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018471else
18472 cat >conftest.$ac_ext <<_ACEOF
18473/* confdefs.h. */
18474_ACEOF
18475cat confdefs.h >>conftest.$ac_ext
18476cat >>conftest.$ac_ext <<_ACEOF
18477/* end confdefs.h. */
18478
18479#include <sys/stat.h>
18480#include <unistd.h>
18481int main(int argc, char*argv[])
18482{
18483 if(chflags(argv[0], 0) != 0)
18484 return 1;
18485 return 0;
18486}
18487
18488_ACEOF
18489rm -f conftest$ac_exeext
18490if { (ac_try="$ac_link"
18491case "(($ac_try" in
18492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18493 *) ac_try_echo=$ac_try;;
18494esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018496 (eval "$ac_link") 2>&5
18497 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018499 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18500 { (case "(($ac_try" in
18501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18502 *) ac_try_echo=$ac_try;;
18503esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018505 (eval "$ac_try") 2>&5
18506 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018508 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018509 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018510else
18511 echo "$as_me: program exited with status $ac_status" >&5
18512echo "$as_me: failed program was:" >&5
18513sed 's/^/| /' conftest.$ac_ext >&5
18514
18515( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018516ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018517fi
18518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018519fi
18520
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018521
18522
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018523fi
18524
18525{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18526echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
18527if test $ac_cv_have_chflags = yes
18528then
18529
18530cat >>confdefs.h <<\_ACEOF
18531#define HAVE_CHFLAGS 1
18532_ACEOF
18533
18534fi
18535
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018536{ echo "$as_me:$LINENO: checking for lchflags" >&5
18537echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018538if test "${ac_cv_have_lchflags+set}" = set; then
18539 echo $ECHO_N "(cached) $ECHO_C" >&6
18540else
18541 if test "$cross_compiling" = yes; then
18542 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018543else
18544 cat >conftest.$ac_ext <<_ACEOF
18545/* confdefs.h. */
18546_ACEOF
18547cat confdefs.h >>conftest.$ac_ext
18548cat >>conftest.$ac_ext <<_ACEOF
18549/* end confdefs.h. */
18550
18551#include <sys/stat.h>
18552#include <unistd.h>
18553int main(int argc, char*argv[])
18554{
18555 if(lchflags(argv[0], 0) != 0)
18556 return 1;
18557 return 0;
18558}
18559
18560_ACEOF
18561rm -f conftest$ac_exeext
18562if { (ac_try="$ac_link"
18563case "(($ac_try" in
18564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18565 *) ac_try_echo=$ac_try;;
18566esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018568 (eval "$ac_link") 2>&5
18569 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018571 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18572 { (case "(($ac_try" in
18573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18574 *) ac_try_echo=$ac_try;;
18575esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018577 (eval "$ac_try") 2>&5
18578 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018580 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018581 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018582else
18583 echo "$as_me: program exited with status $ac_status" >&5
18584echo "$as_me: failed program was:" >&5
18585sed 's/^/| /' conftest.$ac_ext >&5
18586
18587( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018588ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018589fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18591fi
18592
18593
Christian Heimesd0764e22007-12-04 15:00:33 +000018594
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018595fi
18596
18597{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18598echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
18599if test $ac_cv_have_lchflags = yes
18600then
18601
18602cat >>confdefs.h <<\_ACEOF
18603#define HAVE_LCHFLAGS 1
18604_ACEOF
18605
18606fi
18607
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018608case $ac_sys_system/$ac_sys_release in
18609Darwin/*)
18610 _CUR_CFLAGS="${CFLAGS}"
18611 _CUR_LDFLAGS="${LDFLAGS}"
18612 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18613 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18614 ;;
18615esac
18616
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018617{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18618echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018619if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018620 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018621else
18622 ac_check_lib_save_LIBS=$LIBS
18623LIBS="-lz $LIBS"
18624cat >conftest.$ac_ext <<_ACEOF
18625/* confdefs.h. */
18626_ACEOF
18627cat confdefs.h >>conftest.$ac_ext
18628cat >>conftest.$ac_ext <<_ACEOF
18629/* end confdefs.h. */
18630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631/* Override any GCC internal prototype to avoid an error.
18632 Use char because int might match the return type of a GCC
18633 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018634#ifdef __cplusplus
18635extern "C"
18636#endif
18637char inflateCopy ();
18638int
18639main ()
18640{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018641return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018642 ;
18643 return 0;
18644}
18645_ACEOF
18646rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018647if { (ac_try="$ac_link"
18648case "(($ac_try" in
18649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18650 *) ac_try_echo=$ac_try;;
18651esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018653 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018654 ac_status=$?
18655 grep -v '^ *+' conftest.er1 >conftest.err
18656 rm -f conftest.er1
18657 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018659 (exit $ac_status); } && {
18660 test -z "$ac_c_werror_flag" ||
18661 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018662 } && test -s conftest$ac_exeext &&
18663 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018664 ac_cv_lib_z_inflateCopy=yes
18665else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018666 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018667sed 's/^/| /' conftest.$ac_ext >&5
18668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018669 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018671
18672rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018673 conftest$ac_exeext conftest.$ac_ext
18674LIBS=$ac_check_lib_save_LIBS
18675fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018676{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18677echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18678if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018679
18680cat >>confdefs.h <<\_ACEOF
18681#define HAVE_ZLIB_COPY 1
18682_ACEOF
18683
18684fi
18685
18686
18687case $ac_sys_system/$ac_sys_release in
18688Darwin/*)
18689 CFLAGS="${_CUR_CFLAGS}"
18690 LDFLAGS="${_CUR_LDFLAGS}"
18691 ;;
18692esac
18693
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018694{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18695echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018696cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018697/* confdefs.h. */
18698_ACEOF
18699cat confdefs.h >>conftest.$ac_ext
18700cat >>conftest.$ac_ext <<_ACEOF
18701/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018702
18703#include "confdefs.h"
18704#include <netdb.h>
18705
Martin v. Löwise9416172003-05-03 10:12:45 +000018706int
18707main ()
18708{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018709void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018710 ;
18711 return 0;
18712}
18713_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018714rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018715if { (ac_try="$ac_link"
18716case "(($ac_try" in
18717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18718 *) ac_try_echo=$ac_try;;
18719esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018721 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018723 grep -v '^ *+' conftest.er1 >conftest.err
18724 rm -f conftest.er1
18725 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018727 (exit $ac_status); } && {
18728 test -z "$ac_c_werror_flag" ||
18729 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018730 } && test -s conftest$ac_exeext &&
18731 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018732
18733cat >>confdefs.h <<\_ACEOF
18734#define HAVE_HSTRERROR 1
18735_ACEOF
18736
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018737 { echo "$as_me:$LINENO: result: yes" >&5
18738echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018739else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018741sed 's/^/| /' conftest.$ac_ext >&5
18742
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018743 { echo "$as_me:$LINENO: result: no" >&5
18744echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018745
18746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018747
18748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018750
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018751{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18752echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018754/* confdefs.h. */
18755_ACEOF
18756cat confdefs.h >>conftest.$ac_ext
18757cat >>conftest.$ac_ext <<_ACEOF
18758/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018759
18760#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018761#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018762#include <sys/socket.h>
18763#include <netinet/in.h>
18764#include <arpa/inet.h>
18765
Martin v. Löwise9416172003-05-03 10:12:45 +000018766int
18767main ()
18768{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018769void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018770 ;
18771 return 0;
18772}
18773_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018774rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018775if { (ac_try="$ac_link"
18776case "(($ac_try" in
18777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18778 *) ac_try_echo=$ac_try;;
18779esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018781 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018783 grep -v '^ *+' conftest.er1 >conftest.err
18784 rm -f conftest.er1
18785 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018787 (exit $ac_status); } && {
18788 test -z "$ac_c_werror_flag" ||
18789 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018790 } && test -s conftest$ac_exeext &&
18791 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018792
18793cat >>confdefs.h <<\_ACEOF
18794#define HAVE_INET_ATON 1
18795_ACEOF
18796
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018797 { echo "$as_me:$LINENO: result: yes" >&5
18798echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018799else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018801sed 's/^/| /' conftest.$ac_ext >&5
18802
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018803 { echo "$as_me:$LINENO: result: no" >&5
18804echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018805
18806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018807
18808rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018809 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018810
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018811{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18812echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018813cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018814/* confdefs.h. */
18815_ACEOF
18816cat confdefs.h >>conftest.$ac_ext
18817cat >>conftest.$ac_ext <<_ACEOF
18818/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018819
18820#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018821#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018822#include <sys/socket.h>
18823#include <netinet/in.h>
18824#include <arpa/inet.h>
18825
Martin v. Löwise9416172003-05-03 10:12:45 +000018826int
18827main ()
18828{
18829void* p = inet_pton
18830 ;
18831 return 0;
18832}
18833_ACEOF
18834rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018835if { (ac_try="$ac_compile"
18836case "(($ac_try" in
18837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18838 *) ac_try_echo=$ac_try;;
18839esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018843 grep -v '^ *+' conftest.er1 >conftest.err
18844 rm -f conftest.er1
18845 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018847 (exit $ac_status); } && {
18848 test -z "$ac_c_werror_flag" ||
18849 test ! -s conftest.err
18850 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018851
18852cat >>confdefs.h <<\_ACEOF
18853#define HAVE_INET_PTON 1
18854_ACEOF
18855
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018856 { echo "$as_me:$LINENO: result: yes" >&5
18857echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018858else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018860sed 's/^/| /' conftest.$ac_ext >&5
18861
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018862 { echo "$as_me:$LINENO: result: no" >&5
18863echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018864
18865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018866
18867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018868
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018869# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018870{ echo "$as_me:$LINENO: checking for setgroups" >&5
18871echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018872cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018873/* confdefs.h. */
18874_ACEOF
18875cat confdefs.h >>conftest.$ac_ext
18876cat >>conftest.$ac_ext <<_ACEOF
18877/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018878
18879#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018880#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018881#ifdef HAVE_GRP_H
18882#include <grp.h>
18883#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018884
Martin v. Löwisd5843682002-11-21 20:41:28 +000018885int
18886main ()
18887{
18888void* p = setgroups
18889 ;
18890 return 0;
18891}
18892_ACEOF
18893rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018894if { (ac_try="$ac_compile"
18895case "(($ac_try" in
18896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18897 *) ac_try_echo=$ac_try;;
18898esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018902 grep -v '^ *+' conftest.er1 >conftest.err
18903 rm -f conftest.er1
18904 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018906 (exit $ac_status); } && {
18907 test -z "$ac_c_werror_flag" ||
18908 test ! -s conftest.err
18909 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018910
18911cat >>confdefs.h <<\_ACEOF
18912#define HAVE_SETGROUPS 1
18913_ACEOF
18914
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018915 { echo "$as_me:$LINENO: result: yes" >&5
18916echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018917else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018919sed 's/^/| /' conftest.$ac_ext >&5
18920
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018921 { echo "$as_me:$LINENO: result: no" >&5
18922echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018923
18924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018925
18926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018927
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018928# check for openpty and forkpty
18929
Martin v. Löwis11437992002-04-12 09:54:03 +000018930
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018931for ac_func in openpty
18932do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018933as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18934{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18935echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018936if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018937 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018938else
Martin v. Löwis11437992002-04-12 09:54:03 +000018939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018940/* confdefs.h. */
18941_ACEOF
18942cat confdefs.h >>conftest.$ac_ext
18943cat >>conftest.$ac_ext <<_ACEOF
18944/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018945/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18946 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18947#define $ac_func innocuous_$ac_func
18948
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018949/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018950 which can conflict with char $ac_func (); below.
18951 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018952 <limits.h> exists even on freestanding compilers. */
18953
18954#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018955# include <limits.h>
18956#else
18957# include <assert.h>
18958#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018959
18960#undef $ac_func
18961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018962/* Override any GCC internal prototype to avoid an error.
18963 Use char because int might match the return type of a GCC
18964 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018965#ifdef __cplusplus
18966extern "C"
18967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018968char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018969/* The GNU C library defines this for functions which it implements
18970 to always fail with ENOSYS. Some functions are actually named
18971 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018972#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018973choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018974#endif
18975
Skip Montanaro6dead952003-09-25 14:50:04 +000018976int
18977main ()
18978{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018979return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018980 ;
18981 return 0;
18982}
18983_ACEOF
18984rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018985if { (ac_try="$ac_link"
18986case "(($ac_try" in
18987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18988 *) ac_try_echo=$ac_try;;
18989esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018991 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018993 grep -v '^ *+' conftest.er1 >conftest.err
18994 rm -f conftest.er1
18995 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018997 (exit $ac_status); } && {
18998 test -z "$ac_c_werror_flag" ||
18999 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019000 } && test -s conftest$ac_exeext &&
19001 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019002 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019003else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019005sed 's/^/| /' conftest.$ac_ext >&5
19006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019007 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019009
19010rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019011 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019012fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019013ac_res=`eval echo '${'$as_ac_var'}'`
19014 { echo "$as_me:$LINENO: result: $ac_res" >&5
19015echo "${ECHO_T}$ac_res" >&6; }
19016if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019017 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019018#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019019_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019020
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019021else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019022 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19023echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019024if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019025 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019026else
Martin v. Löwis11437992002-04-12 09:54:03 +000019027 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019028LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019030/* confdefs.h. */
19031_ACEOF
19032cat confdefs.h >>conftest.$ac_ext
19033cat >>conftest.$ac_ext <<_ACEOF
19034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019036/* Override any GCC internal prototype to avoid an error.
19037 Use char because int might match the return type of a GCC
19038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019039#ifdef __cplusplus
19040extern "C"
19041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019042char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019043int
19044main ()
19045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019046return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019047 ;
19048 return 0;
19049}
19050_ACEOF
19051rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019052if { (ac_try="$ac_link"
19053case "(($ac_try" in
19054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19055 *) ac_try_echo=$ac_try;;
19056esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019058 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019060 grep -v '^ *+' conftest.er1 >conftest.err
19061 rm -f conftest.er1
19062 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019064 (exit $ac_status); } && {
19065 test -z "$ac_c_werror_flag" ||
19066 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019067 } && test -s conftest$ac_exeext &&
19068 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019069 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019070else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019072sed 's/^/| /' conftest.$ac_ext >&5
19073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019074 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019076
19077rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019079LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019080fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019081{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19082echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19083if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019084 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019085#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019086_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019087 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019088else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019089 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19090echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019091if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019092 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019093else
19094 ac_check_lib_save_LIBS=$LIBS
19095LIBS="-lbsd $LIBS"
19096cat >conftest.$ac_ext <<_ACEOF
19097/* confdefs.h. */
19098_ACEOF
19099cat confdefs.h >>conftest.$ac_ext
19100cat >>conftest.$ac_ext <<_ACEOF
19101/* end confdefs.h. */
19102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019103/* Override any GCC internal prototype to avoid an error.
19104 Use char because int might match the return type of a GCC
19105 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019106#ifdef __cplusplus
19107extern "C"
19108#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019109char openpty ();
19110int
19111main ()
19112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019113return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019114 ;
19115 return 0;
19116}
19117_ACEOF
19118rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019119if { (ac_try="$ac_link"
19120case "(($ac_try" in
19121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19122 *) ac_try_echo=$ac_try;;
19123esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019125 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019126 ac_status=$?
19127 grep -v '^ *+' conftest.er1 >conftest.err
19128 rm -f conftest.er1
19129 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019131 (exit $ac_status); } && {
19132 test -z "$ac_c_werror_flag" ||
19133 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019134 } && test -s conftest$ac_exeext &&
19135 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019136 ac_cv_lib_bsd_openpty=yes
19137else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019138 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019139sed 's/^/| /' conftest.$ac_ext >&5
19140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019141 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019143
19144rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019145 conftest$ac_exeext conftest.$ac_ext
19146LIBS=$ac_check_lib_save_LIBS
19147fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019148{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19149echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19150if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019151 cat >>confdefs.h <<\_ACEOF
19152#define HAVE_OPENPTY 1
19153_ACEOF
19154 LIBS="$LIBS -lbsd"
19155fi
19156
19157
19158fi
19159
Fred Drake8cef4cf2000-06-28 16:40:38 +000019160
19161fi
19162done
19163
Martin v. Löwis11437992002-04-12 09:54:03 +000019164
Fred Drake8cef4cf2000-06-28 16:40:38 +000019165for ac_func in forkpty
19166do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019167as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19168{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19169echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019170if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019171 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019172else
Martin v. Löwis11437992002-04-12 09:54:03 +000019173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019174/* confdefs.h. */
19175_ACEOF
19176cat confdefs.h >>conftest.$ac_ext
19177cat >>conftest.$ac_ext <<_ACEOF
19178/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019179/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19181#define $ac_func innocuous_$ac_func
19182
Fred Drake8cef4cf2000-06-28 16:40:38 +000019183/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019184 which can conflict with char $ac_func (); below.
19185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019186 <limits.h> exists even on freestanding compilers. */
19187
19188#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019189# include <limits.h>
19190#else
19191# include <assert.h>
19192#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019193
19194#undef $ac_func
19195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019196/* Override any GCC internal prototype to avoid an error.
19197 Use char because int might match the return type of a GCC
19198 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019199#ifdef __cplusplus
19200extern "C"
19201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019202char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019203/* The GNU C library defines this for functions which it implements
19204 to always fail with ENOSYS. Some functions are actually named
19205 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019206#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019207choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019208#endif
19209
Skip Montanaro6dead952003-09-25 14:50:04 +000019210int
19211main ()
19212{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019213return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019214 ;
19215 return 0;
19216}
19217_ACEOF
19218rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019219if { (ac_try="$ac_link"
19220case "(($ac_try" in
19221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19222 *) ac_try_echo=$ac_try;;
19223esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019225 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019227 grep -v '^ *+' conftest.er1 >conftest.err
19228 rm -f conftest.er1
19229 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019231 (exit $ac_status); } && {
19232 test -z "$ac_c_werror_flag" ||
19233 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019234 } && test -s conftest$ac_exeext &&
19235 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019236 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019237else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019239sed 's/^/| /' conftest.$ac_ext >&5
19240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019241 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019243
19244rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019245 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019246fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019247ac_res=`eval echo '${'$as_ac_var'}'`
19248 { echo "$as_me:$LINENO: result: $ac_res" >&5
19249echo "${ECHO_T}$ac_res" >&6; }
19250if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019251 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019252#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019253_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019254
Fred Drake8cef4cf2000-06-28 16:40:38 +000019255else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019256 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19257echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019258if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019259 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019260else
Martin v. Löwis11437992002-04-12 09:54:03 +000019261 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019262LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019263cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019264/* confdefs.h. */
19265_ACEOF
19266cat confdefs.h >>conftest.$ac_ext
19267cat >>conftest.$ac_ext <<_ACEOF
19268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019270/* Override any GCC internal prototype to avoid an error.
19271 Use char because int might match the return type of a GCC
19272 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019273#ifdef __cplusplus
19274extern "C"
19275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019276char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019277int
19278main ()
19279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019280return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019281 ;
19282 return 0;
19283}
19284_ACEOF
19285rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019286if { (ac_try="$ac_link"
19287case "(($ac_try" in
19288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19289 *) ac_try_echo=$ac_try;;
19290esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019292 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019294 grep -v '^ *+' conftest.er1 >conftest.err
19295 rm -f conftest.er1
19296 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019298 (exit $ac_status); } && {
19299 test -z "$ac_c_werror_flag" ||
19300 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019301 } && test -s conftest$ac_exeext &&
19302 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019303 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019304else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019306sed 's/^/| /' conftest.$ac_ext >&5
19307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019308 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019310
19311rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019312 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019313LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019314fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019315{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19316echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19317if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019318 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019319#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019320_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019321 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019322else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019323 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19324echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019325if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019327else
19328 ac_check_lib_save_LIBS=$LIBS
19329LIBS="-lbsd $LIBS"
19330cat >conftest.$ac_ext <<_ACEOF
19331/* confdefs.h. */
19332_ACEOF
19333cat confdefs.h >>conftest.$ac_ext
19334cat >>conftest.$ac_ext <<_ACEOF
19335/* end confdefs.h. */
19336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019337/* Override any GCC internal prototype to avoid an error.
19338 Use char because int might match the return type of a GCC
19339 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019340#ifdef __cplusplus
19341extern "C"
19342#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019343char forkpty ();
19344int
19345main ()
19346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019347return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019348 ;
19349 return 0;
19350}
19351_ACEOF
19352rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019353if { (ac_try="$ac_link"
19354case "(($ac_try" in
19355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19356 *) ac_try_echo=$ac_try;;
19357esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019359 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019360 ac_status=$?
19361 grep -v '^ *+' conftest.er1 >conftest.err
19362 rm -f conftest.er1
19363 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019365 (exit $ac_status); } && {
19366 test -z "$ac_c_werror_flag" ||
19367 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019368 } && test -s conftest$ac_exeext &&
19369 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019370 ac_cv_lib_bsd_forkpty=yes
19371else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019372 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019373sed 's/^/| /' conftest.$ac_ext >&5
19374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019375 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019377
19378rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019379 conftest$ac_exeext conftest.$ac_ext
19380LIBS=$ac_check_lib_save_LIBS
19381fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019382{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19383echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19384if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019385 cat >>confdefs.h <<\_ACEOF
19386#define HAVE_FORKPTY 1
19387_ACEOF
19388 LIBS="$LIBS -lbsd"
19389fi
19390
19391
19392fi
19393
Fred Drake8cef4cf2000-06-28 16:40:38 +000019394
19395fi
19396done
19397
Jack Jansendd19cf82001-12-06 22:36:17 +000019398
Christian Heimesb186d002008-03-18 15:15:01 +000019399# Stuff for expat.
19400
19401for ac_func in memmove
19402do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019403as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19404{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19405echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019406if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019407 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019408else
19409 cat >conftest.$ac_ext <<_ACEOF
19410/* confdefs.h. */
19411_ACEOF
19412cat confdefs.h >>conftest.$ac_ext
19413cat >>conftest.$ac_ext <<_ACEOF
19414/* end confdefs.h. */
19415/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19416 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19417#define $ac_func innocuous_$ac_func
19418
19419/* System header to define __stub macros and hopefully few prototypes,
19420 which can conflict with char $ac_func (); below.
19421 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19422 <limits.h> exists even on freestanding compilers. */
19423
19424#ifdef __STDC__
19425# include <limits.h>
19426#else
19427# include <assert.h>
19428#endif
19429
19430#undef $ac_func
19431
19432/* Override any GCC internal prototype to avoid an error.
19433 Use char because int might match the return type of a GCC
19434 builtin and then its argument prototype would still apply. */
19435#ifdef __cplusplus
19436extern "C"
19437#endif
19438char $ac_func ();
19439/* The GNU C library defines this for functions which it implements
19440 to always fail with ENOSYS. Some functions are actually named
19441 something starting with __ and the normal name is an alias. */
19442#if defined __stub_$ac_func || defined __stub___$ac_func
19443choke me
19444#endif
19445
19446int
19447main ()
19448{
19449return $ac_func ();
19450 ;
19451 return 0;
19452}
19453_ACEOF
19454rm -f conftest.$ac_objext conftest$ac_exeext
19455if { (ac_try="$ac_link"
19456case "(($ac_try" in
19457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19458 *) ac_try_echo=$ac_try;;
19459esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019461 (eval "$ac_link") 2>conftest.er1
19462 ac_status=$?
19463 grep -v '^ *+' conftest.er1 >conftest.err
19464 rm -f conftest.er1
19465 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019467 (exit $ac_status); } && {
19468 test -z "$ac_c_werror_flag" ||
19469 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019470 } && test -s conftest$ac_exeext &&
19471 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019472 eval "$as_ac_var=yes"
19473else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019474 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019475sed 's/^/| /' conftest.$ac_ext >&5
19476
19477 eval "$as_ac_var=no"
19478fi
19479
19480rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19481 conftest$ac_exeext conftest.$ac_ext
19482fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019483ac_res=`eval echo '${'$as_ac_var'}'`
19484 { echo "$as_me:$LINENO: result: $ac_res" >&5
19485echo "${ECHO_T}$ac_res" >&6; }
19486if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019487 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019488#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019489_ACEOF
19490
19491fi
19492done
19493
19494
Michael W. Hudson54241132001-12-07 15:38:26 +000019495# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019496
19497
19498
19499
19500
19501
Fred Drake8cef4cf2000-06-28 16:40:38 +000019502for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19503do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019504as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19505{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19506echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019507if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019508 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019509else
Martin v. Löwis11437992002-04-12 09:54:03 +000019510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019511/* confdefs.h. */
19512_ACEOF
19513cat confdefs.h >>conftest.$ac_ext
19514cat >>conftest.$ac_ext <<_ACEOF
19515/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019516/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19517 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19518#define $ac_func innocuous_$ac_func
19519
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019520/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019521 which can conflict with char $ac_func (); below.
19522 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019523 <limits.h> exists even on freestanding compilers. */
19524
19525#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019526# include <limits.h>
19527#else
19528# include <assert.h>
19529#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019530
19531#undef $ac_func
19532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019533/* Override any GCC internal prototype to avoid an error.
19534 Use char because int might match the return type of a GCC
19535 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019536#ifdef __cplusplus
19537extern "C"
19538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019539char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019540/* The GNU C library defines this for functions which it implements
19541 to always fail with ENOSYS. Some functions are actually named
19542 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019543#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019544choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019545#endif
19546
Skip Montanaro6dead952003-09-25 14:50:04 +000019547int
19548main ()
19549{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019550return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019551 ;
19552 return 0;
19553}
19554_ACEOF
19555rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019556if { (ac_try="$ac_link"
19557case "(($ac_try" in
19558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19559 *) ac_try_echo=$ac_try;;
19560esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019562 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019564 grep -v '^ *+' conftest.er1 >conftest.err
19565 rm -f conftest.er1
19566 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019568 (exit $ac_status); } && {
19569 test -z "$ac_c_werror_flag" ||
19570 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019571 } && test -s conftest$ac_exeext &&
19572 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019573 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019574else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019576sed 's/^/| /' conftest.$ac_ext >&5
19577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019578 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019580
19581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019582 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019583fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019584ac_res=`eval echo '${'$as_ac_var'}'`
19585 { echo "$as_me:$LINENO: result: $ac_res" >&5
19586echo "${ECHO_T}$ac_res" >&6; }
19587if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019588 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019589#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019590_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019591
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019592fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019593done
19594
Michael W. Hudson54241132001-12-07 15:38:26 +000019595
Martin v. Löwis11437992002-04-12 09:54:03 +000019596
19597
19598
Christian Heimesb186d002008-03-18 15:15:01 +000019599for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019600do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019601as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19602{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19603echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019604if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019606else
Martin v. Löwis11437992002-04-12 09:54:03 +000019607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019608/* confdefs.h. */
19609_ACEOF
19610cat confdefs.h >>conftest.$ac_ext
19611cat >>conftest.$ac_ext <<_ACEOF
19612/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019613/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19614 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19615#define $ac_func innocuous_$ac_func
19616
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019617/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019618 which can conflict with char $ac_func (); below.
19619 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019620 <limits.h> exists even on freestanding compilers. */
19621
19622#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019623# include <limits.h>
19624#else
19625# include <assert.h>
19626#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019627
19628#undef $ac_func
19629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019630/* Override any GCC internal prototype to avoid an error.
19631 Use char because int might match the return type of a GCC
19632 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019633#ifdef __cplusplus
19634extern "C"
19635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019636char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019637/* The GNU C library defines this for functions which it implements
19638 to always fail with ENOSYS. Some functions are actually named
19639 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019640#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019641choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019642#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019643
Skip Montanaro6dead952003-09-25 14:50:04 +000019644int
19645main ()
19646{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019647return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019648 ;
19649 return 0;
19650}
19651_ACEOF
19652rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019653if { (ac_try="$ac_link"
19654case "(($ac_try" in
19655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19656 *) ac_try_echo=$ac_try;;
19657esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019659 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019661 grep -v '^ *+' conftest.er1 >conftest.err
19662 rm -f conftest.er1
19663 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019665 (exit $ac_status); } && {
19666 test -z "$ac_c_werror_flag" ||
19667 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019668 } && test -s conftest$ac_exeext &&
19669 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019670 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019671else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019673sed 's/^/| /' conftest.$ac_ext >&5
19674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019675 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019677
19678rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019679 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019680fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019681ac_res=`eval echo '${'$as_ac_var'}'`
19682 { echo "$as_me:$LINENO: result: $ac_res" >&5
19683echo "${ECHO_T}$ac_res" >&6; }
19684if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019685 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019686#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019687_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019688
Martin v. Löwis1142de32002-03-29 16:28:31 +000019689else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019690 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019691 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019692 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19693 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019694esac
19695
Martin v. Löwis1142de32002-03-29 16:28:31 +000019696fi
19697done
19698
19699
Martin v. Löwis11437992002-04-12 09:54:03 +000019700
Martin v. Löwis1142de32002-03-29 16:28:31 +000019701for ac_func in getpgrp
19702do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019703as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19704{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19705echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019706if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019707 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019708else
Martin v. Löwis11437992002-04-12 09:54:03 +000019709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019710/* confdefs.h. */
19711_ACEOF
19712cat confdefs.h >>conftest.$ac_ext
19713cat >>conftest.$ac_ext <<_ACEOF
19714/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019715/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19716 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19717#define $ac_func innocuous_$ac_func
19718
Martin v. Löwis1142de32002-03-29 16:28:31 +000019719/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019720 which can conflict with char $ac_func (); below.
19721 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019722 <limits.h> exists even on freestanding compilers. */
19723
19724#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019725# include <limits.h>
19726#else
19727# include <assert.h>
19728#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019729
19730#undef $ac_func
19731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019732/* Override any GCC internal prototype to avoid an error.
19733 Use char because int might match the return type of a GCC
19734 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019735#ifdef __cplusplus
19736extern "C"
19737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019738char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019739/* The GNU C library defines this for functions which it implements
19740 to always fail with ENOSYS. Some functions are actually named
19741 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019742#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019743choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019744#endif
19745
Skip Montanaro6dead952003-09-25 14:50:04 +000019746int
19747main ()
19748{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019749return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019750 ;
19751 return 0;
19752}
19753_ACEOF
19754rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019755if { (ac_try="$ac_link"
19756case "(($ac_try" in
19757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19758 *) ac_try_echo=$ac_try;;
19759esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019761 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019763 grep -v '^ *+' conftest.er1 >conftest.err
19764 rm -f conftest.er1
19765 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019767 (exit $ac_status); } && {
19768 test -z "$ac_c_werror_flag" ||
19769 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019770 } && test -s conftest$ac_exeext &&
19771 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019772 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019773else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019775sed 's/^/| /' conftest.$ac_ext >&5
19776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019777 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019779
19780rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019781 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019782fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019783ac_res=`eval echo '${'$as_ac_var'}'`
19784 { echo "$as_me:$LINENO: result: $ac_res" >&5
19785echo "${ECHO_T}$ac_res" >&6; }
19786if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019787 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019788#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019789_ACEOF
19790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019791/* confdefs.h. */
19792_ACEOF
19793cat confdefs.h >>conftest.$ac_ext
19794cat >>conftest.$ac_ext <<_ACEOF
19795/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019796#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019797int
19798main ()
19799{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019800getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019801 ;
19802 return 0;
19803}
19804_ACEOF
19805rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019806if { (ac_try="$ac_compile"
19807case "(($ac_try" in
19808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19809 *) ac_try_echo=$ac_try;;
19810esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019812 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019814 grep -v '^ *+' conftest.er1 >conftest.err
19815 rm -f conftest.er1
19816 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019818 (exit $ac_status); } && {
19819 test -z "$ac_c_werror_flag" ||
19820 test ! -s conftest.err
19821 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019822
19823cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019824#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019825_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019826
Martin v. Löwis11437992002-04-12 09:54:03 +000019827
Guido van Rossumf78abae1997-01-21 22:02:36 +000019828else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019830sed 's/^/| /' conftest.$ac_ext >&5
19831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019832
Guido van Rossum627b2d71993-12-24 10:39:16 +000019833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019834
19835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019836
Guido van Rossum627b2d71993-12-24 10:39:16 +000019837fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019838done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019839
Jack Jansen150753c2003-03-29 22:07:47 +000019840
19841for ac_func in setpgrp
19842do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019843as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19844{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19845echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019846if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019848else
Martin v. Löwis11437992002-04-12 09:54:03 +000019849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019850/* confdefs.h. */
19851_ACEOF
19852cat confdefs.h >>conftest.$ac_ext
19853cat >>conftest.$ac_ext <<_ACEOF
19854/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019855/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19856 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19857#define $ac_func innocuous_$ac_func
19858
Jack Jansen150753c2003-03-29 22:07:47 +000019859/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019860 which can conflict with char $ac_func (); below.
19861 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019862 <limits.h> exists even on freestanding compilers. */
19863
19864#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019865# include <limits.h>
19866#else
19867# include <assert.h>
19868#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019869
19870#undef $ac_func
19871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019872/* Override any GCC internal prototype to avoid an error.
19873 Use char because int might match the return type of a GCC
19874 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019875#ifdef __cplusplus
19876extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019877#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019878char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019879/* The GNU C library defines this for functions which it implements
19880 to always fail with ENOSYS. Some functions are actually named
19881 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019882#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019883choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019884#endif
19885
Skip Montanaro6dead952003-09-25 14:50:04 +000019886int
19887main ()
19888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019889return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019890 ;
19891 return 0;
19892}
19893_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019894rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019895if { (ac_try="$ac_link"
19896case "(($ac_try" in
19897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19898 *) ac_try_echo=$ac_try;;
19899esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019901 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019903 grep -v '^ *+' conftest.er1 >conftest.err
19904 rm -f conftest.er1
19905 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019907 (exit $ac_status); } && {
19908 test -z "$ac_c_werror_flag" ||
19909 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019910 } && test -s conftest$ac_exeext &&
19911 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019912 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019913else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019915sed 's/^/| /' conftest.$ac_ext >&5
19916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019917 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019919
19920rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019921 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019922fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019923ac_res=`eval echo '${'$as_ac_var'}'`
19924 { echo "$as_me:$LINENO: result: $ac_res" >&5
19925echo "${ECHO_T}$ac_res" >&6; }
19926if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019927 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019928#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019929_ACEOF
19930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019931/* confdefs.h. */
19932_ACEOF
19933cat confdefs.h >>conftest.$ac_ext
19934cat >>conftest.$ac_ext <<_ACEOF
19935/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019936#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019937int
19938main ()
19939{
19940setpgrp(0,0);
19941 ;
19942 return 0;
19943}
19944_ACEOF
19945rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019946if { (ac_try="$ac_compile"
19947case "(($ac_try" in
19948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19949 *) ac_try_echo=$ac_try;;
19950esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019952 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019954 grep -v '^ *+' conftest.er1 >conftest.err
19955 rm -f conftest.er1
19956 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019958 (exit $ac_status); } && {
19959 test -z "$ac_c_werror_flag" ||
19960 test ! -s conftest.err
19961 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019962
19963cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019964#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019965_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019966
Jack Jansen150753c2003-03-29 22:07:47 +000019967
19968else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019970sed 's/^/| /' conftest.$ac_ext >&5
19971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019972
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019974
19975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019976
19977fi
19978done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019979
Martin v. Löwis11437992002-04-12 09:54:03 +000019980
Thomas Wouters3a584202000-08-05 23:28:51 +000019981for ac_func in gettimeofday
19982do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019983as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19984{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19985echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019986if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019988else
Martin v. Löwis11437992002-04-12 09:54:03 +000019989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019990/* confdefs.h. */
19991_ACEOF
19992cat confdefs.h >>conftest.$ac_ext
19993cat >>conftest.$ac_ext <<_ACEOF
19994/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019995/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19996 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19997#define $ac_func innocuous_$ac_func
19998
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019999/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020000 which can conflict with char $ac_func (); below.
20001 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020002 <limits.h> exists even on freestanding compilers. */
20003
20004#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020005# include <limits.h>
20006#else
20007# include <assert.h>
20008#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020009
20010#undef $ac_func
20011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020012/* Override any GCC internal prototype to avoid an error.
20013 Use char because int might match the return type of a GCC
20014 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020015#ifdef __cplusplus
20016extern "C"
20017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020018char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020019/* The GNU C library defines this for functions which it implements
20020 to always fail with ENOSYS. Some functions are actually named
20021 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020022#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020023choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020024#endif
20025
Skip Montanaro6dead952003-09-25 14:50:04 +000020026int
20027main ()
20028{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020029return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020030 ;
20031 return 0;
20032}
20033_ACEOF
20034rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020035if { (ac_try="$ac_link"
20036case "(($ac_try" in
20037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20038 *) ac_try_echo=$ac_try;;
20039esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020041 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020043 grep -v '^ *+' conftest.er1 >conftest.err
20044 rm -f conftest.er1
20045 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020047 (exit $ac_status); } && {
20048 test -z "$ac_c_werror_flag" ||
20049 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020050 } && test -s conftest$ac_exeext &&
20051 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020052 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020053else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020054 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020055sed 's/^/| /' conftest.$ac_ext >&5
20056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020057 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020059
20060rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020061 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020062fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020063ac_res=`eval echo '${'$as_ac_var'}'`
20064 { echo "$as_me:$LINENO: result: $ac_res" >&5
20065echo "${ECHO_T}$ac_res" >&6; }
20066if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020067 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020068#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020069_ACEOF
20070 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020071/* confdefs.h. */
20072_ACEOF
20073cat confdefs.h >>conftest.$ac_ext
20074cat >>conftest.$ac_ext <<_ACEOF
20075/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020076#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020077int
20078main ()
20079{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020080gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020081 ;
20082 return 0;
20083}
20084_ACEOF
20085rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020086if { (ac_try="$ac_compile"
20087case "(($ac_try" in
20088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20089 *) ac_try_echo=$ac_try;;
20090esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020092 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020094 grep -v '^ *+' conftest.er1 >conftest.err
20095 rm -f conftest.er1
20096 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020098 (exit $ac_status); } && {
20099 test -z "$ac_c_werror_flag" ||
20100 test ! -s conftest.err
20101 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020102 :
20103else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020105sed 's/^/| /' conftest.$ac_ext >&5
20106
Martin v. Löwis11437992002-04-12 09:54:03 +000020107
20108cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020109#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020110_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020111
Martin v. Löwis11437992002-04-12 09:54:03 +000020112
Guido van Rossum627b2d71993-12-24 10:39:16 +000020113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020114
20115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020116
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020117fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020118done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020119
Michael W. Hudson54241132001-12-07 15:38:26 +000020120
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020121{ echo "$as_me:$LINENO: checking for major" >&5
20122echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020124/* confdefs.h. */
20125_ACEOF
20126cat confdefs.h >>conftest.$ac_ext
20127cat >>conftest.$ac_ext <<_ACEOF
20128/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020129
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020130#if defined(MAJOR_IN_MKDEV)
20131#include <sys/mkdev.h>
20132#elif defined(MAJOR_IN_SYSMACROS)
20133#include <sys/sysmacros.h>
20134#else
20135#include <sys/types.h>
20136#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020137
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020138int
20139main ()
20140{
20141
20142 makedev(major(0),minor(0));
20143
20144 ;
20145 return 0;
20146}
20147_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020148rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020149if { (ac_try="$ac_link"
20150case "(($ac_try" in
20151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20152 *) ac_try_echo=$ac_try;;
20153esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020155 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020157 grep -v '^ *+' conftest.er1 >conftest.err
20158 rm -f conftest.er1
20159 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020161 (exit $ac_status); } && {
20162 test -z "$ac_c_werror_flag" ||
20163 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020164 } && test -s conftest$ac_exeext &&
20165 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020166
20167
20168cat >>confdefs.h <<\_ACEOF
20169#define HAVE_DEVICE_MACROS 1
20170_ACEOF
20171
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020172 { echo "$as_me:$LINENO: result: yes" >&5
20173echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020174
20175else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020177sed 's/^/| /' conftest.$ac_ext >&5
20178
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020179
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020180 { echo "$as_me:$LINENO: result: no" >&5
20181echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020182
20183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020184
20185rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020186 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020187
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020188# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020189# for [no]getaddrinfo in netdb.h.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020190{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20191echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020192cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020193/* confdefs.h. */
20194_ACEOF
20195cat confdefs.h >>conftest.$ac_ext
20196cat >>conftest.$ac_ext <<_ACEOF
20197/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020198
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020199#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020200#include <sys/socket.h>
20201#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020202#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020203
Martin v. Löwis11437992002-04-12 09:54:03 +000020204int
20205main ()
20206{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020207getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020208 ;
20209 return 0;
20210}
20211_ACEOF
20212rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020213if { (ac_try="$ac_link"
20214case "(($ac_try" in
20215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20216 *) ac_try_echo=$ac_try;;
20217esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020219 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020221 grep -v '^ *+' conftest.er1 >conftest.err
20222 rm -f conftest.er1
20223 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020225 (exit $ac_status); } && {
20226 test -z "$ac_c_werror_flag" ||
20227 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020228 } && test -s conftest$ac_exeext &&
20229 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020230 have_getaddrinfo=yes
20231else
20232 echo "$as_me: failed program was:" >&5
20233sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020235 have_getaddrinfo=no
20236fi
20237
20238rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20239 conftest$ac_exeext conftest.$ac_ext
20240{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20241echo "${ECHO_T}$have_getaddrinfo" >&6; }
20242if test $have_getaddrinfo = yes
20243then
20244 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020245echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020246 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20247 echo $ECHO_N "(cached) $ECHO_C" >&6
20248else
20249 if test "$cross_compiling" = yes; then
20250 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020251else
Martin v. Löwis11437992002-04-12 09:54:03 +000020252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020253/* confdefs.h. */
20254_ACEOF
20255cat confdefs.h >>conftest.$ac_ext
20256cat >>conftest.$ac_ext <<_ACEOF
20257/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020258
20259#include <sys/types.h>
20260#include <netdb.h>
20261#include <string.h>
20262#include <sys/socket.h>
20263#include <netinet/in.h>
20264
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020265int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020266{
20267 int passive, gaierr, inet4 = 0, inet6 = 0;
20268 struct addrinfo hints, *ai, *aitop;
20269 char straddr[INET6_ADDRSTRLEN], strport[16];
20270
20271 for (passive = 0; passive <= 1; passive++) {
20272 memset(&hints, 0, sizeof(hints));
20273 hints.ai_family = AF_UNSPEC;
20274 hints.ai_flags = passive ? AI_PASSIVE : 0;
20275 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020276 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020277 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20278 (void)gai_strerror(gaierr);
20279 goto bad;
20280 }
20281 for (ai = aitop; ai; ai = ai->ai_next) {
20282 if (ai->ai_addr == NULL ||
20283 ai->ai_addrlen == 0 ||
20284 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20285 straddr, sizeof(straddr), strport, sizeof(strport),
20286 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20287 goto bad;
20288 }
20289 switch (ai->ai_family) {
20290 case AF_INET:
20291 if (strcmp(strport, "54321") != 0) {
20292 goto bad;
20293 }
20294 if (passive) {
20295 if (strcmp(straddr, "0.0.0.0") != 0) {
20296 goto bad;
20297 }
20298 } else {
20299 if (strcmp(straddr, "127.0.0.1") != 0) {
20300 goto bad;
20301 }
20302 }
20303 inet4++;
20304 break;
20305 case AF_INET6:
20306 if (strcmp(strport, "54321") != 0) {
20307 goto bad;
20308 }
20309 if (passive) {
20310 if (strcmp(straddr, "::") != 0) {
20311 goto bad;
20312 }
20313 } else {
20314 if (strcmp(straddr, "::1") != 0) {
20315 goto bad;
20316 }
20317 }
20318 inet6++;
20319 break;
20320 case AF_UNSPEC:
20321 goto bad;
20322 break;
20323 default:
20324 /* another family support? */
20325 break;
20326 }
20327 }
20328 }
20329
20330 if (!(inet4 == 0 || inet4 == 2))
20331 goto bad;
20332 if (!(inet6 == 0 || inet6 == 2))
20333 goto bad;
20334
20335 if (aitop)
20336 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020337 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020338
20339 bad:
20340 if (aitop)
20341 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020342 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020343}
20344
Martin v. Löwis11437992002-04-12 09:54:03 +000020345_ACEOF
20346rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020347if { (ac_try="$ac_link"
20348case "(($ac_try" in
20349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20350 *) ac_try_echo=$ac_try;;
20351esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020353 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020354 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020357 { (case "(($ac_try" in
20358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20359 *) ac_try_echo=$ac_try;;
20360esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020362 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020363 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020365 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020366 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020367else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020368 echo "$as_me: program exited with status $ac_status" >&5
20369echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020370sed 's/^/| /' conftest.$ac_ext >&5
20371
Martin v. Löwis11437992002-04-12 09:54:03 +000020372( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020373ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020375rm -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 +000020376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020377
20378
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020379fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020380
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020382
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020383if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20384then
20385 if test $ipv6 = yes
20386 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020387 echo 'Fatal: You must get working getaddrinfo() function.'
20388 echo ' or you can specify "--disable-ipv6"'.
20389 exit 1
20390 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020391else
Martin v. Löwis11437992002-04-12 09:54:03 +000020392
20393cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020394#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020395_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020396
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020397fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020398
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020399for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020400do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020401as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20402{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20403echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020404if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020405 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020406else
Martin v. Löwis11437992002-04-12 09:54:03 +000020407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020408/* confdefs.h. */
20409_ACEOF
20410cat confdefs.h >>conftest.$ac_ext
20411cat >>conftest.$ac_ext <<_ACEOF
20412/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020413/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20414 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20415#define $ac_func innocuous_$ac_func
20416
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020417/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020418 which can conflict with char $ac_func (); below.
20419 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020420 <limits.h> exists even on freestanding compilers. */
20421
20422#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020423# include <limits.h>
20424#else
20425# include <assert.h>
20426#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020427
20428#undef $ac_func
20429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020430/* Override any GCC internal prototype to avoid an error.
20431 Use char because int might match the return type of a GCC
20432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020433#ifdef __cplusplus
20434extern "C"
20435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020436char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020437/* The GNU C library defines this for functions which it implements
20438 to always fail with ENOSYS. Some functions are actually named
20439 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020440#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020441choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020442#endif
20443
Skip Montanaro6dead952003-09-25 14:50:04 +000020444int
20445main ()
20446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020447return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020448 ;
20449 return 0;
20450}
20451_ACEOF
20452rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020453if { (ac_try="$ac_link"
20454case "(($ac_try" in
20455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20456 *) ac_try_echo=$ac_try;;
20457esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020459 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020461 grep -v '^ *+' conftest.er1 >conftest.err
20462 rm -f conftest.er1
20463 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020465 (exit $ac_status); } && {
20466 test -z "$ac_c_werror_flag" ||
20467 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020468 } && test -s conftest$ac_exeext &&
20469 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020470 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020471else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020473sed 's/^/| /' conftest.$ac_ext >&5
20474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020475 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020477
20478rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020479 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020480fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020481ac_res=`eval echo '${'$as_ac_var'}'`
20482 { echo "$as_me:$LINENO: result: $ac_res" >&5
20483echo "${ECHO_T}$ac_res" >&6; }
20484if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020485 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020486#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020487_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020488
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020489fi
20490done
20491
Michael W. Hudson54241132001-12-07 15:38:26 +000020492
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020493# checks for structures
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020494{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20495echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020496if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020497 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020498else
Martin v. Löwis11437992002-04-12 09:54:03 +000020499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020500/* confdefs.h. */
20501_ACEOF
20502cat confdefs.h >>conftest.$ac_ext
20503cat >>conftest.$ac_ext <<_ACEOF
20504/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020505#include <sys/types.h>
20506#include <sys/time.h>
20507#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020508
Martin v. Löwis11437992002-04-12 09:54:03 +000020509int
20510main ()
20511{
20512if ((struct tm *) 0)
20513return 0;
20514 ;
20515 return 0;
20516}
20517_ACEOF
20518rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020519if { (ac_try="$ac_compile"
20520case "(($ac_try" in
20521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20522 *) ac_try_echo=$ac_try;;
20523esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020527 grep -v '^ *+' conftest.er1 >conftest.err
20528 rm -f conftest.er1
20529 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020531 (exit $ac_status); } && {
20532 test -z "$ac_c_werror_flag" ||
20533 test ! -s conftest.err
20534 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020535 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020536else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020538sed 's/^/| /' conftest.$ac_ext >&5
20539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020540 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020542
20543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020544fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020545{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20546echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020547if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020548
20549cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020550#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020551_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020552
20553fi
20554
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020555{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20556echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020557if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020559else
Martin v. Löwis11437992002-04-12 09:54:03 +000020560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020561/* confdefs.h. */
20562_ACEOF
20563cat confdefs.h >>conftest.$ac_ext
20564cat >>conftest.$ac_ext <<_ACEOF
20565/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020566#include <sys/types.h>
20567#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020568
Martin v. Löwis11437992002-04-12 09:54:03 +000020569int
20570main ()
20571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020572struct tm tm;
20573 int *p = &tm.tm_sec;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020574 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020575 ;
20576 return 0;
20577}
20578_ACEOF
20579rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020580if { (ac_try="$ac_compile"
20581case "(($ac_try" in
20582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20583 *) ac_try_echo=$ac_try;;
20584esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020588 grep -v '^ *+' conftest.er1 >conftest.err
20589 rm -f conftest.er1
20590 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020592 (exit $ac_status); } && {
20593 test -z "$ac_c_werror_flag" ||
20594 test ! -s conftest.err
20595 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020596 ac_cv_struct_tm=time.h
20597else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020599sed 's/^/| /' conftest.$ac_ext >&5
20600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020601 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020603
20604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020605fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020606{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20607echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020608if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020609
20610cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020611#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020612_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020613
20614fi
20615
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020616{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20617echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020618if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020619 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020620else
Martin v. Löwis11437992002-04-12 09:54:03 +000020621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020622/* confdefs.h. */
20623_ACEOF
20624cat confdefs.h >>conftest.$ac_ext
20625cat >>conftest.$ac_ext <<_ACEOF
20626/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020627#include <sys/types.h>
20628#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020629
20630
Martin v. Löwis11437992002-04-12 09:54:03 +000020631int
20632main ()
20633{
20634static struct tm ac_aggr;
20635if (ac_aggr.tm_zone)
20636return 0;
20637 ;
20638 return 0;
20639}
20640_ACEOF
20641rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020642if { (ac_try="$ac_compile"
20643case "(($ac_try" in
20644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20645 *) ac_try_echo=$ac_try;;
20646esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020650 grep -v '^ *+' conftest.er1 >conftest.err
20651 rm -f conftest.er1
20652 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020654 (exit $ac_status); } && {
20655 test -z "$ac_c_werror_flag" ||
20656 test ! -s conftest.err
20657 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020658 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020659else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020661sed 's/^/| /' conftest.$ac_ext >&5
20662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020664/* confdefs.h. */
20665_ACEOF
20666cat confdefs.h >>conftest.$ac_ext
20667cat >>conftest.$ac_ext <<_ACEOF
20668/* end confdefs.h. */
20669#include <sys/types.h>
20670#include <$ac_cv_struct_tm>
20671
20672
20673int
20674main ()
20675{
20676static struct tm ac_aggr;
20677if (sizeof ac_aggr.tm_zone)
20678return 0;
20679 ;
20680 return 0;
20681}
20682_ACEOF
20683rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020684if { (ac_try="$ac_compile"
20685case "(($ac_try" in
20686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20687 *) ac_try_echo=$ac_try;;
20688esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020690 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020692 grep -v '^ *+' conftest.er1 >conftest.err
20693 rm -f conftest.er1
20694 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020696 (exit $ac_status); } && {
20697 test -z "$ac_c_werror_flag" ||
20698 test ! -s conftest.err
20699 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020700 ac_cv_member_struct_tm_tm_zone=yes
20701else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020703sed 's/^/| /' conftest.$ac_ext >&5
20704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020705 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020707
20708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020710
20711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020712fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020713{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20714echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20715if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020716
20717cat >>confdefs.h <<_ACEOF
20718#define HAVE_STRUCT_TM_TM_ZONE 1
20719_ACEOF
20720
20721
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020722fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020723
Martin v. Löwis11437992002-04-12 09:54:03 +000020724if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20725
20726cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020727#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020728_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020729
20730else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020731 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20732echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020733if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020734 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020735else
20736 cat >conftest.$ac_ext <<_ACEOF
20737/* confdefs.h. */
20738_ACEOF
20739cat confdefs.h >>conftest.$ac_ext
20740cat >>conftest.$ac_ext <<_ACEOF
20741/* end confdefs.h. */
20742#include <time.h>
20743
20744int
20745main ()
20746{
20747#ifndef tzname
20748 (void) tzname;
20749#endif
20750
20751 ;
20752 return 0;
20753}
20754_ACEOF
20755rm -f conftest.$ac_objext
20756if { (ac_try="$ac_compile"
20757case "(($ac_try" in
20758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20759 *) ac_try_echo=$ac_try;;
20760esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020762 (eval "$ac_compile") 2>conftest.er1
20763 ac_status=$?
20764 grep -v '^ *+' conftest.er1 >conftest.err
20765 rm -f conftest.er1
20766 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020768 (exit $ac_status); } && {
20769 test -z "$ac_c_werror_flag" ||
20770 test ! -s conftest.err
20771 } && test -s conftest.$ac_objext; then
20772 ac_cv_have_decl_tzname=yes
20773else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020774 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020775sed 's/^/| /' conftest.$ac_ext >&5
20776
20777 ac_cv_have_decl_tzname=no
20778fi
20779
20780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20781fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020782{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20783echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20784if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020785
20786cat >>confdefs.h <<_ACEOF
20787#define HAVE_DECL_TZNAME 1
20788_ACEOF
20789
20790
20791else
20792 cat >>confdefs.h <<_ACEOF
20793#define HAVE_DECL_TZNAME 0
20794_ACEOF
20795
20796
20797fi
20798
20799
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020800 { echo "$as_me:$LINENO: checking for tzname" >&5
20801echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020802if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020803 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020804else
Martin v. Löwis11437992002-04-12 09:54:03 +000020805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020806/* confdefs.h. */
20807_ACEOF
20808cat confdefs.h >>conftest.$ac_ext
20809cat >>conftest.$ac_ext <<_ACEOF
20810/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020811#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020812#if !HAVE_DECL_TZNAME
20813extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020815
Martin v. Löwis11437992002-04-12 09:54:03 +000020816int
20817main ()
20818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020819return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020820 ;
20821 return 0;
20822}
20823_ACEOF
20824rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020825if { (ac_try="$ac_link"
20826case "(($ac_try" in
20827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20828 *) ac_try_echo=$ac_try;;
20829esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020831 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020833 grep -v '^ *+' conftest.er1 >conftest.err
20834 rm -f conftest.er1
20835 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020837 (exit $ac_status); } && {
20838 test -z "$ac_c_werror_flag" ||
20839 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020840 } && test -s conftest$ac_exeext &&
20841 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020842 ac_cv_var_tzname=yes
20843else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020845sed 's/^/| /' conftest.$ac_ext >&5
20846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020847 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020849
20850rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020851 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020852fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020853{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20854echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020855 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020856
20857cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020858#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020859_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020861 fi
20862fi
20863
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020864{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20865echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020866if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020867 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020868else
20869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020870/* confdefs.h. */
20871_ACEOF
20872cat confdefs.h >>conftest.$ac_ext
20873cat >>conftest.$ac_ext <<_ACEOF
20874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020875$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020876int
20877main ()
20878{
20879static struct stat ac_aggr;
20880if (ac_aggr.st_rdev)
20881return 0;
20882 ;
20883 return 0;
20884}
20885_ACEOF
20886rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020887if { (ac_try="$ac_compile"
20888case "(($ac_try" in
20889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20890 *) ac_try_echo=$ac_try;;
20891esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020895 grep -v '^ *+' conftest.er1 >conftest.err
20896 rm -f conftest.er1
20897 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020899 (exit $ac_status); } && {
20900 test -z "$ac_c_werror_flag" ||
20901 test ! -s conftest.err
20902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020903 ac_cv_member_struct_stat_st_rdev=yes
20904else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020906sed 's/^/| /' conftest.$ac_ext >&5
20907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020909/* confdefs.h. */
20910_ACEOF
20911cat confdefs.h >>conftest.$ac_ext
20912cat >>conftest.$ac_ext <<_ACEOF
20913/* end confdefs.h. */
20914$ac_includes_default
20915int
20916main ()
20917{
20918static struct stat ac_aggr;
20919if (sizeof ac_aggr.st_rdev)
20920return 0;
20921 ;
20922 return 0;
20923}
20924_ACEOF
20925rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020926if { (ac_try="$ac_compile"
20927case "(($ac_try" in
20928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20929 *) ac_try_echo=$ac_try;;
20930esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020932 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020934 grep -v '^ *+' conftest.er1 >conftest.err
20935 rm -f conftest.er1
20936 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020938 (exit $ac_status); } && {
20939 test -z "$ac_c_werror_flag" ||
20940 test ! -s conftest.err
20941 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020942 ac_cv_member_struct_stat_st_rdev=yes
20943else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020945sed 's/^/| /' conftest.$ac_ext >&5
20946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020947 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020949
20950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020952
20953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020954fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020955{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20956echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20957if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020958
20959cat >>confdefs.h <<_ACEOF
20960#define HAVE_STRUCT_STAT_ST_RDEV 1
20961_ACEOF
20962
20963
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020964fi
20965
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020966{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20967echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020968if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020970else
Martin v. Löwis11437992002-04-12 09:54:03 +000020971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020972/* confdefs.h. */
20973_ACEOF
20974cat confdefs.h >>conftest.$ac_ext
20975cat >>conftest.$ac_ext <<_ACEOF
20976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020977$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020978int
20979main ()
20980{
20981static struct stat ac_aggr;
20982if (ac_aggr.st_blksize)
20983return 0;
20984 ;
20985 return 0;
20986}
20987_ACEOF
20988rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020989if { (ac_try="$ac_compile"
20990case "(($ac_try" in
20991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20992 *) ac_try_echo=$ac_try;;
20993esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020995 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020997 grep -v '^ *+' conftest.er1 >conftest.err
20998 rm -f conftest.er1
20999 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021001 (exit $ac_status); } && {
21002 test -z "$ac_c_werror_flag" ||
21003 test ! -s conftest.err
21004 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021005 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021006else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021008sed 's/^/| /' conftest.$ac_ext >&5
21009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021011/* confdefs.h. */
21012_ACEOF
21013cat confdefs.h >>conftest.$ac_ext
21014cat >>conftest.$ac_ext <<_ACEOF
21015/* end confdefs.h. */
21016$ac_includes_default
21017int
21018main ()
21019{
21020static struct stat ac_aggr;
21021if (sizeof ac_aggr.st_blksize)
21022return 0;
21023 ;
21024 return 0;
21025}
21026_ACEOF
21027rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021028if { (ac_try="$ac_compile"
21029case "(($ac_try" in
21030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21031 *) ac_try_echo=$ac_try;;
21032esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021034 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021036 grep -v '^ *+' conftest.er1 >conftest.err
21037 rm -f conftest.er1
21038 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021040 (exit $ac_status); } && {
21041 test -z "$ac_c_werror_flag" ||
21042 test ! -s conftest.err
21043 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021044 ac_cv_member_struct_stat_st_blksize=yes
21045else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021047sed 's/^/| /' conftest.$ac_ext >&5
21048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021049 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021051
21052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021054
21055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021056fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021057{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21058echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21059if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021060
Martin v. Löwis11437992002-04-12 09:54:03 +000021061cat >>confdefs.h <<_ACEOF
21062#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21063_ACEOF
21064
21065
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021066fi
21067
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021068{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21069echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021070if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021071 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021072else
21073 cat >conftest.$ac_ext <<_ACEOF
21074/* confdefs.h. */
21075_ACEOF
21076cat confdefs.h >>conftest.$ac_ext
21077cat >>conftest.$ac_ext <<_ACEOF
21078/* end confdefs.h. */
21079$ac_includes_default
21080int
21081main ()
21082{
21083static struct stat ac_aggr;
21084if (ac_aggr.st_flags)
21085return 0;
21086 ;
21087 return 0;
21088}
21089_ACEOF
21090rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021091if { (ac_try="$ac_compile"
21092case "(($ac_try" in
21093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21094 *) ac_try_echo=$ac_try;;
21095esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021097 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021098 ac_status=$?
21099 grep -v '^ *+' conftest.er1 >conftest.err
21100 rm -f conftest.er1
21101 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021103 (exit $ac_status); } && {
21104 test -z "$ac_c_werror_flag" ||
21105 test ! -s conftest.err
21106 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021107 ac_cv_member_struct_stat_st_flags=yes
21108else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021109 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021110sed 's/^/| /' conftest.$ac_ext >&5
21111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021112 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021113/* confdefs.h. */
21114_ACEOF
21115cat confdefs.h >>conftest.$ac_ext
21116cat >>conftest.$ac_ext <<_ACEOF
21117/* end confdefs.h. */
21118$ac_includes_default
21119int
21120main ()
21121{
21122static struct stat ac_aggr;
21123if (sizeof ac_aggr.st_flags)
21124return 0;
21125 ;
21126 return 0;
21127}
21128_ACEOF
21129rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021130if { (ac_try="$ac_compile"
21131case "(($ac_try" in
21132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21133 *) ac_try_echo=$ac_try;;
21134esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021136 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021137 ac_status=$?
21138 grep -v '^ *+' conftest.er1 >conftest.err
21139 rm -f conftest.er1
21140 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021142 (exit $ac_status); } && {
21143 test -z "$ac_c_werror_flag" ||
21144 test ! -s conftest.err
21145 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021146 ac_cv_member_struct_stat_st_flags=yes
21147else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021148 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021149sed 's/^/| /' conftest.$ac_ext >&5
21150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021151 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021153
21154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021156
21157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021158fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021159{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21160echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21161if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021162
21163cat >>confdefs.h <<_ACEOF
21164#define HAVE_STRUCT_STAT_ST_FLAGS 1
21165_ACEOF
21166
21167
21168fi
21169
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021170{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21171echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021172if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021173 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021174else
21175 cat >conftest.$ac_ext <<_ACEOF
21176/* confdefs.h. */
21177_ACEOF
21178cat confdefs.h >>conftest.$ac_ext
21179cat >>conftest.$ac_ext <<_ACEOF
21180/* end confdefs.h. */
21181$ac_includes_default
21182int
21183main ()
21184{
21185static struct stat ac_aggr;
21186if (ac_aggr.st_gen)
21187return 0;
21188 ;
21189 return 0;
21190}
21191_ACEOF
21192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021193if { (ac_try="$ac_compile"
21194case "(($ac_try" in
21195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21196 *) ac_try_echo=$ac_try;;
21197esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021200 ac_status=$?
21201 grep -v '^ *+' conftest.er1 >conftest.err
21202 rm -f conftest.er1
21203 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021205 (exit $ac_status); } && {
21206 test -z "$ac_c_werror_flag" ||
21207 test ! -s conftest.err
21208 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021209 ac_cv_member_struct_stat_st_gen=yes
21210else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021211 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021212sed 's/^/| /' conftest.$ac_ext >&5
21213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021214 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021215/* confdefs.h. */
21216_ACEOF
21217cat confdefs.h >>conftest.$ac_ext
21218cat >>conftest.$ac_ext <<_ACEOF
21219/* end confdefs.h. */
21220$ac_includes_default
21221int
21222main ()
21223{
21224static struct stat ac_aggr;
21225if (sizeof ac_aggr.st_gen)
21226return 0;
21227 ;
21228 return 0;
21229}
21230_ACEOF
21231rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021232if { (ac_try="$ac_compile"
21233case "(($ac_try" in
21234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21235 *) ac_try_echo=$ac_try;;
21236esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021239 ac_status=$?
21240 grep -v '^ *+' conftest.er1 >conftest.err
21241 rm -f conftest.er1
21242 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021244 (exit $ac_status); } && {
21245 test -z "$ac_c_werror_flag" ||
21246 test ! -s conftest.err
21247 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021248 ac_cv_member_struct_stat_st_gen=yes
21249else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021250 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021251sed 's/^/| /' conftest.$ac_ext >&5
21252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021253 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021255
21256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021258
21259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021260fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021261{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21262echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21263if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021264
21265cat >>confdefs.h <<_ACEOF
21266#define HAVE_STRUCT_STAT_ST_GEN 1
21267_ACEOF
21268
21269
21270fi
21271
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021272{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21273echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021274if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021275 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021276else
21277 cat >conftest.$ac_ext <<_ACEOF
21278/* confdefs.h. */
21279_ACEOF
21280cat confdefs.h >>conftest.$ac_ext
21281cat >>conftest.$ac_ext <<_ACEOF
21282/* end confdefs.h. */
21283$ac_includes_default
21284int
21285main ()
21286{
21287static struct stat ac_aggr;
21288if (ac_aggr.st_birthtime)
21289return 0;
21290 ;
21291 return 0;
21292}
21293_ACEOF
21294rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021295if { (ac_try="$ac_compile"
21296case "(($ac_try" in
21297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21298 *) ac_try_echo=$ac_try;;
21299esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021302 ac_status=$?
21303 grep -v '^ *+' conftest.er1 >conftest.err
21304 rm -f conftest.er1
21305 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021307 (exit $ac_status); } && {
21308 test -z "$ac_c_werror_flag" ||
21309 test ! -s conftest.err
21310 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021311 ac_cv_member_struct_stat_st_birthtime=yes
21312else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021313 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021314sed 's/^/| /' conftest.$ac_ext >&5
21315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021316 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021317/* confdefs.h. */
21318_ACEOF
21319cat confdefs.h >>conftest.$ac_ext
21320cat >>conftest.$ac_ext <<_ACEOF
21321/* end confdefs.h. */
21322$ac_includes_default
21323int
21324main ()
21325{
21326static struct stat ac_aggr;
21327if (sizeof ac_aggr.st_birthtime)
21328return 0;
21329 ;
21330 return 0;
21331}
21332_ACEOF
21333rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021334if { (ac_try="$ac_compile"
21335case "(($ac_try" in
21336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21337 *) ac_try_echo=$ac_try;;
21338esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021341 ac_status=$?
21342 grep -v '^ *+' conftest.er1 >conftest.err
21343 rm -f conftest.er1
21344 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021346 (exit $ac_status); } && {
21347 test -z "$ac_c_werror_flag" ||
21348 test ! -s conftest.err
21349 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021350 ac_cv_member_struct_stat_st_birthtime=yes
21351else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021352 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021353sed 's/^/| /' conftest.$ac_ext >&5
21354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021355 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021357
21358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021360
21361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021362fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021363{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21364echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21365if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021366
21367cat >>confdefs.h <<_ACEOF
21368#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21369_ACEOF
21370
21371
21372fi
21373
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021374{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21375echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021376if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021377 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021378else
Martin v. Löwis11437992002-04-12 09:54:03 +000021379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021380/* confdefs.h. */
21381_ACEOF
21382cat confdefs.h >>conftest.$ac_ext
21383cat >>conftest.$ac_ext <<_ACEOF
21384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021385$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021386int
21387main ()
21388{
21389static struct stat ac_aggr;
21390if (ac_aggr.st_blocks)
21391return 0;
21392 ;
21393 return 0;
21394}
21395_ACEOF
21396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021397if { (ac_try="$ac_compile"
21398case "(($ac_try" in
21399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21400 *) ac_try_echo=$ac_try;;
21401esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021405 grep -v '^ *+' conftest.er1 >conftest.err
21406 rm -f conftest.er1
21407 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021409 (exit $ac_status); } && {
21410 test -z "$ac_c_werror_flag" ||
21411 test ! -s conftest.err
21412 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021413 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021414else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021416sed 's/^/| /' conftest.$ac_ext >&5
21417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021418 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021419/* confdefs.h. */
21420_ACEOF
21421cat confdefs.h >>conftest.$ac_ext
21422cat >>conftest.$ac_ext <<_ACEOF
21423/* end confdefs.h. */
21424$ac_includes_default
21425int
21426main ()
21427{
21428static struct stat ac_aggr;
21429if (sizeof ac_aggr.st_blocks)
21430return 0;
21431 ;
21432 return 0;
21433}
21434_ACEOF
21435rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021436if { (ac_try="$ac_compile"
21437case "(($ac_try" in
21438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21439 *) ac_try_echo=$ac_try;;
21440esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021442 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021444 grep -v '^ *+' conftest.er1 >conftest.err
21445 rm -f conftest.er1
21446 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021448 (exit $ac_status); } && {
21449 test -z "$ac_c_werror_flag" ||
21450 test ! -s conftest.err
21451 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021452 ac_cv_member_struct_stat_st_blocks=yes
21453else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021455sed 's/^/| /' conftest.$ac_ext >&5
21456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021457 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021459
21460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021462
21463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021464fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021465{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21466echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21467if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021468
Martin v. Löwis11437992002-04-12 09:54:03 +000021469cat >>confdefs.h <<_ACEOF
21470#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21471_ACEOF
21472
21473
21474cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021475#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021476_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021477
21478else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021479 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021480 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021481 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21482 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021483esac
21484
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021485fi
21486
Michael W. Hudson54241132001-12-07 15:38:26 +000021487
Martin v. Löwis11437992002-04-12 09:54:03 +000021488
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021489{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21490echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021491if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021492 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021493else
Martin v. Löwis11437992002-04-12 09:54:03 +000021494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021495/* confdefs.h. */
21496_ACEOF
21497cat confdefs.h >>conftest.$ac_ext
21498cat >>conftest.$ac_ext <<_ACEOF
21499/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021500#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021501int
21502main ()
21503{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021504return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021505 ;
21506 return 0;
21507}
21508_ACEOF
21509rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021510if { (ac_try="$ac_compile"
21511case "(($ac_try" in
21512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21513 *) ac_try_echo=$ac_try;;
21514esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021518 grep -v '^ *+' conftest.er1 >conftest.err
21519 rm -f conftest.er1
21520 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021522 (exit $ac_status); } && {
21523 test -z "$ac_c_werror_flag" ||
21524 test ! -s conftest.err
21525 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021526 ac_cv_header_time_altzone=yes
21527else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021529sed 's/^/| /' conftest.$ac_ext >&5
21530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021531 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021532fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21535fi
21536
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021537{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21538echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021539if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021540
21541cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021542#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021543_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021544
21545fi
21546
Guido van Rossumda88dad1995-01-26 00:46:29 +000021547was_it_defined=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021548{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21549echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021551/* confdefs.h. */
21552_ACEOF
21553cat confdefs.h >>conftest.$ac_ext
21554cat >>conftest.$ac_ext <<_ACEOF
21555/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021556
21557#include <sys/types.h>
21558#include <sys/select.h>
21559#include <sys/time.h>
21560
Martin v. Löwis11437992002-04-12 09:54:03 +000021561int
21562main ()
21563{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021564;
Martin v. Löwis11437992002-04-12 09:54:03 +000021565 ;
21566 return 0;
21567}
21568_ACEOF
21569rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021570if { (ac_try="$ac_compile"
21571case "(($ac_try" in
21572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21573 *) ac_try_echo=$ac_try;;
21574esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021578 grep -v '^ *+' conftest.er1 >conftest.err
21579 rm -f conftest.er1
21580 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021582 (exit $ac_status); } && {
21583 test -z "$ac_c_werror_flag" ||
21584 test ! -s conftest.err
21585 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021586
21587
21588cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021589#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021590_ACEOF
21591
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021592 was_it_defined=yes
21593
Guido van Rossumf78abae1997-01-21 22:02:36 +000021594else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021596sed 's/^/| /' conftest.$ac_ext >&5
21597
Thomas Wouters477c8d52006-05-27 19:21:47 +000021598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021599fi
21600
21601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021602{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21603echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021604
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021605{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21606echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021607if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021608 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021609else
Martin v. Löwis11437992002-04-12 09:54:03 +000021610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021611/* confdefs.h. */
21612_ACEOF
21613cat confdefs.h >>conftest.$ac_ext
21614cat >>conftest.$ac_ext <<_ACEOF
21615/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021616
21617# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021618int
21619main ()
21620{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021621struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021622 ;
21623 return 0;
21624}
21625_ACEOF
21626rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021627if { (ac_try="$ac_compile"
21628case "(($ac_try" in
21629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21630 *) ac_try_echo=$ac_try;;
21631esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021635 grep -v '^ *+' conftest.er1 >conftest.err
21636 rm -f conftest.er1
21637 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021639 (exit $ac_status); } && {
21640 test -z "$ac_c_werror_flag" ||
21641 test ! -s conftest.err
21642 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021643 ac_cv_struct_addrinfo=yes
21644else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021646sed 's/^/| /' conftest.$ac_ext >&5
21647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021648 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021649fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21652fi
21653
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021654{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21655echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021656if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021657
21658cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021659#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021660_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021661
21662fi
21663
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021664{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21665echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021666if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021667 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021668else
Martin v. Löwis11437992002-04-12 09:54:03 +000021669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021670/* confdefs.h. */
21671_ACEOF
21672cat confdefs.h >>conftest.$ac_ext
21673cat >>conftest.$ac_ext <<_ACEOF
21674/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021675
21676# include <sys/types.h>
21677# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021678int
21679main ()
21680{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021681struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021682 ;
21683 return 0;
21684}
21685_ACEOF
21686rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021687if { (ac_try="$ac_compile"
21688case "(($ac_try" in
21689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21690 *) ac_try_echo=$ac_try;;
21691esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021693 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021695 grep -v '^ *+' conftest.er1 >conftest.err
21696 rm -f conftest.er1
21697 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021699 (exit $ac_status); } && {
21700 test -z "$ac_c_werror_flag" ||
21701 test ! -s conftest.err
21702 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021703 ac_cv_struct_sockaddr_storage=yes
21704else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021706sed 's/^/| /' conftest.$ac_ext >&5
21707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021708 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021709fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21712fi
21713
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021714{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21715echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021716if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021717
21718cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021719#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021720_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021721
21722fi
21723
Guido van Rossum627b2d71993-12-24 10:39:16 +000021724# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021725
Michael W. Hudson54241132001-12-07 15:38:26 +000021726
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021727{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21728echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021729if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021730 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021731else
Martin v. Löwis11437992002-04-12 09:54:03 +000021732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021733/* confdefs.h. */
21734_ACEOF
21735cat confdefs.h >>conftest.$ac_ext
21736cat >>conftest.$ac_ext <<_ACEOF
21737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021738$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021739int
21740main ()
21741{
21742static int test_array [1 - 2 * !(((char) -1) < 0)];
21743test_array [0] = 0
21744
21745 ;
21746 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021747}
Martin v. Löwis11437992002-04-12 09:54:03 +000021748_ACEOF
21749rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021750if { (ac_try="$ac_compile"
21751case "(($ac_try" in
21752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21753 *) ac_try_echo=$ac_try;;
21754esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021758 grep -v '^ *+' conftest.er1 >conftest.err
21759 rm -f conftest.er1
21760 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021762 (exit $ac_status); } && {
21763 test -z "$ac_c_werror_flag" ||
21764 test ! -s conftest.err
21765 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021766 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021767else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021769sed 's/^/| /' conftest.$ac_ext >&5
21770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021771 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021773
21774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021775fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021776{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21777echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021778if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021779 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021780#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021781_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021782
21783fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021784
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021785{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21786echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021787if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021788 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021789else
21790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021791/* confdefs.h. */
21792_ACEOF
21793cat confdefs.h >>conftest.$ac_ext
21794cat >>conftest.$ac_ext <<_ACEOF
21795/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021796
Martin v. Löwis11437992002-04-12 09:54:03 +000021797int
21798main ()
21799{
21800/* FIXME: Include the comments suggested by Paul. */
21801#ifndef __cplusplus
21802 /* Ultrix mips cc rejects this. */
21803 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021804 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021805 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021806 char const *const *pcpcc;
21807 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021808 /* NEC SVR4.0.2 mips cc rejects this. */
21809 struct point {int x, y;};
21810 static struct point const zero = {0,0};
21811 /* AIX XL C 1.02.0.0 rejects this.
21812 It does not let you subtract one const X* pointer from another in
21813 an arm of an if-expression whose if-part is not a constant
21814 expression */
21815 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021816 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021817 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021818 ++pcpcc;
21819 ppc = (char**) pcpcc;
21820 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021821 { /* SCO 3.2v4 cc rejects this. */
21822 char *t;
21823 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021824
Martin v. Löwis11437992002-04-12 09:54:03 +000021825 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021826 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021827 }
21828 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21829 int x[] = {25, 17};
21830 const int *foo = &x[0];
21831 ++foo;
21832 }
21833 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21834 typedef const int *iptr;
21835 iptr p = 0;
21836 ++p;
21837 }
21838 { /* AIX XL C 1.02.0.0 rejects this saying
21839 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21840 struct s { int j; const int *ap[3]; };
21841 struct s *b; b->j = 5;
21842 }
21843 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21844 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021845 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021846 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021847 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021848#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021849
Martin v. Löwis11437992002-04-12 09:54:03 +000021850 ;
21851 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021852}
Martin v. Löwis11437992002-04-12 09:54:03 +000021853_ACEOF
21854rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021855if { (ac_try="$ac_compile"
21856case "(($ac_try" in
21857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21858 *) ac_try_echo=$ac_try;;
21859esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021863 grep -v '^ *+' conftest.er1 >conftest.err
21864 rm -f conftest.er1
21865 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021867 (exit $ac_status); } && {
21868 test -z "$ac_c_werror_flag" ||
21869 test ! -s conftest.err
21870 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021871 ac_cv_c_const=yes
21872else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021874sed 's/^/| /' conftest.$ac_ext >&5
21875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021876 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021878
21879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021880fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021881{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21882echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021883if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021884
21885cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021886#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021887_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021888
21889fi
21890
Michael W. Hudson54241132001-12-07 15:38:26 +000021891
Guido van Rossumda88dad1995-01-26 00:46:29 +000021892works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021893{ echo "$as_me:$LINENO: checking for working volatile" >&5
21894echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021895cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021896/* confdefs.h. */
21897_ACEOF
21898cat confdefs.h >>conftest.$ac_ext
21899cat >>conftest.$ac_ext <<_ACEOF
21900/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021901
Martin v. Löwis11437992002-04-12 09:54:03 +000021902int
21903main ()
21904{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021905volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021906 ;
21907 return 0;
21908}
21909_ACEOF
21910rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021911if { (ac_try="$ac_compile"
21912case "(($ac_try" in
21913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21914 *) ac_try_echo=$ac_try;;
21915esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021919 grep -v '^ *+' conftest.er1 >conftest.err
21920 rm -f conftest.er1
21921 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021923 (exit $ac_status); } && {
21924 test -z "$ac_c_werror_flag" ||
21925 test ! -s conftest.err
21926 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021927 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021928else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021930sed 's/^/| /' conftest.$ac_ext >&5
21931
Martin v. Löwis11437992002-04-12 09:54:03 +000021932
21933cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021934#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021935_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021936
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021937
Guido van Rossum627b2d71993-12-24 10:39:16 +000021938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021939
21940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021941{ echo "$as_me:$LINENO: result: $works" >&5
21942echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021943
Guido van Rossumda88dad1995-01-26 00:46:29 +000021944works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021945{ echo "$as_me:$LINENO: checking for working signed char" >&5
21946echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021948/* confdefs.h. */
21949_ACEOF
21950cat confdefs.h >>conftest.$ac_ext
21951cat >>conftest.$ac_ext <<_ACEOF
21952/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021953
Martin v. Löwis11437992002-04-12 09:54:03 +000021954int
21955main ()
21956{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021957signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021958 ;
21959 return 0;
21960}
21961_ACEOF
21962rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021963if { (ac_try="$ac_compile"
21964case "(($ac_try" in
21965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21966 *) ac_try_echo=$ac_try;;
21967esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021971 grep -v '^ *+' conftest.er1 >conftest.err
21972 rm -f conftest.er1
21973 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021975 (exit $ac_status); } && {
21976 test -z "$ac_c_werror_flag" ||
21977 test ! -s conftest.err
21978 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021979 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021980else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021982sed 's/^/| /' conftest.$ac_ext >&5
21983
Martin v. Löwis11437992002-04-12 09:54:03 +000021984
21985cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021986#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021987_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021988
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021989
Guido van Rossum7f43da71994-08-01 12:15:30 +000021990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021991
21992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021993{ echo "$as_me:$LINENO: result: $works" >&5
21994echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021995
Guido van Rossumda88dad1995-01-26 00:46:29 +000021996have_prototypes=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021997{ echo "$as_me:$LINENO: checking for prototypes" >&5
21998echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021999cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022000/* confdefs.h. */
22001_ACEOF
22002cat confdefs.h >>conftest.$ac_ext
22003cat >>conftest.$ac_ext <<_ACEOF
22004/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022005int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022006int
22007main ()
22008{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022009return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022010 ;
22011 return 0;
22012}
22013_ACEOF
22014rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022015if { (ac_try="$ac_compile"
22016case "(($ac_try" in
22017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22018 *) ac_try_echo=$ac_try;;
22019esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022023 grep -v '^ *+' conftest.er1 >conftest.err
22024 rm -f conftest.er1
22025 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022027 (exit $ac_status); } && {
22028 test -z "$ac_c_werror_flag" ||
22029 test ! -s conftest.err
22030 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022031
22032
22033cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022034#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022035_ACEOF
22036
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022037 have_prototypes=yes
22038
Guido van Rossumf78abae1997-01-21 22:02:36 +000022039else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022041sed 's/^/| /' conftest.$ac_ext >&5
22042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022043
Guido van Rossum7f43da71994-08-01 12:15:30 +000022044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022045
22046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022047{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22048echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022049
Guido van Rossumda88dad1995-01-26 00:46:29 +000022050works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022051{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22052echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022054/* confdefs.h. */
22055_ACEOF
22056cat confdefs.h >>conftest.$ac_ext
22057cat >>conftest.$ac_ext <<_ACEOF
22058/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022059
22060#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022061int foo(int x, ...) {
22062 va_list va;
22063 va_start(va, x);
22064 va_arg(va, int);
22065 va_arg(va, char *);
22066 va_arg(va, double);
22067 return 0;
22068}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022069
Martin v. Löwis11437992002-04-12 09:54:03 +000022070int
22071main ()
22072{
Guido van Rossum90eea071996-08-30 20:58:57 +000022073return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022074 ;
22075 return 0;
22076}
22077_ACEOF
22078rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022079if { (ac_try="$ac_compile"
22080case "(($ac_try" in
22081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22082 *) ac_try_echo=$ac_try;;
22083esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022087 grep -v '^ *+' conftest.er1 >conftest.err
22088 rm -f conftest.er1
22089 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022091 (exit $ac_status); } && {
22092 test -z "$ac_c_werror_flag" ||
22093 test ! -s conftest.err
22094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022095
22096
22097cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022098#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022099_ACEOF
22100
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022101 works=yes
22102
Guido van Rossumf78abae1997-01-21 22:02:36 +000022103else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022105sed 's/^/| /' conftest.$ac_ext >&5
22106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022107
Guido van Rossum627b2d71993-12-24 10:39:16 +000022108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022109
22110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022111{ echo "$as_me:$LINENO: result: $works" >&5
22112echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022113
Martin v. Löwisd6320502004-08-12 13:45:08 +000022114# check for socketpair
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022115{ echo "$as_me:$LINENO: checking for socketpair" >&5
22116echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022117cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022118/* confdefs.h. */
22119_ACEOF
22120cat confdefs.h >>conftest.$ac_ext
22121cat >>conftest.$ac_ext <<_ACEOF
22122/* end confdefs.h. */
22123
22124#include <sys/types.h>
22125#include <sys/socket.h>
22126
22127int
22128main ()
22129{
22130void *x=socketpair
22131 ;
22132 return 0;
22133}
22134_ACEOF
22135rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022136if { (ac_try="$ac_compile"
22137case "(($ac_try" in
22138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22139 *) ac_try_echo=$ac_try;;
22140esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022144 grep -v '^ *+' conftest.er1 >conftest.err
22145 rm -f conftest.er1
22146 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022148 (exit $ac_status); } && {
22149 test -z "$ac_c_werror_flag" ||
22150 test ! -s conftest.err
22151 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022152
22153cat >>confdefs.h <<\_ACEOF
22154#define HAVE_SOCKETPAIR 1
22155_ACEOF
22156
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022157 { echo "$as_me:$LINENO: result: yes" >&5
22158echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022159else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022160 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022161sed 's/^/| /' conftest.$ac_ext >&5
22162
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022163 { echo "$as_me:$LINENO: result: no" >&5
22164echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022165
22166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022167
22168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022169
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022170# check if sockaddr has sa_len member
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022171{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22172echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022174/* confdefs.h. */
22175_ACEOF
22176cat confdefs.h >>conftest.$ac_ext
22177cat >>conftest.$ac_ext <<_ACEOF
22178/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022179#include <sys/types.h>
22180#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022181int
22182main ()
22183{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022184struct sockaddr x;
22185x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022186 ;
22187 return 0;
22188}
22189_ACEOF
22190rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022191if { (ac_try="$ac_compile"
22192case "(($ac_try" in
22193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22194 *) ac_try_echo=$ac_try;;
22195esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022199 grep -v '^ *+' conftest.er1 >conftest.err
22200 rm -f conftest.er1
22201 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022203 (exit $ac_status); } && {
22204 test -z "$ac_c_werror_flag" ||
22205 test ! -s conftest.err
22206 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022207 { echo "$as_me:$LINENO: result: yes" >&5
22208echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022209
22210cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022211#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022212_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022213
22214else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022216sed 's/^/| /' conftest.$ac_ext >&5
22217
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022218 { echo "$as_me:$LINENO: result: no" >&5
22219echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022221
22222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022223
Guido van Rossumda88dad1995-01-26 00:46:29 +000022224va_list_is_array=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022225{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22226echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022227cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022228/* confdefs.h. */
22229_ACEOF
22230cat confdefs.h >>conftest.$ac_ext
22231cat >>conftest.$ac_ext <<_ACEOF
22232/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022233
22234#ifdef HAVE_STDARG_PROTOTYPES
22235#include <stdarg.h>
22236#else
22237#include <varargs.h>
22238#endif
22239
Martin v. Löwis11437992002-04-12 09:54:03 +000022240int
22241main ()
22242{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022243va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022244 ;
22245 return 0;
22246}
22247_ACEOF
22248rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022249if { (ac_try="$ac_compile"
22250case "(($ac_try" in
22251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22252 *) ac_try_echo=$ac_try;;
22253esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022255 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022257 grep -v '^ *+' conftest.er1 >conftest.err
22258 rm -f conftest.er1
22259 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022261 (exit $ac_status); } && {
22262 test -z "$ac_c_werror_flag" ||
22263 test ! -s conftest.err
22264 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022265 :
22266else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022268sed 's/^/| /' conftest.$ac_ext >&5
22269
Martin v. Löwis11437992002-04-12 09:54:03 +000022270
22271
22272cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022273#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022274_ACEOF
22275
Guido van Rossumda88dad1995-01-26 00:46:29 +000022276 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022277
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022279
22280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022281{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22282echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022283
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022284# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022285
22286
22287
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022288{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22289echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022290if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022292else
Martin v. Löwis11437992002-04-12 09:54:03 +000022293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022294/* confdefs.h. */
22295_ACEOF
22296cat confdefs.h >>conftest.$ac_ext
22297cat >>conftest.$ac_ext <<_ACEOF
22298/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022299/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22300 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22301#define gethostbyname_r innocuous_gethostbyname_r
22302
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022303/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022304 which can conflict with char gethostbyname_r (); below.
22305 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022306 <limits.h> exists even on freestanding compilers. */
22307
22308#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022309# include <limits.h>
22310#else
22311# include <assert.h>
22312#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022313
22314#undef gethostbyname_r
22315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022316/* Override any GCC internal prototype to avoid an error.
22317 Use char because int might match the return type of a GCC
22318 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022319#ifdef __cplusplus
22320extern "C"
22321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022322char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022323/* The GNU C library defines this for functions which it implements
22324 to always fail with ENOSYS. Some functions are actually named
22325 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022326#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022327choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022328#endif
22329
Skip Montanaro6dead952003-09-25 14:50:04 +000022330int
22331main ()
22332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022333return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022334 ;
22335 return 0;
22336}
22337_ACEOF
22338rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022339if { (ac_try="$ac_link"
22340case "(($ac_try" in
22341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22342 *) ac_try_echo=$ac_try;;
22343esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022345 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022347 grep -v '^ *+' conftest.er1 >conftest.err
22348 rm -f conftest.er1
22349 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022351 (exit $ac_status); } && {
22352 test -z "$ac_c_werror_flag" ||
22353 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022354 } && test -s conftest$ac_exeext &&
22355 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022356 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022357else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022359sed 's/^/| /' conftest.$ac_ext >&5
22360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022361 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022363
22364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022365 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022366fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022367{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22368echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22369if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022370
Martin v. Löwis11437992002-04-12 09:54:03 +000022371 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022372#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022373_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022374
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022375 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22376echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022377 OLD_CFLAGS=$CFLAGS
22378 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022380/* confdefs.h. */
22381_ACEOF
22382cat confdefs.h >>conftest.$ac_ext
22383cat >>conftest.$ac_ext <<_ACEOF
22384/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022385
22386# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022387
Martin v. Löwis11437992002-04-12 09:54:03 +000022388int
22389main ()
22390{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022391
22392 char *name;
22393 struct hostent *he, *res;
22394 char buffer[2048];
22395 int buflen = 2048;
22396 int h_errnop;
22397
22398 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022399
22400 ;
22401 return 0;
22402}
22403_ACEOF
22404rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022405if { (ac_try="$ac_compile"
22406case "(($ac_try" in
22407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22408 *) ac_try_echo=$ac_try;;
22409esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022413 grep -v '^ *+' conftest.er1 >conftest.err
22414 rm -f conftest.er1
22415 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022417 (exit $ac_status); } && {
22418 test -z "$ac_c_werror_flag" ||
22419 test ! -s conftest.err
22420 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022421
22422 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022423#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022424_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022425
Martin v. Löwis11437992002-04-12 09:54:03 +000022426
22427cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022428#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022429_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022430
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022431 { echo "$as_me:$LINENO: result: yes" >&5
22432echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022433
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022434else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022436sed 's/^/| /' conftest.$ac_ext >&5
22437
Martin v. Löwis11437992002-04-12 09:54:03 +000022438
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022439 { echo "$as_me:$LINENO: result: no" >&5
22440echo "${ECHO_T}no" >&6; }
22441 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22442echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022444/* confdefs.h. */
22445_ACEOF
22446cat confdefs.h >>conftest.$ac_ext
22447cat >>conftest.$ac_ext <<_ACEOF
22448/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022449
22450# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022451
Martin v. Löwis11437992002-04-12 09:54:03 +000022452int
22453main ()
22454{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022455
22456 char *name;
22457 struct hostent *he;
22458 char buffer[2048];
22459 int buflen = 2048;
22460 int h_errnop;
22461
22462 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022463
22464 ;
22465 return 0;
22466}
22467_ACEOF
22468rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022469if { (ac_try="$ac_compile"
22470case "(($ac_try" in
22471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22472 *) ac_try_echo=$ac_try;;
22473esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022477 grep -v '^ *+' conftest.er1 >conftest.err
22478 rm -f conftest.er1
22479 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022481 (exit $ac_status); } && {
22482 test -z "$ac_c_werror_flag" ||
22483 test ! -s conftest.err
22484 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022485
22486 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022487#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022488_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022489
Martin v. Löwis11437992002-04-12 09:54:03 +000022490
22491cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022492#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022493_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022494
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022495 { echo "$as_me:$LINENO: result: yes" >&5
22496echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022497
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022498else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022500sed 's/^/| /' conftest.$ac_ext >&5
22501
Martin v. Löwis11437992002-04-12 09:54:03 +000022502
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022503 { echo "$as_me:$LINENO: result: no" >&5
22504echo "${ECHO_T}no" >&6; }
22505 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22506echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022508/* confdefs.h. */
22509_ACEOF
22510cat confdefs.h >>conftest.$ac_ext
22511cat >>conftest.$ac_ext <<_ACEOF
22512/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022513
22514# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022515
Martin v. Löwis11437992002-04-12 09:54:03 +000022516int
22517main ()
22518{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022519
22520 char *name;
22521 struct hostent *he;
22522 struct hostent_data data;
22523
22524 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022525
22526 ;
22527 return 0;
22528}
22529_ACEOF
22530rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022531if { (ac_try="$ac_compile"
22532case "(($ac_try" in
22533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22534 *) ac_try_echo=$ac_try;;
22535esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022539 grep -v '^ *+' conftest.er1 >conftest.err
22540 rm -f conftest.er1
22541 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022543 (exit $ac_status); } && {
22544 test -z "$ac_c_werror_flag" ||
22545 test ! -s conftest.err
22546 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022547
22548 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022549#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022550_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022551
Martin v. Löwis11437992002-04-12 09:54:03 +000022552
22553cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022554#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022555_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022556
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022557 { echo "$as_me:$LINENO: result: yes" >&5
22558echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022559
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022560else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022562sed 's/^/| /' conftest.$ac_ext >&5
22563
Martin v. Löwis11437992002-04-12 09:54:03 +000022564
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022565 { echo "$as_me:$LINENO: result: no" >&5
22566echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022567
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022569
22570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022571
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022573
22574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022575
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022577
22578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022579 CFLAGS=$OLD_CFLAGS
22580
22581else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022582
Martin v. Löwis11437992002-04-12 09:54:03 +000022583
22584for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022585do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022586as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22587{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22588echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022589if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022591else
Martin v. Löwis11437992002-04-12 09:54:03 +000022592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022593/* confdefs.h. */
22594_ACEOF
22595cat confdefs.h >>conftest.$ac_ext
22596cat >>conftest.$ac_ext <<_ACEOF
22597/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022598/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22599 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22600#define $ac_func innocuous_$ac_func
22601
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022602/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022603 which can conflict with char $ac_func (); below.
22604 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022605 <limits.h> exists even on freestanding compilers. */
22606
22607#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022608# include <limits.h>
22609#else
22610# include <assert.h>
22611#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022612
22613#undef $ac_func
22614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022615/* Override any GCC internal prototype to avoid an error.
22616 Use char because int might match the return type of a GCC
22617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022618#ifdef __cplusplus
22619extern "C"
22620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022621char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022622/* The GNU C library defines this for functions which it implements
22623 to always fail with ENOSYS. Some functions are actually named
22624 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022625#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022626choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022627#endif
22628
Skip Montanaro6dead952003-09-25 14:50:04 +000022629int
22630main ()
22631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022632return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022633 ;
22634 return 0;
22635}
22636_ACEOF
22637rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022638if { (ac_try="$ac_link"
22639case "(($ac_try" in
22640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22641 *) ac_try_echo=$ac_try;;
22642esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022644 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022646 grep -v '^ *+' conftest.er1 >conftest.err
22647 rm -f conftest.er1
22648 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022650 (exit $ac_status); } && {
22651 test -z "$ac_c_werror_flag" ||
22652 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022653 } && test -s conftest$ac_exeext &&
22654 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022655 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022656else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022658sed 's/^/| /' conftest.$ac_ext >&5
22659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022660 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022662
22663rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022664 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022665fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022666ac_res=`eval echo '${'$as_ac_var'}'`
22667 { echo "$as_me:$LINENO: result: $ac_res" >&5
22668echo "${ECHO_T}$ac_res" >&6; }
22669if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022670 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022671#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022672_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022673
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022674fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022675done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022676
Michael W. Hudson54241132001-12-07 15:38:26 +000022677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022678fi
22679
Michael W. Hudson54241132001-12-07 15:38:26 +000022680
22681
22682
22683
22684
22685
Guido van Rossum627b2d71993-12-24 10:39:16 +000022686# checks for system services
22687# (none yet)
22688
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022689# Linux requires this for correct f.p. operations
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022690{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22691echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022692if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022693 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022694else
Martin v. Löwis11437992002-04-12 09:54:03 +000022695 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022696/* confdefs.h. */
22697_ACEOF
22698cat confdefs.h >>conftest.$ac_ext
22699cat >>conftest.$ac_ext <<_ACEOF
22700/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022701/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22702 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22703#define __fpu_control innocuous___fpu_control
22704
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022705/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022706 which can conflict with char __fpu_control (); below.
22707 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022708 <limits.h> exists even on freestanding compilers. */
22709
22710#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022711# include <limits.h>
22712#else
22713# include <assert.h>
22714#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022715
22716#undef __fpu_control
22717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022718/* Override any GCC internal prototype to avoid an error.
22719 Use char because int might match the return type of a GCC
22720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022721#ifdef __cplusplus
22722extern "C"
22723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022724char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022725/* The GNU C library defines this for functions which it implements
22726 to always fail with ENOSYS. Some functions are actually named
22727 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022728#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022729choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022730#endif
22731
Skip Montanaro6dead952003-09-25 14:50:04 +000022732int
22733main ()
22734{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022735return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022736 ;
22737 return 0;
22738}
22739_ACEOF
22740rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022741if { (ac_try="$ac_link"
22742case "(($ac_try" in
22743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22744 *) ac_try_echo=$ac_try;;
22745esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022747 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022749 grep -v '^ *+' conftest.er1 >conftest.err
22750 rm -f conftest.er1
22751 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022753 (exit $ac_status); } && {
22754 test -z "$ac_c_werror_flag" ||
22755 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022756 } && test -s conftest$ac_exeext &&
22757 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022758 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022759else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022761sed 's/^/| /' conftest.$ac_ext >&5
22762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022763 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022765
22766rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022767 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022768fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022769{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22770echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22771if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022772 :
22773else
Martin v. Löwis11437992002-04-12 09:54:03 +000022774
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022775{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22776echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022777if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022778 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022779else
Martin v. Löwis11437992002-04-12 09:54:03 +000022780 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022781LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022783/* confdefs.h. */
22784_ACEOF
22785cat confdefs.h >>conftest.$ac_ext
22786cat >>conftest.$ac_ext <<_ACEOF
22787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022789/* Override any GCC internal prototype to avoid an error.
22790 Use char because int might match the return type of a GCC
22791 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022792#ifdef __cplusplus
22793extern "C"
22794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022795char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022796int
22797main ()
22798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022799return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022800 ;
22801 return 0;
22802}
22803_ACEOF
22804rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022805if { (ac_try="$ac_link"
22806case "(($ac_try" in
22807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22808 *) ac_try_echo=$ac_try;;
22809esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022811 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022813 grep -v '^ *+' conftest.er1 >conftest.err
22814 rm -f conftest.er1
22815 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022817 (exit $ac_status); } && {
22818 test -z "$ac_c_werror_flag" ||
22819 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022820 } && test -s conftest$ac_exeext &&
22821 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022822 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022823else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022825sed 's/^/| /' conftest.$ac_ext >&5
22826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022827 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022829
22830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022832LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022833fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022834{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22835echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22836if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022837 cat >>confdefs.h <<_ACEOF
22838#define HAVE_LIBIEEE 1
22839_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022840
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022841 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022842
Guido van Rossum627b2d71993-12-24 10:39:16 +000022843fi
22844
Michael W. Hudson54241132001-12-07 15:38:26 +000022845
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022846fi
22847
Michael W. Hudson54241132001-12-07 15:38:26 +000022848
Guido van Rossum7f253911997-05-09 02:42:48 +000022849# Check for --with-fpectl
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022850{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22851echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022853# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022854if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022855 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022856if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022857then
22858
22859cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022860#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022861_ACEOF
22862
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022863 { echo "$as_me:$LINENO: result: yes" >&5
22864echo "${ECHO_T}yes" >&6; }
22865else { echo "$as_me:$LINENO: result: no" >&5
22866echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022867fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022868else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022869 { echo "$as_me:$LINENO: result: no" >&5
22870echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022871fi
22872
Guido van Rossum7f253911997-05-09 02:42:48 +000022873
Guido van Rossum7f43da71994-08-01 12:15:30 +000022874# check for --with-libm=...
22875
Guido van Rossum563e7081996-09-10 18:20:48 +000022876case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022877Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022878*) LIBM=-lm
22879esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022880{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22881echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022883# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022884if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022885 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022886if test "$withval" = no
22887then LIBM=
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022888 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22889echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022890elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022891then LIBM=$withval
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022892 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22893echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22894else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22895echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022896 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022897fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022898else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022899 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22900echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022901fi
22902
Guido van Rossum7f43da71994-08-01 12:15:30 +000022903
22904# check for --with-libc=...
22905
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022906{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22907echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022909# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022910if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022911 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022912if test "$withval" = no
22913then LIBC=
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022914 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22915echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022916elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022917then LIBC=$withval
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022918 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22919echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22920else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22921echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022922 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022923fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022924else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022925 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22926echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022927fi
22928
Guido van Rossum7f43da71994-08-01 12:15:30 +000022929
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022930# **************************************************
22931# * Check for various properties of floating point *
22932# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022933
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022934{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22935echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022936if test "${ac_cv_little_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022937 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022938else
22939
22940if test "$cross_compiling" = yes; then
22941 ac_cv_little_endian_double=no
22942else
22943 cat >conftest.$ac_ext <<_ACEOF
22944/* confdefs.h. */
22945_ACEOF
22946cat confdefs.h >>conftest.$ac_ext
22947cat >>conftest.$ac_ext <<_ACEOF
22948/* end confdefs.h. */
22949
22950#include <string.h>
22951int main() {
22952 double x = 9006104071832581.0;
22953 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22954 return 0;
22955 else
22956 return 1;
22957}
22958
22959_ACEOF
22960rm -f conftest$ac_exeext
22961if { (ac_try="$ac_link"
22962case "(($ac_try" in
22963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22964 *) ac_try_echo=$ac_try;;
22965esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022967 (eval "$ac_link") 2>&5
22968 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022970 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22971 { (case "(($ac_try" in
22972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22973 *) ac_try_echo=$ac_try;;
22974esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022976 (eval "$ac_try") 2>&5
22977 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022979 (exit $ac_status); }; }; then
22980 ac_cv_little_endian_double=yes
22981else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022982 echo "$as_me: program exited with status $ac_status" >&5
22983echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022984sed 's/^/| /' conftest.$ac_ext >&5
22985
22986( exit $ac_status )
22987ac_cv_little_endian_double=no
22988fi
22989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22990fi
22991
22992
22993fi
22994
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022995{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22996echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022997if test "$ac_cv_little_endian_double" = yes
22998then
22999
23000cat >>confdefs.h <<\_ACEOF
23001#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23002_ACEOF
23003
23004fi
23005
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023006{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23007echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023008if test "${ac_cv_big_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023009 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023010else
23011
23012if test "$cross_compiling" = yes; then
23013 ac_cv_big_endian_double=no
23014else
23015 cat >conftest.$ac_ext <<_ACEOF
23016/* confdefs.h. */
23017_ACEOF
23018cat confdefs.h >>conftest.$ac_ext
23019cat >>conftest.$ac_ext <<_ACEOF
23020/* end confdefs.h. */
23021
23022#include <string.h>
23023int main() {
23024 double x = 9006104071832581.0;
23025 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23026 return 0;
23027 else
23028 return 1;
23029}
23030
23031_ACEOF
23032rm -f conftest$ac_exeext
23033if { (ac_try="$ac_link"
23034case "(($ac_try" in
23035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23036 *) ac_try_echo=$ac_try;;
23037esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023039 (eval "$ac_link") 2>&5
23040 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23043 { (case "(($ac_try" in
23044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23045 *) ac_try_echo=$ac_try;;
23046esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023048 (eval "$ac_try") 2>&5
23049 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023051 (exit $ac_status); }; }; then
23052 ac_cv_big_endian_double=yes
23053else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023054 echo "$as_me: program exited with status $ac_status" >&5
23055echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023056sed 's/^/| /' conftest.$ac_ext >&5
23057
23058( exit $ac_status )
23059ac_cv_big_endian_double=no
23060fi
23061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23062fi
23063
23064
23065fi
23066
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023067{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23068echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023069if test "$ac_cv_big_endian_double" = yes
23070then
23071
23072cat >>confdefs.h <<\_ACEOF
23073#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23074_ACEOF
23075
23076fi
23077
23078# Some ARM platforms use a mixed-endian representation for doubles.
23079# While Python doesn't currently have full support for these platforms
23080# (see e.g., issue 1762561), we can at least make sure that float <-> string
23081# conversions work.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023082{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23083echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023084if test "${ac_cv_mixed_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023085 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023086else
23087
23088if test "$cross_compiling" = yes; then
23089 ac_cv_mixed_endian_double=no
23090else
23091 cat >conftest.$ac_ext <<_ACEOF
23092/* confdefs.h. */
23093_ACEOF
23094cat confdefs.h >>conftest.$ac_ext
23095cat >>conftest.$ac_ext <<_ACEOF
23096/* end confdefs.h. */
23097
23098#include <string.h>
23099int main() {
23100 double x = 9006104071832581.0;
23101 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23102 return 0;
23103 else
23104 return 1;
23105}
23106
23107_ACEOF
23108rm -f conftest$ac_exeext
23109if { (ac_try="$ac_link"
23110case "(($ac_try" in
23111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23112 *) ac_try_echo=$ac_try;;
23113esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023115 (eval "$ac_link") 2>&5
23116 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023118 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23119 { (case "(($ac_try" in
23120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23121 *) ac_try_echo=$ac_try;;
23122esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023124 (eval "$ac_try") 2>&5
23125 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023127 (exit $ac_status); }; }; then
23128 ac_cv_mixed_endian_double=yes
23129else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023130 echo "$as_me: program exited with status $ac_status" >&5
23131echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023132sed 's/^/| /' conftest.$ac_ext >&5
23133
23134( exit $ac_status )
23135ac_cv_mixed_endian_double=no
23136fi
23137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23138fi
23139
23140
23141fi
23142
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023143{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23144echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023145if test "$ac_cv_mixed_endian_double" = yes
23146then
23147
23148cat >>confdefs.h <<\_ACEOF
23149#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23150_ACEOF
23151
23152fi
23153
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023154# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023155# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023156# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023157# rounding; this is a problem on x86, where the x87 FPU has a default
23158# rounding precision of 64 bits. For gcc/x86, we try to fix this by
23159# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023160if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
23161then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023162 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000023163 # x87 control word. It should be, but you never know...
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023164 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
23165echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023166 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023167/* confdefs.h. */
23168_ACEOF
23169cat confdefs.h >>conftest.$ac_ext
23170cat >>conftest.$ac_ext <<_ACEOF
23171/* end confdefs.h. */
23172
23173int
23174main ()
23175{
23176
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023177 unsigned short cw;
23178 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23179 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023180
23181 ;
23182 return 0;
23183}
23184_ACEOF
23185rm -f conftest.$ac_objext
23186if { (ac_try="$ac_compile"
23187case "(($ac_try" in
23188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23189 *) ac_try_echo=$ac_try;;
23190esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023192 (eval "$ac_compile") 2>conftest.er1
23193 ac_status=$?
23194 grep -v '^ *+' conftest.er1 >conftest.err
23195 rm -f conftest.er1
23196 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023198 (exit $ac_status); } && {
23199 test -z "$ac_c_werror_flag" ||
23200 test ! -s conftest.err
23201 } && test -s conftest.$ac_objext; then
23202 have_gcc_asm_for_x87=yes
23203else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023204 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023205sed 's/^/| /' conftest.$ac_ext >&5
23206
23207 have_gcc_asm_for_x87=no
23208fi
23209
23210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023211 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
23212echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023213 if test "$have_gcc_asm_for_x87" = yes
23214 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023215
23216cat >>confdefs.h <<\_ACEOF
23217#define HAVE_GCC_ASM_FOR_X87 1
23218_ACEOF
23219
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023220 fi
23221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023222
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023223# Detect whether system arithmetic is subject to x87-style double
23224# rounding issues. The result of this test has little meaning on non
23225# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23226# mode is round-to-nearest and double rounding issues are present, and
23227# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023228{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23229echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023230# $BASECFLAGS may affect the result
23231ac_save_cc="$CC"
23232CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023233if test "$cross_compiling" = yes; then
23234 ac_cv_x87_double_rounding=no
23235else
23236 cat >conftest.$ac_ext <<_ACEOF
23237/* confdefs.h. */
23238_ACEOF
23239cat confdefs.h >>conftest.$ac_ext
23240cat >>conftest.$ac_ext <<_ACEOF
23241/* end confdefs.h. */
23242
23243#include <stdlib.h>
23244#include <math.h>
23245int main() {
23246 volatile double x, y, z;
23247 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23248 x = 0.99999999999999989; /* 1-2**-53 */
23249 y = 1./x;
23250 if (y != 1.)
23251 exit(0);
23252 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23253 x = 1e16;
23254 y = 2.99999;
23255 z = x + y;
23256 if (z != 1e16+4.)
23257 exit(0);
23258 /* both tests show evidence of double rounding */
23259 exit(1);
23260}
23261
23262_ACEOF
23263rm -f conftest$ac_exeext
23264if { (ac_try="$ac_link"
23265case "(($ac_try" in
23266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23267 *) ac_try_echo=$ac_try;;
23268esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023270 (eval "$ac_link") 2>&5
23271 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023273 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23274 { (case "(($ac_try" in
23275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23276 *) ac_try_echo=$ac_try;;
23277esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023279 (eval "$ac_try") 2>&5
23280 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023282 (exit $ac_status); }; }; then
23283 ac_cv_x87_double_rounding=no
23284else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023285 echo "$as_me: program exited with status $ac_status" >&5
23286echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023287sed 's/^/| /' conftest.$ac_ext >&5
23288
23289( exit $ac_status )
23290ac_cv_x87_double_rounding=yes
23291fi
23292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23293fi
23294
23295
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023296CC="$ac_save_cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023297{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23298echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023299if test "$ac_cv_x87_double_rounding" = yes
23300then
23301
23302cat >>confdefs.h <<\_ACEOF
23303#define X87_DOUBLE_ROUNDING 1
23304_ACEOF
23305
23306fi
23307
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023308# ************************************
23309# * Check for mathematical functions *
23310# ************************************
23311
23312LIBS_SAVE=$LIBS
23313LIBS="$LIBS $LIBM"
23314
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023315# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23316# -0. on some architectures.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023317{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23318echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023319if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023320 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023321else
23322
23323if test "$cross_compiling" = yes; then
23324 ac_cv_tanh_preserves_zero_sign=no
23325else
23326 cat >conftest.$ac_ext <<_ACEOF
23327/* confdefs.h. */
23328_ACEOF
23329cat confdefs.h >>conftest.$ac_ext
23330cat >>conftest.$ac_ext <<_ACEOF
23331/* end confdefs.h. */
23332
23333#include <math.h>
23334#include <stdlib.h>
23335int main() {
23336 /* return 0 if either negative zeros don't exist
23337 on this platform or if negative zeros exist
23338 and tanh(-0.) == -0. */
23339 if (atan2(0., -1.) == atan2(-0., -1.) ||
23340 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23341 else exit(1);
23342}
23343
23344_ACEOF
23345rm -f conftest$ac_exeext
23346if { (ac_try="$ac_link"
23347case "(($ac_try" in
23348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23349 *) ac_try_echo=$ac_try;;
23350esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023352 (eval "$ac_link") 2>&5
23353 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23356 { (case "(($ac_try" in
23357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23358 *) ac_try_echo=$ac_try;;
23359esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023361 (eval "$ac_try") 2>&5
23362 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023364 (exit $ac_status); }; }; then
23365 ac_cv_tanh_preserves_zero_sign=yes
23366else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023367 echo "$as_me: program exited with status $ac_status" >&5
23368echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023369sed 's/^/| /' conftest.$ac_ext >&5
23370
23371( exit $ac_status )
23372ac_cv_tanh_preserves_zero_sign=no
23373fi
23374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23375fi
23376
23377
23378fi
23379
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023380{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23381echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023382if test "$ac_cv_tanh_preserves_zero_sign" = yes
23383then
23384
23385cat >>confdefs.h <<\_ACEOF
23386#define TANH_PRESERVES_ZERO_SIGN 1
23387_ACEOF
23388
23389fi
23390
23391
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023392
Michael W. Hudson54241132001-12-07 15:38:26 +000023393
Christian Heimes99170a52007-12-19 02:07:34 +000023394
23395
23396
23397
23398
Mark Dickinsonf2537862009-04-18 13:58:18 +000023399
Mark Dickinson9c113362009-09-05 10:36:23 +000023400for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23401do
23402as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23403{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23404echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23405if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23406 echo $ECHO_N "(cached) $ECHO_C" >&6
23407else
23408 cat >conftest.$ac_ext <<_ACEOF
23409/* confdefs.h. */
23410_ACEOF
23411cat confdefs.h >>conftest.$ac_ext
23412cat >>conftest.$ac_ext <<_ACEOF
23413/* end confdefs.h. */
23414/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23415 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23416#define $ac_func innocuous_$ac_func
23417
23418/* System header to define __stub macros and hopefully few prototypes,
23419 which can conflict with char $ac_func (); below.
23420 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23421 <limits.h> exists even on freestanding compilers. */
23422
23423#ifdef __STDC__
23424# include <limits.h>
23425#else
23426# include <assert.h>
23427#endif
23428
23429#undef $ac_func
23430
23431/* Override any GCC internal prototype to avoid an error.
23432 Use char because int might match the return type of a GCC
23433 builtin and then its argument prototype would still apply. */
23434#ifdef __cplusplus
23435extern "C"
23436#endif
23437char $ac_func ();
23438/* The GNU C library defines this for functions which it implements
23439 to always fail with ENOSYS. Some functions are actually named
23440 something starting with __ and the normal name is an alias. */
23441#if defined __stub_$ac_func || defined __stub___$ac_func
23442choke me
23443#endif
23444
23445int
23446main ()
23447{
23448return $ac_func ();
23449 ;
23450 return 0;
23451}
23452_ACEOF
23453rm -f conftest.$ac_objext conftest$ac_exeext
23454if { (ac_try="$ac_link"
23455case "(($ac_try" in
23456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23457 *) ac_try_echo=$ac_try;;
23458esac
23459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23460 (eval "$ac_link") 2>conftest.er1
23461 ac_status=$?
23462 grep -v '^ *+' conftest.er1 >conftest.err
23463 rm -f conftest.er1
23464 cat conftest.err >&5
23465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23466 (exit $ac_status); } && {
23467 test -z "$ac_c_werror_flag" ||
23468 test ! -s conftest.err
23469 } && test -s conftest$ac_exeext &&
23470 $as_test_x conftest$ac_exeext; then
23471 eval "$as_ac_var=yes"
23472else
23473 echo "$as_me: failed program was:" >&5
23474sed 's/^/| /' conftest.$ac_ext >&5
23475
23476 eval "$as_ac_var=no"
23477fi
23478
23479rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23480 conftest$ac_exeext conftest.$ac_ext
23481fi
23482ac_res=`eval echo '${'$as_ac_var'}'`
23483 { echo "$as_me:$LINENO: result: $ac_res" >&5
23484echo "${ECHO_T}$ac_res" >&6; }
23485if test `eval echo '${'$as_ac_var'}'` = yes; then
23486 cat >>confdefs.h <<_ACEOF
23487#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23488_ACEOF
23489
23490fi
23491done
23492
23493
23494
23495
23496
23497
23498for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023499do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023500as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23501{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23502echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023503if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023504 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023505else
23506 cat >conftest.$ac_ext <<_ACEOF
23507/* confdefs.h. */
23508_ACEOF
23509cat confdefs.h >>conftest.$ac_ext
23510cat >>conftest.$ac_ext <<_ACEOF
23511/* end confdefs.h. */
23512/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23513 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23514#define $ac_func innocuous_$ac_func
23515
23516/* System header to define __stub macros and hopefully few prototypes,
23517 which can conflict with char $ac_func (); below.
23518 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23519 <limits.h> exists even on freestanding compilers. */
23520
23521#ifdef __STDC__
23522# include <limits.h>
23523#else
23524# include <assert.h>
23525#endif
23526
23527#undef $ac_func
23528
23529/* Override any GCC internal prototype to avoid an error.
23530 Use char because int might match the return type of a GCC
23531 builtin and then its argument prototype would still apply. */
23532#ifdef __cplusplus
23533extern "C"
23534#endif
23535char $ac_func ();
23536/* The GNU C library defines this for functions which it implements
23537 to always fail with ENOSYS. Some functions are actually named
23538 something starting with __ and the normal name is an alias. */
23539#if defined __stub_$ac_func || defined __stub___$ac_func
23540choke me
23541#endif
23542
23543int
23544main ()
23545{
23546return $ac_func ();
23547 ;
23548 return 0;
23549}
23550_ACEOF
23551rm -f conftest.$ac_objext conftest$ac_exeext
23552if { (ac_try="$ac_link"
23553case "(($ac_try" in
23554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23555 *) ac_try_echo=$ac_try;;
23556esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023558 (eval "$ac_link") 2>conftest.er1
23559 ac_status=$?
23560 grep -v '^ *+' conftest.er1 >conftest.err
23561 rm -f conftest.er1
23562 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023564 (exit $ac_status); } && {
23565 test -z "$ac_c_werror_flag" ||
23566 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023567 } && test -s conftest$ac_exeext &&
23568 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023569 eval "$as_ac_var=yes"
23570else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023571 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023572sed 's/^/| /' conftest.$ac_ext >&5
23573
23574 eval "$as_ac_var=no"
23575fi
23576
23577rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23578 conftest$ac_exeext conftest.$ac_ext
23579fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023580ac_res=`eval echo '${'$as_ac_var'}'`
23581 { echo "$as_me:$LINENO: result: $ac_res" >&5
23582echo "${ECHO_T}$ac_res" >&6; }
23583if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023584 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023585#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023586_ACEOF
23587
23588fi
23589done
23590
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023591{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23592echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023593if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023594 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023595else
23596 cat >conftest.$ac_ext <<_ACEOF
23597/* confdefs.h. */
23598_ACEOF
23599cat confdefs.h >>conftest.$ac_ext
23600cat >>conftest.$ac_ext <<_ACEOF
23601/* end confdefs.h. */
23602#include <math.h>
23603
23604int
23605main ()
23606{
23607#ifndef isinf
23608 (void) isinf;
23609#endif
23610
23611 ;
23612 return 0;
23613}
23614_ACEOF
23615rm -f conftest.$ac_objext
23616if { (ac_try="$ac_compile"
23617case "(($ac_try" in
23618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23619 *) ac_try_echo=$ac_try;;
23620esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023622 (eval "$ac_compile") 2>conftest.er1
23623 ac_status=$?
23624 grep -v '^ *+' conftest.er1 >conftest.err
23625 rm -f conftest.er1
23626 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023628 (exit $ac_status); } && {
23629 test -z "$ac_c_werror_flag" ||
23630 test ! -s conftest.err
23631 } && test -s conftest.$ac_objext; then
23632 ac_cv_have_decl_isinf=yes
23633else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023634 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023635sed 's/^/| /' conftest.$ac_ext >&5
23636
23637 ac_cv_have_decl_isinf=no
23638fi
23639
23640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23641fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023642{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23643echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23644if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023645
23646cat >>confdefs.h <<_ACEOF
23647#define HAVE_DECL_ISINF 1
23648_ACEOF
23649
23650
23651else
23652 cat >>confdefs.h <<_ACEOF
23653#define HAVE_DECL_ISINF 0
23654_ACEOF
23655
23656
23657fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023658{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23659echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023660if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023661 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023662else
23663 cat >conftest.$ac_ext <<_ACEOF
23664/* confdefs.h. */
23665_ACEOF
23666cat confdefs.h >>conftest.$ac_ext
23667cat >>conftest.$ac_ext <<_ACEOF
23668/* end confdefs.h. */
23669#include <math.h>
23670
23671int
23672main ()
23673{
23674#ifndef isnan
23675 (void) isnan;
23676#endif
23677
23678 ;
23679 return 0;
23680}
23681_ACEOF
23682rm -f conftest.$ac_objext
23683if { (ac_try="$ac_compile"
23684case "(($ac_try" in
23685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23686 *) ac_try_echo=$ac_try;;
23687esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023689 (eval "$ac_compile") 2>conftest.er1
23690 ac_status=$?
23691 grep -v '^ *+' conftest.er1 >conftest.err
23692 rm -f conftest.er1
23693 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023695 (exit $ac_status); } && {
23696 test -z "$ac_c_werror_flag" ||
23697 test ! -s conftest.err
23698 } && test -s conftest.$ac_objext; then
23699 ac_cv_have_decl_isnan=yes
23700else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023701 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023702sed 's/^/| /' conftest.$ac_ext >&5
23703
23704 ac_cv_have_decl_isnan=no
23705fi
23706
23707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23708fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023709{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23710echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23711if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023712
23713cat >>confdefs.h <<_ACEOF
23714#define HAVE_DECL_ISNAN 1
23715_ACEOF
23716
23717
23718else
23719 cat >>confdefs.h <<_ACEOF
23720#define HAVE_DECL_ISNAN 0
23721_ACEOF
23722
23723
23724fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023725{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23726echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023727if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023728 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023729else
23730 cat >conftest.$ac_ext <<_ACEOF
23731/* confdefs.h. */
23732_ACEOF
23733cat confdefs.h >>conftest.$ac_ext
23734cat >>conftest.$ac_ext <<_ACEOF
23735/* end confdefs.h. */
23736#include <math.h>
23737
23738int
23739main ()
23740{
23741#ifndef isfinite
23742 (void) isfinite;
23743#endif
23744
23745 ;
23746 return 0;
23747}
23748_ACEOF
23749rm -f conftest.$ac_objext
23750if { (ac_try="$ac_compile"
23751case "(($ac_try" in
23752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23753 *) ac_try_echo=$ac_try;;
23754esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023756 (eval "$ac_compile") 2>conftest.er1
23757 ac_status=$?
23758 grep -v '^ *+' conftest.er1 >conftest.err
23759 rm -f conftest.er1
23760 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023762 (exit $ac_status); } && {
23763 test -z "$ac_c_werror_flag" ||
23764 test ! -s conftest.err
23765 } && test -s conftest.$ac_objext; then
23766 ac_cv_have_decl_isfinite=yes
23767else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023768 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023769sed 's/^/| /' conftest.$ac_ext >&5
23770
23771 ac_cv_have_decl_isfinite=no
23772fi
23773
23774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23775fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023776{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23777echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23778if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023779
23780cat >>confdefs.h <<_ACEOF
23781#define HAVE_DECL_ISFINITE 1
23782_ACEOF
23783
23784
23785else
23786 cat >>confdefs.h <<_ACEOF
23787#define HAVE_DECL_ISFINITE 0
23788_ACEOF
23789
23790
23791fi
23792
23793
Christian Heimes99170a52007-12-19 02:07:34 +000023794
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023795LIBS=$LIBS_SAVE
23796
Mark Dickinson10683072009-04-18 21:18:19 +000023797# Multiprocessing check for broken sem_getvalue
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023798{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23799echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023800if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23801 echo $ECHO_N "(cached) $ECHO_C" >&6
23802else
23803 if test "$cross_compiling" = yes; then
23804 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023805else
23806 cat >conftest.$ac_ext <<_ACEOF
23807/* confdefs.h. */
23808_ACEOF
23809cat confdefs.h >>conftest.$ac_ext
23810cat >>conftest.$ac_ext <<_ACEOF
23811/* end confdefs.h. */
23812
23813#include <unistd.h>
23814#include <fcntl.h>
23815#include <stdio.h>
23816#include <semaphore.h>
23817#include <sys/stat.h>
23818
23819int main(void){
23820 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23821 int count;
23822 int res;
23823 if(a==SEM_FAILED){
23824 perror("sem_open");
23825 return 1;
23826
23827 }
23828 res = sem_getvalue(a, &count);
23829 sem_close(a);
23830 return res==-1 ? 1 : 0;
23831}
23832
Mark Dickinson10683072009-04-18 21:18:19 +000023833_ACEOF
23834rm -f conftest$ac_exeext
23835if { (ac_try="$ac_link"
23836case "(($ac_try" in
23837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23838 *) ac_try_echo=$ac_try;;
23839esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023841 (eval "$ac_link") 2>&5
23842 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023844 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23845 { (case "(($ac_try" in
23846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23847 *) ac_try_echo=$ac_try;;
23848esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023850 (eval "$ac_try") 2>&5
23851 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023853 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023854 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023855else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023856 echo "$as_me: program exited with status $ac_status" >&5
23857echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023858sed 's/^/| /' conftest.$ac_ext >&5
23859
23860( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023861ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023862fi
23863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023864fi
23865
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023866
23867
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023868fi
23869
23870{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23871echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23872if test $ac_cv_broken_sem_getvalue = yes
23873then
23874
23875cat >>confdefs.h <<\_ACEOF
23876#define HAVE_BROKEN_SEM_GETVALUE 1
23877_ACEOF
23878
23879fi
23880
Mark Dickinsonbd792642009-03-18 20:06:12 +000023881# determine what size digit to use for Python's longs
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023882{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23883echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023884# Check whether --enable-big-digits was given.
23885if test "${enable_big_digits+set}" = set; then
23886 enableval=$enable_big_digits; case $enable_big_digits in
23887yes)
23888 enable_big_digits=30 ;;
23889no)
23890 enable_big_digits=15 ;;
2389115|30)
23892 ;;
23893*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023894 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23895echo "$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 +000023896 { (exit 1); exit 1; }; } ;;
23897esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023898{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23899echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023900
23901cat >>confdefs.h <<_ACEOF
23902#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23903_ACEOF
23904
23905
23906else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023907 { echo "$as_me:$LINENO: result: no value specified" >&5
23908echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023909fi
23910
23911
Guido van Rossumef2255b2000-03-10 22:30:29 +000023912# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023913if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023914 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23915echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023916if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023918fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023919{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23920echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023921else
Martin v. Löwis11437992002-04-12 09:54:03 +000023922 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023923{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23924echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023926/* confdefs.h. */
23927_ACEOF
23928cat confdefs.h >>conftest.$ac_ext
23929cat >>conftest.$ac_ext <<_ACEOF
23930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023931$ac_includes_default
23932#include <wchar.h>
23933_ACEOF
23934rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023935if { (ac_try="$ac_compile"
23936case "(($ac_try" in
23937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23938 *) ac_try_echo=$ac_try;;
23939esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023943 grep -v '^ *+' conftest.er1 >conftest.err
23944 rm -f conftest.er1
23945 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023947 (exit $ac_status); } && {
23948 test -z "$ac_c_werror_flag" ||
23949 test ! -s conftest.err
23950 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023951 ac_header_compiler=yes
23952else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023954sed 's/^/| /' conftest.$ac_ext >&5
23955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023956 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023958
23959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023960{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23961echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023962
23963# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023964{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23965echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023966cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023967/* confdefs.h. */
23968_ACEOF
23969cat confdefs.h >>conftest.$ac_ext
23970cat >>conftest.$ac_ext <<_ACEOF
23971/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023972#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023973_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023974if { (ac_try="$ac_cpp conftest.$ac_ext"
23975case "(($ac_try" in
23976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23977 *) ac_try_echo=$ac_try;;
23978esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023980 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023981 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023982 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023983 rm -f conftest.er1
23984 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023986 (exit $ac_status); } >/dev/null && {
23987 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23988 test ! -s conftest.err
23989 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023990 ac_header_preproc=yes
23991else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023993sed 's/^/| /' conftest.$ac_ext >&5
23994
Martin v. Löwis11437992002-04-12 09:54:03 +000023995 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023997
Martin v. Löwis11437992002-04-12 09:54:03 +000023998rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023999{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24000echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024001
24002# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024003case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24004 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024005 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24006echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24007 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24008echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024009 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024010 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024011 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024012 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24013echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24014 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24015echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24016 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24017echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24018 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24019echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24020 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24021echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24022 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24023echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024024 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024025## -------------------------------------- ##
24026## Report this to http://bugs.python.org/ ##
24027## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024028_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024029 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024030 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024031esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024032{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24033echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024034if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024036else
24037 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024038fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024039{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24040echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024041
24042fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024043if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024044
24045
24046cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024047#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024048_ACEOF
24049
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024050 wchar_h="yes"
24051
Guido van Rossumef2255b2000-03-10 22:30:29 +000024052else
Martin v. Löwis11437992002-04-12 09:54:03 +000024053 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024054
24055fi
24056
Michael W. Hudson54241132001-12-07 15:38:26 +000024057
Martin v. Löwis11437992002-04-12 09:54:03 +000024058
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024059# determine wchar_t size
24060if test "$wchar_h" = yes
24061then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024062 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24063echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24064if test "${ac_cv_type_wchar_t+set}" = set; then
24065 echo $ECHO_N "(cached) $ECHO_C" >&6
24066else
24067 cat >conftest.$ac_ext <<_ACEOF
24068/* confdefs.h. */
24069_ACEOF
24070cat confdefs.h >>conftest.$ac_ext
24071cat >>conftest.$ac_ext <<_ACEOF
24072/* end confdefs.h. */
24073#include <wchar.h>
24074
24075typedef wchar_t ac__type_new_;
24076int
24077main ()
24078{
24079if ((ac__type_new_ *) 0)
24080 return 0;
24081if (sizeof (ac__type_new_))
24082 return 0;
24083 ;
24084 return 0;
24085}
24086_ACEOF
24087rm -f conftest.$ac_objext
24088if { (ac_try="$ac_compile"
24089case "(($ac_try" in
24090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24091 *) ac_try_echo=$ac_try;;
24092esac
24093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24094 (eval "$ac_compile") 2>conftest.er1
24095 ac_status=$?
24096 grep -v '^ *+' conftest.er1 >conftest.err
24097 rm -f conftest.er1
24098 cat conftest.err >&5
24099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24100 (exit $ac_status); } && {
24101 test -z "$ac_c_werror_flag" ||
24102 test ! -s conftest.err
24103 } && test -s conftest.$ac_objext; then
24104 ac_cv_type_wchar_t=yes
24105else
24106 echo "$as_me: failed program was:" >&5
24107sed 's/^/| /' conftest.$ac_ext >&5
24108
24109 ac_cv_type_wchar_t=no
24110fi
24111
24112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24113fi
24114{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24115echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24116
24117# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024118# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24119# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24120# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024121{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24122echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024123if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024124 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024125else
Martin v. Löwis11437992002-04-12 09:54:03 +000024126 if test "$cross_compiling" = yes; then
24127 # Depending upon the size, compute the lo and hi bounds.
24128cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024129/* confdefs.h. */
24130_ACEOF
24131cat confdefs.h >>conftest.$ac_ext
24132cat >>conftest.$ac_ext <<_ACEOF
24133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024134#include <wchar.h>
24135
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024136 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024137int
24138main ()
24139{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024140static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024141test_array [0] = 0
24142
24143 ;
24144 return 0;
24145}
24146_ACEOF
24147rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024148if { (ac_try="$ac_compile"
24149case "(($ac_try" in
24150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24151 *) ac_try_echo=$ac_try;;
24152esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024156 grep -v '^ *+' conftest.er1 >conftest.err
24157 rm -f conftest.er1
24158 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024160 (exit $ac_status); } && {
24161 test -z "$ac_c_werror_flag" ||
24162 test ! -s conftest.err
24163 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024164 ac_lo=0 ac_mid=0
24165 while :; do
24166 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024167/* confdefs.h. */
24168_ACEOF
24169cat confdefs.h >>conftest.$ac_ext
24170cat >>conftest.$ac_ext <<_ACEOF
24171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024172#include <wchar.h>
24173
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024174 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024175int
24176main ()
24177{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024178static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024179test_array [0] = 0
24180
24181 ;
24182 return 0;
24183}
24184_ACEOF
24185rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024186if { (ac_try="$ac_compile"
24187case "(($ac_try" in
24188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24189 *) ac_try_echo=$ac_try;;
24190esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024192 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024194 grep -v '^ *+' conftest.er1 >conftest.err
24195 rm -f conftest.er1
24196 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024198 (exit $ac_status); } && {
24199 test -z "$ac_c_werror_flag" ||
24200 test ! -s conftest.err
24201 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024202 ac_hi=$ac_mid; break
24203else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024205sed 's/^/| /' conftest.$ac_ext >&5
24206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024207 ac_lo=`expr $ac_mid + 1`
24208 if test $ac_lo -le $ac_mid; then
24209 ac_lo= ac_hi=
24210 break
24211 fi
24212 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024214
24215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024216 done
24217else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024219sed 's/^/| /' conftest.$ac_ext >&5
24220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024222/* confdefs.h. */
24223_ACEOF
24224cat confdefs.h >>conftest.$ac_ext
24225cat >>conftest.$ac_ext <<_ACEOF
24226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024227#include <wchar.h>
24228
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024229 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024230int
24231main ()
24232{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024234test_array [0] = 0
24235
24236 ;
24237 return 0;
24238}
24239_ACEOF
24240rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024241if { (ac_try="$ac_compile"
24242case "(($ac_try" in
24243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24244 *) ac_try_echo=$ac_try;;
24245esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024247 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024249 grep -v '^ *+' conftest.er1 >conftest.err
24250 rm -f conftest.er1
24251 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024253 (exit $ac_status); } && {
24254 test -z "$ac_c_werror_flag" ||
24255 test ! -s conftest.err
24256 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024257 ac_hi=-1 ac_mid=-1
24258 while :; do
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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024265#include <wchar.h>
24266
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024267 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024268int
24269main ()
24270{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024272test_array [0] = 0
24273
24274 ;
24275 return 0;
24276}
24277_ACEOF
24278rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024279if { (ac_try="$ac_compile"
24280case "(($ac_try" in
24281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24282 *) ac_try_echo=$ac_try;;
24283esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024287 grep -v '^ *+' conftest.er1 >conftest.err
24288 rm -f conftest.er1
24289 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024291 (exit $ac_status); } && {
24292 test -z "$ac_c_werror_flag" ||
24293 test ! -s conftest.err
24294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024295 ac_lo=$ac_mid; break
24296else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024298sed 's/^/| /' conftest.$ac_ext >&5
24299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024300 ac_hi=`expr '(' $ac_mid ')' - 1`
24301 if test $ac_mid -le $ac_hi; then
24302 ac_lo= ac_hi=
24303 break
24304 fi
24305 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024307
24308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024309 done
24310else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024312sed 's/^/| /' conftest.$ac_ext >&5
24313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024314 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024316
24317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024319
24320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024321# Binary search between lo and hi bounds.
24322while test "x$ac_lo" != "x$ac_hi"; do
24323 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024325/* confdefs.h. */
24326_ACEOF
24327cat confdefs.h >>conftest.$ac_ext
24328cat >>conftest.$ac_ext <<_ACEOF
24329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024330#include <wchar.h>
24331
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024332 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024333int
24334main ()
24335{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024336static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024337test_array [0] = 0
24338
24339 ;
24340 return 0;
24341}
24342_ACEOF
24343rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024344if { (ac_try="$ac_compile"
24345case "(($ac_try" in
24346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24347 *) ac_try_echo=$ac_try;;
24348esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024352 grep -v '^ *+' conftest.er1 >conftest.err
24353 rm -f conftest.er1
24354 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024356 (exit $ac_status); } && {
24357 test -z "$ac_c_werror_flag" ||
24358 test ! -s conftest.err
24359 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024360 ac_hi=$ac_mid
24361else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024363sed 's/^/| /' conftest.$ac_ext >&5
24364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024365 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024367
24368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024369done
24370case $ac_lo in
24371?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024372'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024373 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024374See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024375echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024376See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024377 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024378 else
24379 ac_cv_sizeof_wchar_t=0
24380 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024381esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024382else
Martin v. Löwis11437992002-04-12 09:54:03 +000024383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024384/* confdefs.h. */
24385_ACEOF
24386cat confdefs.h >>conftest.$ac_ext
24387cat >>conftest.$ac_ext <<_ACEOF
24388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024389#include <wchar.h>
24390
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024391 typedef wchar_t ac__type_sizeof_;
24392static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24393static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024394#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024395#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024396int
24397main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024398{
Martin v. Löwis11437992002-04-12 09:54:03 +000024399
24400 FILE *f = fopen ("conftest.val", "w");
24401 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024402 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024403 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024404 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024405 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024406 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024407 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024408 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024409 }
24410 else
24411 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024412 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024413 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024414 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024415 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024416 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024417 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024418
24419 ;
24420 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024421}
Martin v. Löwis11437992002-04-12 09:54:03 +000024422_ACEOF
24423rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024424if { (ac_try="$ac_link"
24425case "(($ac_try" in
24426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24427 *) ac_try_echo=$ac_try;;
24428esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024430 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024431 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024433 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024434 { (case "(($ac_try" in
24435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24436 *) ac_try_echo=$ac_try;;
24437esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024439 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024440 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024442 (exit $ac_status); }; }; then
24443 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024444else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024445 echo "$as_me: program exited with status $ac_status" >&5
24446echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024447sed 's/^/| /' conftest.$ac_ext >&5
24448
Martin v. Löwis11437992002-04-12 09:54:03 +000024449( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024450if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024451 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024452See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024453echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024454See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024455 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024456 else
24457 ac_cv_sizeof_wchar_t=0
24458 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024460rm -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 +000024461fi
24462rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024463fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024464{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24465echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024466
24467
24468
Martin v. Löwis11437992002-04-12 09:54:03 +000024469cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024470#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024471_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024472
Michael W. Hudson54241132001-12-07 15:38:26 +000024473
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024474fi
24475
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024476{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24477echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024478have_ucs4_tcl=no
24479cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024480/* confdefs.h. */
24481_ACEOF
24482cat confdefs.h >>conftest.$ac_ext
24483cat >>conftest.$ac_ext <<_ACEOF
24484/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024485
24486#include <tcl.h>
24487#if TCL_UTF_MAX != 6
24488# error "NOT UCS4_TCL"
24489#endif
24490int
24491main ()
24492{
24493
24494 ;
24495 return 0;
24496}
24497_ACEOF
24498rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024499if { (ac_try="$ac_compile"
24500case "(($ac_try" in
24501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24502 *) ac_try_echo=$ac_try;;
24503esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024507 grep -v '^ *+' conftest.er1 >conftest.err
24508 rm -f conftest.er1
24509 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024511 (exit $ac_status); } && {
24512 test -z "$ac_c_werror_flag" ||
24513 test ! -s conftest.err
24514 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024515
24516
24517cat >>confdefs.h <<\_ACEOF
24518#define HAVE_UCS4_TCL 1
24519_ACEOF
24520
24521 have_ucs4_tcl=yes
24522
24523else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024525sed 's/^/| /' conftest.$ac_ext >&5
24526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024527
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024529
24530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024531{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24532echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024533
Skip Montanaro6dead952003-09-25 14:50:04 +000024534# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024535if test "$wchar_h" = yes
24536then
24537 # check whether wchar_t is signed or not
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024538 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24539echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024540 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024541 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024542else
24543
24544 if test "$cross_compiling" = yes; then
24545 ac_cv_wchar_t_signed=yes
24546else
24547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024548/* confdefs.h. */
24549_ACEOF
24550cat confdefs.h >>conftest.$ac_ext
24551cat >>conftest.$ac_ext <<_ACEOF
24552/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024553
24554 #include <wchar.h>
24555 int main()
24556 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024557 /* Success: exit code 0 */
24558 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024559 }
24560
24561_ACEOF
24562rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024563if { (ac_try="$ac_link"
24564case "(($ac_try" in
24565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24566 *) ac_try_echo=$ac_try;;
24567esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024569 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024570 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024573 { (case "(($ac_try" in
24574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24575 *) ac_try_echo=$ac_try;;
24576esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024578 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024579 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024581 (exit $ac_status); }; }; then
24582 ac_cv_wchar_t_signed=yes
24583else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024584 echo "$as_me: program exited with status $ac_status" >&5
24585echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024586sed 's/^/| /' conftest.$ac_ext >&5
24587
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024588( exit $ac_status )
24589ac_cv_wchar_t_signed=no
24590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024591rm -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 +000024592fi
24593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024594
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024595fi
24596
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024597 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24598echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024599fi
24600
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024601{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24602echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024603
24604# Check whether --with-wide-unicode was given.
24605if test "${with_wide_unicode+set}" = set; then
24606 withval=$with_wide_unicode;
24607if test "$withval" != no
24608then unicode_size="4"
24609else unicode_size="2"
24610fi
24611
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024612else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024613
Georg Brandl52d168a2008-01-07 18:10:24 +000024614case "$have_ucs4_tcl" in
24615 yes) unicode_size="4" ;;
24616 *) unicode_size="2" ;;
24617esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024618
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024619fi
24620
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024621
24622
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024623
Georg Brandl52d168a2008-01-07 18:10:24 +000024624case "$unicode_size" in
24625 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024626#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024627_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024628 ;;
24629 *) cat >>confdefs.h <<\_ACEOF
24630#define Py_UNICODE_SIZE 2
24631_ACEOF
24632 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024633esac
24634
Michael W. Hudson54241132001-12-07 15:38:26 +000024635
Martin v. Löwis11437992002-04-12 09:54:03 +000024636
24637
Georg Brandl52d168a2008-01-07 18:10:24 +000024638# wchar_t is only usable if it maps to an unsigned type
24639if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024640 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024641then
24642 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024643
Martin v. Löwis11437992002-04-12 09:54:03 +000024644cat >>confdefs.h <<\_ACEOF
24645#define HAVE_USABLE_WCHAR_T 1
24646_ACEOF
24647
Georg Brandl52d168a2008-01-07 18:10:24 +000024648 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024649#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024650_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024651
Georg Brandl52d168a2008-01-07 18:10:24 +000024652elif test "$ac_cv_sizeof_short" = "$unicode_size"
24653then
24654 PY_UNICODE_TYPE="unsigned short"
24655 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024656#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024657_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024658
Georg Brandl52d168a2008-01-07 18:10:24 +000024659elif test "$ac_cv_sizeof_long" = "$unicode_size"
24660then
24661 PY_UNICODE_TYPE="unsigned long"
24662 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024663#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024664_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024665
Georg Brandl52d168a2008-01-07 18:10:24 +000024666else
24667 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024668fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024669{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24670echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024671
24672# check for endianness
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024673{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24674echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024675if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024677else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024678 # See if sys/param.h defines the BYTE_ORDER macro.
24679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024680/* confdefs.h. */
24681_ACEOF
24682cat confdefs.h >>conftest.$ac_ext
24683cat >>conftest.$ac_ext <<_ACEOF
24684/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024685#include <sys/types.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024686#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024687
Martin v. Löwis11437992002-04-12 09:54:03 +000024688int
24689main ()
24690{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024691#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24692 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24693 bogus endian macros
24694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024695
24696 ;
24697 return 0;
24698}
24699_ACEOF
24700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024701if { (ac_try="$ac_compile"
24702case "(($ac_try" in
24703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24704 *) ac_try_echo=$ac_try;;
24705esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024709 grep -v '^ *+' conftest.er1 >conftest.err
24710 rm -f conftest.er1
24711 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024713 (exit $ac_status); } && {
24714 test -z "$ac_c_werror_flag" ||
24715 test ! -s conftest.err
24716 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024717 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024719/* confdefs.h. */
24720_ACEOF
24721cat confdefs.h >>conftest.$ac_ext
24722cat >>conftest.$ac_ext <<_ACEOF
24723/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024724#include <sys/types.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024725#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024726
Martin v. Löwis11437992002-04-12 09:54:03 +000024727int
24728main ()
24729{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024730#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024731 not big endian
24732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024733
24734 ;
24735 return 0;
24736}
24737_ACEOF
24738rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024739if { (ac_try="$ac_compile"
24740case "(($ac_try" in
24741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24742 *) ac_try_echo=$ac_try;;
24743esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024747 grep -v '^ *+' conftest.er1 >conftest.err
24748 rm -f conftest.er1
24749 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024751 (exit $ac_status); } && {
24752 test -z "$ac_c_werror_flag" ||
24753 test ! -s conftest.err
24754 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024755 ac_cv_c_bigendian=yes
24756else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024758sed 's/^/| /' conftest.$ac_ext >&5
24759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024760 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024762
24763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024764else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024766sed 's/^/| /' conftest.$ac_ext >&5
24767
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024768 # It does not; compile a test program.
24769if test "$cross_compiling" = yes; then
24770 # try to guess the endianness by grepping values into an object file
24771 ac_cv_c_bigendian=unknown
24772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024773/* confdefs.h. */
24774_ACEOF
24775cat confdefs.h >>conftest.$ac_ext
24776cat >>conftest.$ac_ext <<_ACEOF
24777/* end confdefs.h. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024778short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24779short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24780void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24781short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24782short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24783void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024784int
24785main ()
24786{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024787 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024788 ;
24789 return 0;
24790}
24791_ACEOF
24792rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024793if { (ac_try="$ac_compile"
24794case "(($ac_try" in
24795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24796 *) ac_try_echo=$ac_try;;
24797esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024801 grep -v '^ *+' conftest.er1 >conftest.err
24802 rm -f conftest.er1
24803 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024805 (exit $ac_status); } && {
24806 test -z "$ac_c_werror_flag" ||
24807 test ! -s conftest.err
24808 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024809 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024810 ac_cv_c_bigendian=yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024811fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024812if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24813 if test "$ac_cv_c_bigendian" = unknown; then
24814 ac_cv_c_bigendian=no
24815 else
24816 # finding both strings is unlikely to happen, but who knows?
24817 ac_cv_c_bigendian=unknown
24818 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024819fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024820else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024822sed 's/^/| /' conftest.$ac_ext >&5
24823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024824
Martin v. Löwis11437992002-04-12 09:54:03 +000024825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024826
24827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024828else
24829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024830/* confdefs.h. */
24831_ACEOF
24832cat confdefs.h >>conftest.$ac_ext
24833cat >>conftest.$ac_ext <<_ACEOF
24834/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024835$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024836int
24837main ()
24838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024839
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024840 /* Are we little or big endian? From Harbison&Steele. */
24841 union
24842 {
24843 long int l;
24844 char c[sizeof (long int)];
24845 } u;
24846 u.l = 1;
24847 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024848
24849 ;
24850 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024851}
Martin v. Löwis11437992002-04-12 09:54:03 +000024852_ACEOF
24853rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024854if { (ac_try="$ac_link"
24855case "(($ac_try" in
24856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24857 *) ac_try_echo=$ac_try;;
24858esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024860 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024861 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024863 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024864 { (case "(($ac_try" in
24865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24866 *) ac_try_echo=$ac_try;;
24867esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024869 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024870 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024872 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024873 ac_cv_c_bigendian=no
24874else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024875 echo "$as_me: program exited with status $ac_status" >&5
24876echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024877sed 's/^/| /' conftest.$ac_ext >&5
24878
Martin v. Löwis11437992002-04-12 09:54:03 +000024879( exit $ac_status )
24880ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024882rm -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 +000024883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024884
24885
Martin v. Löwis11437992002-04-12 09:54:03 +000024886fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024887
24888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24889fi
24890{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24891echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24892case $ac_cv_c_bigendian in
24893 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024894
24895cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024896#define WORDS_BIGENDIAN 1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024897_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024898 ;;
24899 no)
24900 ;;
24901 *)
24902 { { echo "$as_me:$LINENO: error: unknown endianness
24903presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24904echo "$as_me: error: unknown endianness
24905presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024906 { (exit 1); exit 1; }; } ;;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024907esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024908
Michael W. Hudson54241132001-12-07 15:38:26 +000024909
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024910# Check whether right shifting a negative integer extends the sign bit
24911# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024912{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24913echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024914if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024915 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024916else
Martin v. Löwis11437992002-04-12 09:54:03 +000024917
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024918if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024919 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024920else
Martin v. Löwis11437992002-04-12 09:54:03 +000024921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024922/* confdefs.h. */
24923_ACEOF
24924cat confdefs.h >>conftest.$ac_ext
24925cat >>conftest.$ac_ext <<_ACEOF
24926/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024927
24928int main()
24929{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024930 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024931}
24932
Martin v. Löwis11437992002-04-12 09:54:03 +000024933_ACEOF
24934rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024935if { (ac_try="$ac_link"
24936case "(($ac_try" in
24937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24938 *) ac_try_echo=$ac_try;;
24939esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024941 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024942 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024944 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024945 { (case "(($ac_try" in
24946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24947 *) ac_try_echo=$ac_try;;
24948esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024950 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024951 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024953 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024954 ac_cv_rshift_extends_sign=yes
24955else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024956 echo "$as_me: program exited with status $ac_status" >&5
24957echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024958sed 's/^/| /' conftest.$ac_ext >&5
24959
Martin v. Löwis11437992002-04-12 09:54:03 +000024960( exit $ac_status )
24961ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024963rm -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 +000024964fi
24965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024966
24967fi
24968
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024969{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24970echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024971if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024972then
Martin v. Löwis11437992002-04-12 09:54:03 +000024973
24974cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024975#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024976_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024977
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024978fi
24979
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024980# check for getc_unlocked and related locking functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024981{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24982echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024983if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024984 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024985else
Martin v. Löwis11437992002-04-12 09:54:03 +000024986
24987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024988/* confdefs.h. */
24989_ACEOF
24990cat confdefs.h >>conftest.$ac_ext
24991cat >>conftest.$ac_ext <<_ACEOF
24992/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024993#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024994int
24995main ()
24996{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024997
24998 FILE *f = fopen("/dev/null", "r");
24999 flockfile(f);
25000 getc_unlocked(f);
25001 funlockfile(f);
25002
Martin v. Löwis11437992002-04-12 09:54:03 +000025003 ;
25004 return 0;
25005}
25006_ACEOF
25007rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025008if { (ac_try="$ac_link"
25009case "(($ac_try" in
25010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25011 *) ac_try_echo=$ac_try;;
25012esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025014 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025016 grep -v '^ *+' conftest.er1 >conftest.err
25017 rm -f conftest.er1
25018 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025020 (exit $ac_status); } && {
25021 test -z "$ac_c_werror_flag" ||
25022 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025023 } && test -s conftest$ac_exeext &&
25024 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025025 ac_cv_have_getc_unlocked=yes
25026else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025028sed 's/^/| /' conftest.$ac_ext >&5
25029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025030 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025032
25033rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025034 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025035fi
25036
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025037{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25038echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025039if test "$ac_cv_have_getc_unlocked" = yes
25040then
Martin v. Löwis11437992002-04-12 09:54:03 +000025041
25042cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025043#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025044_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025045
25046fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025047
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025048# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025049# save the value of LIBS so we don't actually link Python with readline
25050LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025051
Gregory P. Smith18820942008-09-07 06:24:49 +000025052# On some systems we need to link readline to a termcap compatible
25053# library. NOTE: Keep the precedence of listed libraries synchronised
25054# with setup.py.
25055py_cv_lib_readline=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025056{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25057echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025058for py_libtermcap in "" ncursesw ncurses curses termcap; do
25059 if test -z "$py_libtermcap"; then
25060 READLINE_LIBS="-lreadline"
25061 else
25062 READLINE_LIBS="-lreadline -l$py_libtermcap"
25063 fi
25064 LIBS="$READLINE_LIBS $LIBS_no_readline"
25065 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025066/* confdefs.h. */
25067_ACEOF
25068cat confdefs.h >>conftest.$ac_ext
25069cat >>conftest.$ac_ext <<_ACEOF
25070/* end confdefs.h. */
25071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025072/* Override any GCC internal prototype to avoid an error.
25073 Use char because int might match the return type of a GCC
25074 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025075#ifdef __cplusplus
25076extern "C"
25077#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025078char readline ();
25079int
25080main ()
25081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025082return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025083 ;
25084 return 0;
25085}
25086_ACEOF
25087rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025088if { (ac_try="$ac_link"
25089case "(($ac_try" in
25090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25091 *) ac_try_echo=$ac_try;;
25092esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025094 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025095 ac_status=$?
25096 grep -v '^ *+' conftest.er1 >conftest.err
25097 rm -f conftest.er1
25098 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025100 (exit $ac_status); } && {
25101 test -z "$ac_c_werror_flag" ||
25102 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025103 } && test -s conftest$ac_exeext &&
25104 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025105 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025106else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025107 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025108sed 's/^/| /' conftest.$ac_ext >&5
25109
Gregory P. Smith18820942008-09-07 06:24:49 +000025110
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025112
25113rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025114 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025115 if test $py_cv_lib_readline = yes; then
25116 break
25117 fi
25118done
25119# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25120#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025121if test $py_cv_lib_readline = no; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025122 { echo "$as_me:$LINENO: result: none" >&5
25123echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025124else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025125 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25126echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025127
25128cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025129#define HAVE_LIBREADLINE 1
25130_ACEOF
25131
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025132fi
25133
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025134# check for readline 2.1
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025135{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25136echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025137if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025138 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025139else
25140 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025141LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025142cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025143/* confdefs.h. */
25144_ACEOF
25145cat confdefs.h >>conftest.$ac_ext
25146cat >>conftest.$ac_ext <<_ACEOF
25147/* end confdefs.h. */
25148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025149/* Override any GCC internal prototype to avoid an error.
25150 Use char because int might match the return type of a GCC
25151 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025152#ifdef __cplusplus
25153extern "C"
25154#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025155char rl_callback_handler_install ();
25156int
25157main ()
25158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025159return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025160 ;
25161 return 0;
25162}
25163_ACEOF
25164rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025165if { (ac_try="$ac_link"
25166case "(($ac_try" in
25167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25168 *) ac_try_echo=$ac_try;;
25169esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025171 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025173 grep -v '^ *+' conftest.er1 >conftest.err
25174 rm -f conftest.er1
25175 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025177 (exit $ac_status); } && {
25178 test -z "$ac_c_werror_flag" ||
25179 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025180 } && test -s conftest$ac_exeext &&
25181 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025182 ac_cv_lib_readline_rl_callback_handler_install=yes
25183else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025184 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025185sed 's/^/| /' conftest.$ac_ext >&5
25186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025187 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025189
25190rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025191 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025192LIBS=$ac_check_lib_save_LIBS
25193fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025194{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25195echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25196if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025197
25198cat >>confdefs.h <<\_ACEOF
25199#define HAVE_RL_CALLBACK 1
25200_ACEOF
25201
25202fi
25203
25204
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025205# check for readline 2.2
25206cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025207/* confdefs.h. */
25208_ACEOF
25209cat confdefs.h >>conftest.$ac_ext
25210cat >>conftest.$ac_ext <<_ACEOF
25211/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025212#include <readline/readline.h>
25213_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025214if { (ac_try="$ac_cpp conftest.$ac_ext"
25215case "(($ac_try" in
25216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25217 *) ac_try_echo=$ac_try;;
25218esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025220 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025221 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025222 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025223 rm -f conftest.er1
25224 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025226 (exit $ac_status); } >/dev/null && {
25227 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25228 test ! -s conftest.err
25229 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025230 have_readline=yes
25231else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025233sed 's/^/| /' conftest.$ac_ext >&5
25234
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025235 have_readline=no
25236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025237
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025238rm -f conftest.err conftest.$ac_ext
25239if test $have_readline = yes
25240then
25241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025242/* confdefs.h. */
25243_ACEOF
25244cat confdefs.h >>conftest.$ac_ext
25245cat >>conftest.$ac_ext <<_ACEOF
25246/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025247#include <readline/readline.h>
25248
25249_ACEOF
25250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025251 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025252
25253cat >>confdefs.h <<\_ACEOF
25254#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25255_ACEOF
25256
25257fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000025258rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025259
25260fi
25261
Martin v. Löwis0daad592001-09-30 21:09:59 +000025262# check for readline 4.0
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025263{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25264echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025265if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025266 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025267else
Martin v. Löwis11437992002-04-12 09:54:03 +000025268 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025269LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025271/* confdefs.h. */
25272_ACEOF
25273cat confdefs.h >>conftest.$ac_ext
25274cat >>conftest.$ac_ext <<_ACEOF
25275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025277/* Override any GCC internal prototype to avoid an error.
25278 Use char because int might match the return type of a GCC
25279 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025280#ifdef __cplusplus
25281extern "C"
25282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025283char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025284int
25285main ()
25286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025287return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025288 ;
25289 return 0;
25290}
25291_ACEOF
25292rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025293if { (ac_try="$ac_link"
25294case "(($ac_try" in
25295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25296 *) ac_try_echo=$ac_try;;
25297esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025299 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025301 grep -v '^ *+' conftest.er1 >conftest.err
25302 rm -f conftest.er1
25303 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025305 (exit $ac_status); } && {
25306 test -z "$ac_c_werror_flag" ||
25307 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025308 } && test -s conftest$ac_exeext &&
25309 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025310 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025311else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025313sed 's/^/| /' conftest.$ac_ext >&5
25314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025315 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025317
25318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025319 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025320LIBS=$ac_check_lib_save_LIBS
25321fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025322{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25323echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25324if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025325
Martin v. Löwis11437992002-04-12 09:54:03 +000025326cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025327#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025328_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025329
Martin v. Löwis0daad592001-09-30 21:09:59 +000025330fi
25331
Michael W. Hudson54241132001-12-07 15:38:26 +000025332
Thomas Wouters89d996e2007-09-08 17:39:28 +000025333# also in 4.0
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025334{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25335echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025336if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025337 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025338else
25339 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025340LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025341cat >conftest.$ac_ext <<_ACEOF
25342/* confdefs.h. */
25343_ACEOF
25344cat confdefs.h >>conftest.$ac_ext
25345cat >>conftest.$ac_ext <<_ACEOF
25346/* end confdefs.h. */
25347
25348/* Override any GCC internal prototype to avoid an error.
25349 Use char because int might match the return type of a GCC
25350 builtin and then its argument prototype would still apply. */
25351#ifdef __cplusplus
25352extern "C"
25353#endif
25354char rl_completion_display_matches_hook ();
25355int
25356main ()
25357{
25358return rl_completion_display_matches_hook ();
25359 ;
25360 return 0;
25361}
25362_ACEOF
25363rm -f conftest.$ac_objext conftest$ac_exeext
25364if { (ac_try="$ac_link"
25365case "(($ac_try" in
25366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25367 *) ac_try_echo=$ac_try;;
25368esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025370 (eval "$ac_link") 2>conftest.er1
25371 ac_status=$?
25372 grep -v '^ *+' conftest.er1 >conftest.err
25373 rm -f conftest.er1
25374 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025376 (exit $ac_status); } && {
25377 test -z "$ac_c_werror_flag" ||
25378 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025379 } && test -s conftest$ac_exeext &&
25380 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025381 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25382else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025383 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025384sed 's/^/| /' conftest.$ac_ext >&5
25385
25386 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25387fi
25388
25389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25390 conftest$ac_exeext conftest.$ac_ext
25391LIBS=$ac_check_lib_save_LIBS
25392fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025393{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25394echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25395if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025396
25397cat >>confdefs.h <<\_ACEOF
25398#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25399_ACEOF
25400
25401fi
25402
25403
Martin v. Löwis0daad592001-09-30 21:09:59 +000025404# check for readline 4.2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025405{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25406echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025407if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025408 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025409else
Martin v. Löwis11437992002-04-12 09:54:03 +000025410 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025411LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025413/* confdefs.h. */
25414_ACEOF
25415cat confdefs.h >>conftest.$ac_ext
25416cat >>conftest.$ac_ext <<_ACEOF
25417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025419/* Override any GCC internal prototype to avoid an error.
25420 Use char because int might match the return type of a GCC
25421 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025422#ifdef __cplusplus
25423extern "C"
25424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025425char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025426int
25427main ()
25428{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025429return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025430 ;
25431 return 0;
25432}
25433_ACEOF
25434rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025435if { (ac_try="$ac_link"
25436case "(($ac_try" in
25437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25438 *) ac_try_echo=$ac_try;;
25439esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025441 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025443 grep -v '^ *+' conftest.er1 >conftest.err
25444 rm -f conftest.er1
25445 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025447 (exit $ac_status); } && {
25448 test -z "$ac_c_werror_flag" ||
25449 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025450 } && test -s conftest$ac_exeext &&
25451 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025452 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025453else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025455sed 's/^/| /' conftest.$ac_ext >&5
25456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025457 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025459
25460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025462LIBS=$ac_check_lib_save_LIBS
25463fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025464{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25465echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25466if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025467
Martin v. Löwis11437992002-04-12 09:54:03 +000025468cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025469#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025470_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025471
Guido van Rossum353ae582001-07-10 16:45:32 +000025472fi
25473
Jack Jansendd19cf82001-12-06 22:36:17 +000025474
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025475# also in readline 4.2
25476cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025477/* confdefs.h. */
25478_ACEOF
25479cat confdefs.h >>conftest.$ac_ext
25480cat >>conftest.$ac_ext <<_ACEOF
25481/* end confdefs.h. */
25482#include <readline/readline.h>
25483_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025484if { (ac_try="$ac_cpp conftest.$ac_ext"
25485case "(($ac_try" in
25486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25487 *) ac_try_echo=$ac_try;;
25488esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025490 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025491 ac_status=$?
25492 grep -v '^ *+' conftest.er1 >conftest.err
25493 rm -f conftest.er1
25494 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025496 (exit $ac_status); } >/dev/null && {
25497 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25498 test ! -s conftest.err
25499 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025500 have_readline=yes
25501else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025502 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025503sed 's/^/| /' conftest.$ac_ext >&5
25504
25505 have_readline=no
25506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025507
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025508rm -f conftest.err conftest.$ac_ext
25509if test $have_readline = yes
25510then
25511 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025512/* confdefs.h. */
25513_ACEOF
25514cat confdefs.h >>conftest.$ac_ext
25515cat >>conftest.$ac_ext <<_ACEOF
25516/* end confdefs.h. */
25517#include <readline/readline.h>
25518
25519_ACEOF
25520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25521 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25522
25523cat >>confdefs.h <<\_ACEOF
25524#define HAVE_RL_CATCH_SIGNAL 1
25525_ACEOF
25526
25527fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000025528rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025529
25530fi
25531
Martin v. Löwis82bca632006-02-10 20:49:30 +000025532# End of readline checks: restore LIBS
25533LIBS=$LIBS_no_readline
25534
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025535{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25536echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025537if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025538 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025539else
Martin v. Löwis11437992002-04-12 09:54:03 +000025540
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025541if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025542 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025543else
Martin v. Löwis11437992002-04-12 09:54:03 +000025544 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025545/* confdefs.h. */
25546_ACEOF
25547cat confdefs.h >>conftest.$ac_ext
25548cat >>conftest.$ac_ext <<_ACEOF
25549/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025550
25551int main()
25552{
25553 int val1 = nice(1);
25554 if (val1 != -1 && val1 == nice(2))
25555 exit(0);
25556 exit(1);
25557}
25558
Martin v. Löwis11437992002-04-12 09:54:03 +000025559_ACEOF
25560rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025561if { (ac_try="$ac_link"
25562case "(($ac_try" in
25563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25564 *) ac_try_echo=$ac_try;;
25565esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025567 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025568 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025571 { (case "(($ac_try" in
25572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25573 *) ac_try_echo=$ac_try;;
25574esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025576 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025577 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025579 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025580 ac_cv_broken_nice=yes
25581else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025582 echo "$as_me: program exited with status $ac_status" >&5
25583echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025584sed 's/^/| /' conftest.$ac_ext >&5
25585
Martin v. Löwis11437992002-04-12 09:54:03 +000025586( exit $ac_status )
25587ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025589rm -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 +000025590fi
25591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025592
25593fi
25594
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025595{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25596echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025597if test "$ac_cv_broken_nice" = yes
25598then
Martin v. Löwis11437992002-04-12 09:54:03 +000025599
25600cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025601#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025602_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025603
25604fi
25605
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025606{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25607echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025608if test "${ac_cv_broken_poll+set}" = set; then
25609 echo $ECHO_N "(cached) $ECHO_C" >&6
25610else
25611 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025612 ac_cv_broken_poll=no
25613else
25614 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025615/* confdefs.h. */
25616_ACEOF
25617cat confdefs.h >>conftest.$ac_ext
25618cat >>conftest.$ac_ext <<_ACEOF
25619/* end confdefs.h. */
25620
25621#include <poll.h>
25622
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025623int main()
25624{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025625 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025626 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025627
25628 close (42);
25629
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025630 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025631 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025632 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025633 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025634 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025635 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025636 return 1;
25637}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025638
25639_ACEOF
25640rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025641if { (ac_try="$ac_link"
25642case "(($ac_try" in
25643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25644 *) ac_try_echo=$ac_try;;
25645esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025647 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025648 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025651 { (case "(($ac_try" in
25652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25653 *) ac_try_echo=$ac_try;;
25654esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025656 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025657 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025659 (exit $ac_status); }; }; then
25660 ac_cv_broken_poll=yes
25661else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025662 echo "$as_me: program exited with status $ac_status" >&5
25663echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025664sed 's/^/| /' conftest.$ac_ext >&5
25665
25666( exit $ac_status )
25667ac_cv_broken_poll=no
25668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025669rm -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 +000025670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025671
25672
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025673fi
25674
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025675{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25676echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025677if test "$ac_cv_broken_poll" = yes
25678then
25679
25680cat >>confdefs.h <<\_ACEOF
25681#define HAVE_BROKEN_POLL 1
25682_ACEOF
25683
25684fi
25685
Brett Cannon43802422005-02-10 20:48:03 +000025686# 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 +000025687# (which is not required by ISO C or UNIX spec) and/or if we support
25688# tzname[]
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025689{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25690echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025691if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025692 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025693else
25694 cat >conftest.$ac_ext <<_ACEOF
25695/* confdefs.h. */
25696_ACEOF
25697cat confdefs.h >>conftest.$ac_ext
25698cat >>conftest.$ac_ext <<_ACEOF
25699/* end confdefs.h. */
25700#include <sys/types.h>
25701#include <$ac_cv_struct_tm>
25702
25703
25704int
25705main ()
25706{
25707static struct tm ac_aggr;
25708if (ac_aggr.tm_zone)
25709return 0;
25710 ;
25711 return 0;
25712}
25713_ACEOF
25714rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025715if { (ac_try="$ac_compile"
25716case "(($ac_try" in
25717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25718 *) ac_try_echo=$ac_try;;
25719esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025721 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025722 ac_status=$?
25723 grep -v '^ *+' conftest.er1 >conftest.err
25724 rm -f conftest.er1
25725 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025727 (exit $ac_status); } && {
25728 test -z "$ac_c_werror_flag" ||
25729 test ! -s conftest.err
25730 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025731 ac_cv_member_struct_tm_tm_zone=yes
25732else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025733 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025734sed 's/^/| /' conftest.$ac_ext >&5
25735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025736 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025737/* confdefs.h. */
25738_ACEOF
25739cat confdefs.h >>conftest.$ac_ext
25740cat >>conftest.$ac_ext <<_ACEOF
25741/* end confdefs.h. */
25742#include <sys/types.h>
25743#include <$ac_cv_struct_tm>
25744
25745
25746int
25747main ()
25748{
25749static struct tm ac_aggr;
25750if (sizeof ac_aggr.tm_zone)
25751return 0;
25752 ;
25753 return 0;
25754}
25755_ACEOF
25756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025757if { (ac_try="$ac_compile"
25758case "(($ac_try" in
25759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25760 *) ac_try_echo=$ac_try;;
25761esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025763 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025764 ac_status=$?
25765 grep -v '^ *+' conftest.er1 >conftest.err
25766 rm -f conftest.er1
25767 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025769 (exit $ac_status); } && {
25770 test -z "$ac_c_werror_flag" ||
25771 test ! -s conftest.err
25772 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025773 ac_cv_member_struct_tm_tm_zone=yes
25774else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025775 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025776sed 's/^/| /' conftest.$ac_ext >&5
25777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025778 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025780
25781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025783
25784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025785fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025786{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25787echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25788if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025789
25790cat >>confdefs.h <<_ACEOF
25791#define HAVE_STRUCT_TM_TM_ZONE 1
25792_ACEOF
25793
25794
25795fi
25796
25797if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25798
25799cat >>confdefs.h <<\_ACEOF
25800#define HAVE_TM_ZONE 1
25801_ACEOF
25802
25803else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025804 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25805echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025806if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025807 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025808else
25809 cat >conftest.$ac_ext <<_ACEOF
25810/* confdefs.h. */
25811_ACEOF
25812cat confdefs.h >>conftest.$ac_ext
25813cat >>conftest.$ac_ext <<_ACEOF
25814/* end confdefs.h. */
25815#include <time.h>
25816
25817int
25818main ()
25819{
25820#ifndef tzname
25821 (void) tzname;
25822#endif
25823
25824 ;
25825 return 0;
25826}
25827_ACEOF
25828rm -f conftest.$ac_objext
25829if { (ac_try="$ac_compile"
25830case "(($ac_try" in
25831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25832 *) ac_try_echo=$ac_try;;
25833esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025835 (eval "$ac_compile") 2>conftest.er1
25836 ac_status=$?
25837 grep -v '^ *+' conftest.er1 >conftest.err
25838 rm -f conftest.er1
25839 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025841 (exit $ac_status); } && {
25842 test -z "$ac_c_werror_flag" ||
25843 test ! -s conftest.err
25844 } && test -s conftest.$ac_objext; then
25845 ac_cv_have_decl_tzname=yes
25846else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025847 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025848sed 's/^/| /' conftest.$ac_ext >&5
25849
25850 ac_cv_have_decl_tzname=no
25851fi
25852
25853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25854fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025855{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25856echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25857if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025858
25859cat >>confdefs.h <<_ACEOF
25860#define HAVE_DECL_TZNAME 1
25861_ACEOF
25862
25863
25864else
25865 cat >>confdefs.h <<_ACEOF
25866#define HAVE_DECL_TZNAME 0
25867_ACEOF
25868
25869
25870fi
25871
25872
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025873 { echo "$as_me:$LINENO: checking for tzname" >&5
25874echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025875if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025876 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025877else
25878 cat >conftest.$ac_ext <<_ACEOF
25879/* confdefs.h. */
25880_ACEOF
25881cat confdefs.h >>conftest.$ac_ext
25882cat >>conftest.$ac_ext <<_ACEOF
25883/* end confdefs.h. */
25884#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025885#if !HAVE_DECL_TZNAME
25886extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025887#endif
25888
25889int
25890main ()
25891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025892return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025893 ;
25894 return 0;
25895}
25896_ACEOF
25897rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025898if { (ac_try="$ac_link"
25899case "(($ac_try" in
25900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25901 *) ac_try_echo=$ac_try;;
25902esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025904 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025905 ac_status=$?
25906 grep -v '^ *+' conftest.er1 >conftest.err
25907 rm -f conftest.er1
25908 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025910 (exit $ac_status); } && {
25911 test -z "$ac_c_werror_flag" ||
25912 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025913 } && test -s conftest$ac_exeext &&
25914 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025915 ac_cv_var_tzname=yes
25916else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025917 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025918sed 's/^/| /' conftest.$ac_ext >&5
25919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025920 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025922
25923rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025924 conftest$ac_exeext conftest.$ac_ext
25925fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025926{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25927echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025928 if test $ac_cv_var_tzname = yes; then
25929
25930cat >>confdefs.h <<\_ACEOF
25931#define HAVE_TZNAME 1
25932_ACEOF
25933
25934 fi
25935fi
25936
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025937
Martin v. Löwis1d459062005-03-14 21:23:33 +000025938# check tzset(3) exists and works like we expect it to
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025939{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25940echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025941if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025942 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025943else
25944
25945if test "$cross_compiling" = yes; then
25946 ac_cv_working_tzset=no
25947else
25948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025949/* confdefs.h. */
25950_ACEOF
25951cat confdefs.h >>conftest.$ac_ext
25952cat >>conftest.$ac_ext <<_ACEOF
25953/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025954
25955#include <stdlib.h>
25956#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025957#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025958
25959#if HAVE_TZNAME
25960extern char *tzname[];
25961#endif
25962
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025963int main()
25964{
Brett Cannon18367812003-09-19 00:59:16 +000025965 /* Note that we need to ensure that not only does tzset(3)
25966 do 'something' with localtime, but it works as documented
25967 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025968 This includes making sure that tzname is set properly if
25969 tm->tm_zone does not exist since it is the alternative way
25970 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025971
25972 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025973 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025974 */
25975
Martin v. Löwis1d459062005-03-14 21:23:33 +000025976 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025977 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25978
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025979 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025980 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025981 if (localtime(&groundhogday)->tm_hour != 0)
25982 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025983#if HAVE_TZNAME
25984 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25985 if (strcmp(tzname[0], "UTC") ||
25986 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25987 exit(1);
25988#endif
Brett Cannon18367812003-09-19 00:59:16 +000025989
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025990 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025991 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025992 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025993 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025994#if HAVE_TZNAME
25995 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25996 exit(1);
25997#endif
Brett Cannon18367812003-09-19 00:59:16 +000025998
25999 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26000 tzset();
26001 if (localtime(&groundhogday)->tm_hour != 11)
26002 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026003#if HAVE_TZNAME
26004 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26005 exit(1);
26006#endif
26007
26008#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026009 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26010 exit(1);
26011 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26012 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026013#endif
Brett Cannon18367812003-09-19 00:59:16 +000026014
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026015 exit(0);
26016}
26017
26018_ACEOF
26019rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026020if { (ac_try="$ac_link"
26021case "(($ac_try" in
26022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26023 *) ac_try_echo=$ac_try;;
26024esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026026 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026027 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026029 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026030 { (case "(($ac_try" in
26031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26032 *) ac_try_echo=$ac_try;;
26033esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026035 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026036 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026038 (exit $ac_status); }; }; then
26039 ac_cv_working_tzset=yes
26040else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026041 echo "$as_me: program exited with status $ac_status" >&5
26042echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026043sed 's/^/| /' conftest.$ac_ext >&5
26044
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026045( exit $ac_status )
26046ac_cv_working_tzset=no
26047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026048rm -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 +000026049fi
26050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026051
26052fi
26053
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026054{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26055echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026056if test "$ac_cv_working_tzset" = yes
26057then
26058
26059cat >>confdefs.h <<\_ACEOF
26060#define HAVE_WORKING_TZSET 1
26061_ACEOF
26062
26063fi
26064
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026065# Look for subsecond timestamps in struct stat
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026066{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26067echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026068if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026069 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026070else
26071 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026072/* confdefs.h. */
26073_ACEOF
26074cat confdefs.h >>conftest.$ac_ext
26075cat >>conftest.$ac_ext <<_ACEOF
26076/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026077#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026078int
26079main ()
26080{
26081
26082struct stat st;
26083st.st_mtim.tv_nsec = 1;
26084
26085 ;
26086 return 0;
26087}
26088_ACEOF
26089rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026090if { (ac_try="$ac_compile"
26091case "(($ac_try" in
26092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26093 *) ac_try_echo=$ac_try;;
26094esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026096 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026098 grep -v '^ *+' conftest.er1 >conftest.err
26099 rm -f conftest.er1
26100 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026102 (exit $ac_status); } && {
26103 test -z "$ac_c_werror_flag" ||
26104 test ! -s conftest.err
26105 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026106 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026107else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026109sed 's/^/| /' conftest.$ac_ext >&5
26110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026111 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26115fi
26116
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026117{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26118echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026119if test "$ac_cv_stat_tv_nsec" = yes
26120then
26121
26122cat >>confdefs.h <<\_ACEOF
26123#define HAVE_STAT_TV_NSEC 1
26124_ACEOF
26125
26126fi
26127
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026128# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026129{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26130echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026131if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026132 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026133else
26134 cat >conftest.$ac_ext <<_ACEOF
26135/* confdefs.h. */
26136_ACEOF
26137cat confdefs.h >>conftest.$ac_ext
26138cat >>conftest.$ac_ext <<_ACEOF
26139/* end confdefs.h. */
26140#include <sys/stat.h>
26141int
26142main ()
26143{
26144
26145struct stat st;
26146st.st_mtimespec.tv_nsec = 1;
26147
26148 ;
26149 return 0;
26150}
26151_ACEOF
26152rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026153if { (ac_try="$ac_compile"
26154case "(($ac_try" in
26155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26156 *) ac_try_echo=$ac_try;;
26157esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026160 ac_status=$?
26161 grep -v '^ *+' conftest.er1 >conftest.err
26162 rm -f conftest.er1
26163 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026165 (exit $ac_status); } && {
26166 test -z "$ac_c_werror_flag" ||
26167 test ! -s conftest.err
26168 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026169 ac_cv_stat_tv_nsec2=yes
26170else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026171 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026172sed 's/^/| /' conftest.$ac_ext >&5
26173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026174 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026175fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26178fi
26179
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026180{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26181echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026182if test "$ac_cv_stat_tv_nsec2" = yes
26183then
26184
26185cat >>confdefs.h <<\_ACEOF
26186#define HAVE_STAT_TV_NSEC2 1
26187_ACEOF
26188
26189fi
26190
Jack Jansen666b1e72001-10-31 12:11:48 +000026191# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026192{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26193echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026194if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026195 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026196else
Martin v. Löwis11437992002-04-12 09:54:03 +000026197 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026198/* confdefs.h. */
26199_ACEOF
26200cat confdefs.h >>conftest.$ac_ext
26201cat >>conftest.$ac_ext <<_ACEOF
26202/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026203#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026204int
26205main ()
26206{
Jack Jansen666b1e72001-10-31 12:11:48 +000026207
26208 int rtn;
26209 rtn = mvwdelch(0,0,0);
26210
Martin v. Löwis11437992002-04-12 09:54:03 +000026211 ;
26212 return 0;
26213}
26214_ACEOF
26215rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026216if { (ac_try="$ac_compile"
26217case "(($ac_try" in
26218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26219 *) ac_try_echo=$ac_try;;
26220esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026224 grep -v '^ *+' conftest.er1 >conftest.err
26225 rm -f conftest.er1
26226 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026228 (exit $ac_status); } && {
26229 test -z "$ac_c_werror_flag" ||
26230 test ! -s conftest.err
26231 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026232 ac_cv_mvwdelch_is_expression=yes
26233else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026235sed 's/^/| /' conftest.$ac_ext >&5
26236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026237 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026238fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26241fi
26242
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026243{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26244echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026245
26246if test "$ac_cv_mvwdelch_is_expression" = yes
26247then
Martin v. Löwis11437992002-04-12 09:54:03 +000026248
26249cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026250#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026251_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026252
26253fi
26254
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026255{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26256echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026257if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026258 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026259else
Martin v. Löwis11437992002-04-12 09:54:03 +000026260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026261/* confdefs.h. */
26262_ACEOF
26263cat confdefs.h >>conftest.$ac_ext
26264cat >>conftest.$ac_ext <<_ACEOF
26265/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026266#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026267int
26268main ()
26269{
Jack Jansen666b1e72001-10-31 12:11:48 +000026270
26271 WINDOW *w;
26272 w->_flags = 0;
26273
Martin v. Löwis11437992002-04-12 09:54:03 +000026274 ;
26275 return 0;
26276}
26277_ACEOF
26278rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026279if { (ac_try="$ac_compile"
26280case "(($ac_try" in
26281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26282 *) ac_try_echo=$ac_try;;
26283esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026287 grep -v '^ *+' conftest.er1 >conftest.err
26288 rm -f conftest.er1
26289 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026291 (exit $ac_status); } && {
26292 test -z "$ac_c_werror_flag" ||
26293 test ! -s conftest.err
26294 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026295 ac_cv_window_has_flags=yes
26296else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026298sed 's/^/| /' conftest.$ac_ext >&5
26299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026300 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026301fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26304fi
26305
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026306{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26307echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026308
Jack Jansen666b1e72001-10-31 12:11:48 +000026309
26310if test "$ac_cv_window_has_flags" = yes
26311then
Martin v. Löwis11437992002-04-12 09:54:03 +000026312
26313cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026314#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026315_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026316
26317fi
26318
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026319{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26320echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026321cat >conftest.$ac_ext <<_ACEOF
26322/* confdefs.h. */
26323_ACEOF
26324cat confdefs.h >>conftest.$ac_ext
26325cat >>conftest.$ac_ext <<_ACEOF
26326/* end confdefs.h. */
26327#include <curses.h>
26328int
26329main ()
26330{
26331void *x=is_term_resized
26332 ;
26333 return 0;
26334}
26335_ACEOF
26336rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026337if { (ac_try="$ac_compile"
26338case "(($ac_try" in
26339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26340 *) ac_try_echo=$ac_try;;
26341esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026343 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026344 ac_status=$?
26345 grep -v '^ *+' conftest.er1 >conftest.err
26346 rm -f conftest.er1
26347 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026349 (exit $ac_status); } && {
26350 test -z "$ac_c_werror_flag" ||
26351 test ! -s conftest.err
26352 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026353
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026354cat >>confdefs.h <<\_ACEOF
26355#define HAVE_CURSES_IS_TERM_RESIZED 1
26356_ACEOF
26357
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026358 { echo "$as_me:$LINENO: result: yes" >&5
26359echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026360else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026361 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026362sed 's/^/| /' conftest.$ac_ext >&5
26363
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026364 { echo "$as_me:$LINENO: result: no" >&5
26365echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026366
26367fi
26368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26370
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026371{ echo "$as_me:$LINENO: checking for resize_term" >&5
26372echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026373cat >conftest.$ac_ext <<_ACEOF
26374/* confdefs.h. */
26375_ACEOF
26376cat confdefs.h >>conftest.$ac_ext
26377cat >>conftest.$ac_ext <<_ACEOF
26378/* end confdefs.h. */
26379#include <curses.h>
26380int
26381main ()
26382{
26383void *x=resize_term
26384 ;
26385 return 0;
26386}
26387_ACEOF
26388rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026389if { (ac_try="$ac_compile"
26390case "(($ac_try" in
26391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26392 *) ac_try_echo=$ac_try;;
26393esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026395 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026396 ac_status=$?
26397 grep -v '^ *+' conftest.er1 >conftest.err
26398 rm -f conftest.er1
26399 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026401 (exit $ac_status); } && {
26402 test -z "$ac_c_werror_flag" ||
26403 test ! -s conftest.err
26404 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026405
26406cat >>confdefs.h <<\_ACEOF
26407#define HAVE_CURSES_RESIZE_TERM 1
26408_ACEOF
26409
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026410 { echo "$as_me:$LINENO: result: yes" >&5
26411echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026412else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026413 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026414sed 's/^/| /' conftest.$ac_ext >&5
26415
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026416 { echo "$as_me:$LINENO: result: no" >&5
26417echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026418
26419fi
26420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26422
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026423{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26424echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026425cat >conftest.$ac_ext <<_ACEOF
26426/* confdefs.h. */
26427_ACEOF
26428cat confdefs.h >>conftest.$ac_ext
26429cat >>conftest.$ac_ext <<_ACEOF
26430/* end confdefs.h. */
26431#include <curses.h>
26432int
26433main ()
26434{
26435void *x=resizeterm
26436 ;
26437 return 0;
26438}
26439_ACEOF
26440rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026441if { (ac_try="$ac_compile"
26442case "(($ac_try" in
26443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26444 *) ac_try_echo=$ac_try;;
26445esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026447 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026448 ac_status=$?
26449 grep -v '^ *+' conftest.er1 >conftest.err
26450 rm -f conftest.er1
26451 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026453 (exit $ac_status); } && {
26454 test -z "$ac_c_werror_flag" ||
26455 test ! -s conftest.err
26456 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026457
26458cat >>confdefs.h <<\_ACEOF
26459#define HAVE_CURSES_RESIZETERM 1
26460_ACEOF
26461
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026462 { echo "$as_me:$LINENO: result: yes" >&5
26463echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026464else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026465 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026466sed 's/^/| /' conftest.$ac_ext >&5
26467
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026468 { echo "$as_me:$LINENO: result: no" >&5
26469echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026470
26471fi
26472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26474
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026475{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26476echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026477
26478if test -r /dev/ptmx
26479then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026480 { echo "$as_me:$LINENO: result: yes" >&5
26481echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026482
26483cat >>confdefs.h <<\_ACEOF
26484#define HAVE_DEV_PTMX 1
26485_ACEOF
26486
Thomas Wouters89f507f2006-12-13 04:49:30 +000026487else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026488 { echo "$as_me:$LINENO: result: no" >&5
26489echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026490fi
26491
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026492{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26493echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026494
26495if test -r /dev/ptc
26496then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026497 { echo "$as_me:$LINENO: result: yes" >&5
26498echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026499
26500cat >>confdefs.h <<\_ACEOF
26501#define HAVE_DEV_PTC 1
26502_ACEOF
26503
Thomas Wouters89f507f2006-12-13 04:49:30 +000026504else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026505 { echo "$as_me:$LINENO: result: no" >&5
26506echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026507fi
26508
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026509{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26510echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026511if test "${ac_cv_have_size_t_format+set}" = set; then
26512 echo $ECHO_N "(cached) $ECHO_C" >&6
26513else
26514 if test "$cross_compiling" = yes; then
26515 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026516else
26517 cat >conftest.$ac_ext <<_ACEOF
26518/* confdefs.h. */
26519_ACEOF
26520cat confdefs.h >>conftest.$ac_ext
26521cat >>conftest.$ac_ext <<_ACEOF
26522/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026523
Thomas Wouters477c8d52006-05-27 19:21:47 +000026524#include <stdio.h>
26525#include <stddef.h>
26526#include <string.h>
26527
Christian Heimes2c181612007-12-17 20:04:13 +000026528#ifdef HAVE_SYS_TYPES_H
26529#include <sys/types.h>
26530#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026531
26532#ifdef HAVE_SSIZE_T
26533typedef ssize_t Py_ssize_t;
26534#elif SIZEOF_VOID_P == SIZEOF_LONG
26535typedef long Py_ssize_t;
26536#else
26537typedef int Py_ssize_t;
26538#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026539
Christian Heimes2c181612007-12-17 20:04:13 +000026540int main()
26541{
26542 char buffer[256];
26543
Thomas Wouters477c8d52006-05-27 19:21:47 +000026544 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26545 return 1;
26546
Thomas Wouters89f507f2006-12-13 04:49:30 +000026547 if (strcmp(buffer, "123"))
26548 return 1;
26549
26550 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26551 return 1;
26552
26553 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026554 return 1;
26555
26556 return 0;
26557}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026558
Thomas Wouters477c8d52006-05-27 19:21:47 +000026559_ACEOF
26560rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026561if { (ac_try="$ac_link"
26562case "(($ac_try" in
26563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26564 *) ac_try_echo=$ac_try;;
26565esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026567 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026568 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026571 { (case "(($ac_try" in
26572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26573 *) ac_try_echo=$ac_try;;
26574esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026576 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026577 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026579 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026580 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026581else
26582 echo "$as_me: program exited with status $ac_status" >&5
26583echo "$as_me: failed program was:" >&5
26584sed 's/^/| /' conftest.$ac_ext >&5
26585
26586( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026587ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026588fi
26589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026590fi
26591
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026592
26593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026594fi
26595
26596{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26597echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
26598if test $ac_cv_have_size_t_format = yes
26599then
26600
26601cat >>confdefs.h <<\_ACEOF
26602#define PY_FORMAT_SIZE_T "z"
26603_ACEOF
26604
26605fi
26606
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026607{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26608echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026609if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026610 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026611else
Martin v. Löwis11437992002-04-12 09:54:03 +000026612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026613/* confdefs.h. */
26614_ACEOF
26615cat confdefs.h >>conftest.$ac_ext
26616cat >>conftest.$ac_ext <<_ACEOF
26617/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026618
26619#ifdef HAVE_SYS_TYPES_H
26620#include <sys/types.h>
26621#endif
26622#ifdef HAVE_SYS_SOCKET_H
26623#include <sys/socket.h>
26624#endif
26625
26626
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026627typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026628int
26629main ()
26630{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026631if ((ac__type_new_ *) 0)
26632 return 0;
26633if (sizeof (ac__type_new_))
26634 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026635 ;
26636 return 0;
26637}
26638_ACEOF
26639rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026640if { (ac_try="$ac_compile"
26641case "(($ac_try" in
26642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26643 *) ac_try_echo=$ac_try;;
26644esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026648 grep -v '^ *+' conftest.er1 >conftest.err
26649 rm -f conftest.er1
26650 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026652 (exit $ac_status); } && {
26653 test -z "$ac_c_werror_flag" ||
26654 test ! -s conftest.err
26655 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026656 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026657else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026659sed 's/^/| /' conftest.$ac_ext >&5
26660
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026661 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026663
26664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026665fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026666{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26667echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26668if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026669 :
26670else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026671
Martin v. Löwis01c04012002-11-11 14:58:44 +000026672cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026673#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026674_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026675
26676fi
26677
Michael W. Hudson54241132001-12-07 15:38:26 +000026678
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026679{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26680echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026681if test "${ac_cv_broken_mbstowcs+set}" = set; then
26682 echo $ECHO_N "(cached) $ECHO_C" >&6
26683else
26684 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026685 ac_cv_broken_mbstowcs=no
26686else
26687 cat >conftest.$ac_ext <<_ACEOF
26688/* confdefs.h. */
26689_ACEOF
26690cat confdefs.h >>conftest.$ac_ext
26691cat >>conftest.$ac_ext <<_ACEOF
26692/* end confdefs.h. */
26693
26694#include<stdlib.h>
26695int main() {
26696 size_t len = -1;
26697 const char *str = "text";
26698 len = mbstowcs(NULL, str, 0);
26699 return (len != 4);
26700}
26701
26702_ACEOF
26703rm -f conftest$ac_exeext
26704if { (ac_try="$ac_link"
26705case "(($ac_try" in
26706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26707 *) ac_try_echo=$ac_try;;
26708esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026710 (eval "$ac_link") 2>&5
26711 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026713 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26714 { (case "(($ac_try" in
26715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26716 *) ac_try_echo=$ac_try;;
26717esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026719 (eval "$ac_try") 2>&5
26720 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026722 (exit $ac_status); }; }; then
26723 ac_cv_broken_mbstowcs=no
26724else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026725 echo "$as_me: program exited with status $ac_status" >&5
26726echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026727sed 's/^/| /' conftest.$ac_ext >&5
26728
26729( exit $ac_status )
26730ac_cv_broken_mbstowcs=yes
26731fi
26732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26733fi
26734
26735
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026736fi
26737
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026738{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26739echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026740if test "$ac_cv_broken_mbstowcs" = yes
26741then
26742
26743cat >>confdefs.h <<\_ACEOF
26744#define HAVE_BROKEN_MBSTOWCS 1
26745_ACEOF
26746
26747fi
26748
Antoine Pitroub52ec782009-01-25 16:34:23 +000026749# Check for --with-computed-gotos
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026750{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26751echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026752
26753# Check whether --with-computed-gotos was given.
26754if test "${with_computed_gotos+set}" = set; then
26755 withval=$with_computed_gotos;
26756if test "$withval" != no
26757then
26758
26759cat >>confdefs.h <<\_ACEOF
26760#define USE_COMPUTED_GOTOS 1
26761_ACEOF
26762
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026763 { echo "$as_me:$LINENO: result: yes" >&5
26764echo "${ECHO_T}yes" >&6; }
26765else { echo "$as_me:$LINENO: result: no" >&5
26766echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026767fi
26768else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026769 { echo "$as_me:$LINENO: result: no" >&5
26770echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026771fi
26772
26773
26774
Michael W. Hudson54241132001-12-07 15:38:26 +000026775
26776
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026777for h in `(cd $srcdir;echo Python/thread_*.h)`
26778do
26779 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26780done
26781
Michael W. Hudson54241132001-12-07 15:38:26 +000026782
Neal Norwitzd24499d2005-12-18 21:36:39 +000026783SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026784{ echo "$as_me:$LINENO: checking for build directories" >&5
26785echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026786for dir in $SRCDIRS; do
26787 if test ! -d $dir; then
26788 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026789 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026790done
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026791{ echo "$as_me:$LINENO: result: done" >&5
26792echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026793
Guido van Rossum627b2d71993-12-24 10:39:16 +000026794# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026795ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026796
Martin v. Löwis11437992002-04-12 09:54:03 +000026797cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026798# This file is a shell script that caches the results of configure
26799# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026800# scripts and configure runs, see configure's option --config-cache.
26801# It is not useful on other systems. If it contains results you don't
26802# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026803#
Martin v. Löwis11437992002-04-12 09:54:03 +000026804# config.status only pays attention to the cache file if you give it
26805# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026806#
Skip Montanaro6dead952003-09-25 14:50:04 +000026807# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026808# loading this file, other *unset* `ac_cv_foo' will be assigned the
26809# following values.
26810
26811_ACEOF
26812
Guido van Rossumf78abae1997-01-21 22:02:36 +000026813# The following way of writing the cache mishandles newlines in values,
26814# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026815# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026816# Ultrix sh set writes to stderr and can't be redirected directly,
26817# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026818(
26819 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26820 eval ac_val=\$$ac_var
26821 case $ac_val in #(
26822 *${as_nl}*)
26823 case $ac_var in #(
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026824 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26825echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026826 esac
26827 case $ac_var in #(
26828 _ | IFS | as_nl) ;; #(
26829 *) $as_unset $ac_var ;;
26830 esac ;;
26831 esac
26832 done
26833
Martin v. Löwis11437992002-04-12 09:54:03 +000026834 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026835 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26836 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026837 # `set' does not quote correctly, so add quotes (double-quote
26838 # substitution turns \\\\ into \\, and sed turns \\ into \).
26839 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026840 "s/'/'\\\\''/g;
26841 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026842 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026843 *)
26844 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026845 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026846 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026847 esac |
26848 sort
26849) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026850 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026851 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026852 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026853 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026854 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26855 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026856 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26857 :end' >>confcache
26858if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26859 if test -w "$cache_file"; then
26860 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026861 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26862echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026863 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026864 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026865 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26866echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026867 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026868fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026869rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026870
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026871test "x$prefix" = xNONE && prefix=$ac_default_prefix
26872# Let make expand exec_prefix.
26873test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026874
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026875DEFS=-DHAVE_CONFIG_H
26876
Skip Montanaro6dead952003-09-25 14:50:04 +000026877ac_libobjs=
26878ac_ltlibobjs=
26879for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26880 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026881 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026882 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026883 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26884 # will be set to the directory where LIBOBJS objects are built.
26885 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26886 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026887done
26888LIBOBJS=$ac_libobjs
26889
26890LTLIBOBJS=$ac_ltlibobjs
26891
26892
Martin v. Löwis11437992002-04-12 09:54:03 +000026893
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026894: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026895ac_clean_files_save=$ac_clean_files
26896ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026897{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26898echo "$as_me: creating $CONFIG_STATUS" >&6;}
26899cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026900#! $SHELL
26901# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026902# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026903# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026904# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026905
Martin v. Löwis11437992002-04-12 09:54:03 +000026906debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026907ac_cs_recheck=false
26908ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026909SHELL=\${CONFIG_SHELL-$SHELL}
26910_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026911
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026912cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026913## --------------------- ##
26914## M4sh Initialization. ##
26915## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026917# Be more Bourne compatible
26918DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026919if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26920 emulate sh
26921 NULLCMD=:
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026922 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026923 # is contrary to our usage. Disable this feature.
26924 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026925 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026926else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026927 case `(set -o) 2>/dev/null` in
26928 *posix*) set -o posix ;;
26929esac
26930
Michael W. Hudson54241132001-12-07 15:38:26 +000026931fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026932
26933
Michael W. Hudson54241132001-12-07 15:38:26 +000026934
Michael W. Hudson54241132001-12-07 15:38:26 +000026935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026936# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026937# Avoid depending upon Character Ranges.
26938as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26939as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26940as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26941as_cr_digits='0123456789'
26942as_cr_alnum=$as_cr_Letters$as_cr_digits
26943
26944# The user is always right.
26945if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026946 echo "#! /bin/sh" >conf$$.sh
26947 echo "exit 0" >>conf$$.sh
26948 chmod +x conf$$.sh
26949 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26950 PATH_SEPARATOR=';'
26951 else
26952 PATH_SEPARATOR=:
26953 fi
26954 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026955fi
26956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026957# Support unset when possible.
26958if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26959 as_unset=unset
26960else
26961 as_unset=false
26962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026964
26965# IFS
26966# We need space, tab and new line, in precisely that order. Quoting is
26967# there to prevent editors from complaining about space-tab.
26968# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26969# splitting by setting IFS to empty value.)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026970as_nl='
26971'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026972IFS=" "" $as_nl"
26973
26974# Find who we are. Look in the path if we contain no directory separator.
26975case $0 in
26976 *[\\/]* ) as_myself=$0 ;;
26977 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026978for as_dir in $PATH
26979do
26980 IFS=$as_save_IFS
26981 test -z "$as_dir" && as_dir=.
26982 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26983done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026984IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026986 ;;
26987esac
26988# We did not find ourselves, most probably we were run as `sh COMMAND'
26989# in which case we are not to be found in the path.
26990if test "x$as_myself" = x; then
26991 as_myself=$0
26992fi
26993if test ! -f "$as_myself"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026994 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026995 { (exit 1); exit 1; }
26996fi
26997
26998# Work around bugs in pre-3.0 UWIN ksh.
26999for as_var in ENV MAIL MAILPATH
27000do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27001done
27002PS1='$ '
27003PS2='> '
27004PS4='+ '
27005
27006# NLS nuisances.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027007for as_var in \
27008 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27009 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27010 LC_TELEPHONE LC_TIME
27011do
27012 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27013 eval $as_var=C; export $as_var
27014 else
27015 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27016 fi
27017done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027018
27019# Required to use basename.
27020if expr a : '\(a\)' >/dev/null 2>&1 &&
27021 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27022 as_expr=expr
27023else
27024 as_expr=false
27025fi
27026
27027if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27028 as_basename=basename
27029else
27030 as_basename=false
27031fi
27032
27033
27034# Name of the executable.
27035as_me=`$as_basename -- "$0" ||
27036$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27037 X"$0" : 'X\(//\)$' \| \
27038 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027039echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027040 sed '/^.*\/\([^/][^/]*\)\/*$/{
27041 s//\1/
27042 q
27043 }
27044 /^X\/\(\/\/\)$/{
27045 s//\1/
27046 q
27047 }
27048 /^X\/\(\/\).*/{
27049 s//\1/
27050 q
27051 }
27052 s/.*/./; q'`
27053
27054# CDPATH.
27055$as_unset CDPATH
27056
27057
27058
Martin v. Löwis11437992002-04-12 09:54:03 +000027059 as_lineno_1=$LINENO
27060 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027061 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027062 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027063
Martin v. Löwis11437992002-04-12 09:54:03 +000027064 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27065 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027066 # line-number line after each line using $LINENO; the second 'sed'
27067 # does the real work. The second script uses 'N' to pair each
27068 # line-number line with the line containing $LINENO, and appends
27069 # trailing '-' during substitution so that $LINENO is not a special
27070 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027071 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027072 # scripts with optimization help from Paolo Bonzini. Blame Lee
27073 # E. McMahon (1931-1989) for sed's syntax. :-)
27074 sed -n '
27075 p
27076 /[$]LINENO/=
27077 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027078 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027079 s/[$]LINENO.*/&-/
27080 t lineno
27081 b
27082 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027083 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027084 :loop
27085 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027086 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027087 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027088 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027089 chmod +x "$as_me.lineno" ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027090 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027091 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027092
Martin v. Löwis11437992002-04-12 09:54:03 +000027093 # Don't try to exec as it changes $[0], causing all sort of problems
27094 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027095 # original and so on. Autoconf is especially sensitive to this).
27096 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027097 # Exit status is that of the last command.
27098 exit
27099}
27100
27101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027102if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27103 as_dirname=dirname
27104else
27105 as_dirname=false
27106fi
27107
27108ECHO_C= ECHO_N= ECHO_T=
27109case `echo -n x` in
27110-n*)
27111 case `echo 'x\c'` in
27112 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27113 *) ECHO_C='\c';;
27114 esac;;
27115*)
27116 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027117esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027119if expr a : '\(a\)' >/dev/null 2>&1 &&
27120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027121 as_expr=expr
27122else
27123 as_expr=false
27124fi
27125
27126rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027127if test -d conf$$.dir; then
27128 rm -f conf$$.dir/conf$$.file
27129else
27130 rm -f conf$$.dir
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027131 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027132fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027133echo >conf$$.file
27134if ln -s conf$$.file conf$$ 2>/dev/null; then
27135 as_ln_s='ln -s'
27136 # ... but there are two gotchas:
27137 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27138 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27139 # In both cases, we have to default to `cp -p'.
27140 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027141 as_ln_s='cp -p'
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027142elif ln conf$$.file conf$$ 2>/dev/null; then
27143 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027144else
27145 as_ln_s='cp -p'
27146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027147rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27148rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027149
Skip Montanaro6dead952003-09-25 14:50:04 +000027150if mkdir -p . 2>/dev/null; then
27151 as_mkdir_p=:
27152else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027153 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027154 as_mkdir_p=false
27155fi
27156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027157if test -x / >/dev/null 2>&1; then
27158 as_test_x='test -x'
27159else
27160 if ls -dL / >/dev/null 2>&1; then
27161 as_ls_L_option=L
27162 else
27163 as_ls_L_option=
27164 fi
27165 as_test_x='
27166 eval sh -c '\''
27167 if test -d "$1"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027168 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027169 else
27170 case $1 in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027171 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027172 esac;
27173 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27174 ???[sx]*):;;*)false;;esac;fi
27175 '\'' sh
27176 '
27177fi
27178as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027179
27180# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027181as_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 +000027182
27183# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027184as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027185
27186
Martin v. Löwis11437992002-04-12 09:54:03 +000027187exec 6>&1
27188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027189# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027190# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027191# values after options handling.
27192ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027193This file was extended by python $as_me 3.2, which was
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027194generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027195
27196 CONFIG_FILES = $CONFIG_FILES
27197 CONFIG_HEADERS = $CONFIG_HEADERS
27198 CONFIG_LINKS = $CONFIG_LINKS
27199 CONFIG_COMMANDS = $CONFIG_COMMANDS
27200 $ $0 $@
27201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027202on `(hostname || uname -n) 2>/dev/null | sed 1q`
27203"
27204
Martin v. Löwis11437992002-04-12 09:54:03 +000027205_ACEOF
27206
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027207cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027208# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027209config_files="$ac_config_files"
27210config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027212_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027213
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027214cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027215ac_cs_usage="\
27216\`$as_me' instantiates files from templates according to the
27217current configuration.
27218
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027219Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027220
27221 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027222 -V, --version print version number and configuration settings, then exit
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027223 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027224 -d, --debug don't remove temporary files
27225 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027226 --file=FILE[:TEMPLATE]
27227 instantiate the configuration file FILE
27228 --header=FILE[:TEMPLATE]
27229 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027230
27231Configuration files:
27232$config_files
27233
27234Configuration headers:
27235$config_headers
27236
27237Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027239_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027240cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027241ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027242python config.status 3.2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027243configured by $0, generated by GNU Autoconf 2.61,
27244 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027245
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027246Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027247This config.status script is free software; the Free Software Foundation
27248gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027249
27250ac_pwd='$ac_pwd'
27251srcdir='$srcdir'
27252INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027253_ACEOF
27254
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027255cat >>$CONFIG_STATUS <<\_ACEOF
27256# If no file are specified by the user, then we need to provide default
27257# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027258ac_need_defaults=:
27259while test $# != 0
27260do
27261 case $1 in
27262 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027263 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27264 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027265 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027266 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027267 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027268 ac_option=$1
27269 ac_optarg=$2
27270 ac_shift=shift
27271 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027272 esac
27273
Skip Montanaro6dead952003-09-25 14:50:04 +000027274 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027275 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027276 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27277 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027278 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027279 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027280 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027281 debug=: ;;
27282 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027283 $ac_shift
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027284 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027285 ac_need_defaults=false;;
27286 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027287 $ac_shift
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027288 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027289 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027290 --he | --h)
27291 # Conflict between --help and --header
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027292 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027293Try \`$0 --help' for more information." >&2
27294 { (exit 1); exit 1; }; };;
27295 --help | --hel | -h )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027296 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27298 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27299 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027300
27301 # This is an error.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027302 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027303Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027304 { (exit 1); exit 1; }; } ;;
27305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027306 *) ac_config_targets="$ac_config_targets $1"
27307 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027308
27309 esac
27310 shift
27311done
27312
Skip Montanaro6dead952003-09-25 14:50:04 +000027313ac_configure_extra_args=
27314
27315if $ac_cs_silent; then
27316 exec 6>/dev/null
27317 ac_configure_extra_args="$ac_configure_extra_args --silent"
27318fi
27319
27320_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027321cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027322if \$ac_cs_recheck; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027323 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27324 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027325 export CONFIG_SHELL
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027326 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027327fi
27328
Martin v. Löwis11437992002-04-12 09:54:03 +000027329_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027330cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027331exec 5>>config.log
27332{
27333 echo
27334 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27335## Running $as_me. ##
27336_ASBOX
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027337 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027338} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027340_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027341cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027342_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027343
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027344cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027345
27346# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027347for ac_config_target in $ac_config_targets
27348do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027349 case $ac_config_target in
27350 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27351 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27352 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027353 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27354 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027355 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27356 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027357 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027358
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027359 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27360echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027361 { (exit 1); exit 1; }; };;
27362 esac
27363done
27364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027365
Martin v. Löwis11437992002-04-12 09:54:03 +000027366# If the user did not use the arguments to specify the items to instantiate,
27367# then the envvar interface is used. Set only those that are not.
27368# We use the long form for the default assignment because of an extremely
27369# bizarre bug on SunOS 4.1.3.
27370if $ac_need_defaults; then
27371 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27372 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27373fi
27374
Skip Montanaro6dead952003-09-25 14:50:04 +000027375# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027376# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027377# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027378# Hook for its removal unless debugging.
27379# Note that there is a small window in which the directory will not be cleaned:
27380# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027381$debug ||
27382{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027383 tmp=
27384 trap 'exit_status=$?
27385 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27386' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027387 trap '{ (exit 1); exit 1; }' 1 2 13 15
27388}
Martin v. Löwis11437992002-04-12 09:54:03 +000027389# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027390
Martin v. Löwis11437992002-04-12 09:54:03 +000027391{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027392 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027393 test -n "$tmp" && test -d "$tmp"
27394} ||
27395{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027396 tmp=./conf$$-$RANDOM
27397 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027398} ||
27399{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027400 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027401 { (exit 1); exit 1; }
27402}
27403
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027404#
27405# Set up the sed scripts for CONFIG_FILES section.
27406#
27407
27408# No need to generate the scripts if there are no CONFIG_FILES.
27409# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027410if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027411
27412_ACEOF
27413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027414
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027416ac_delim='%!_!# '
27417for ac_last_try in false false false false false :; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027418 cat >conf$$subs.sed <<_ACEOF
27419SHELL!$SHELL$ac_delim
27420PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27421PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27422PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27423PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27424PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27425PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27426exec_prefix!$exec_prefix$ac_delim
27427prefix!$prefix$ac_delim
27428program_transform_name!$program_transform_name$ac_delim
27429bindir!$bindir$ac_delim
27430sbindir!$sbindir$ac_delim
27431libexecdir!$libexecdir$ac_delim
27432datarootdir!$datarootdir$ac_delim
27433datadir!$datadir$ac_delim
27434sysconfdir!$sysconfdir$ac_delim
27435sharedstatedir!$sharedstatedir$ac_delim
27436localstatedir!$localstatedir$ac_delim
27437includedir!$includedir$ac_delim
27438oldincludedir!$oldincludedir$ac_delim
27439docdir!$docdir$ac_delim
27440infodir!$infodir$ac_delim
27441htmldir!$htmldir$ac_delim
27442dvidir!$dvidir$ac_delim
27443pdfdir!$pdfdir$ac_delim
27444psdir!$psdir$ac_delim
27445libdir!$libdir$ac_delim
27446localedir!$localedir$ac_delim
27447mandir!$mandir$ac_delim
27448DEFS!$DEFS$ac_delim
27449ECHO_C!$ECHO_C$ac_delim
27450ECHO_N!$ECHO_N$ac_delim
27451ECHO_T!$ECHO_T$ac_delim
27452LIBS!$LIBS$ac_delim
27453build_alias!$build_alias$ac_delim
27454host_alias!$host_alias$ac_delim
27455target_alias!$target_alias$ac_delim
27456VERSION!$VERSION$ac_delim
27457SOVERSION!$SOVERSION$ac_delim
27458CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27459UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27460ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27461PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27462PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27463PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27464PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27465PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27466FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27467FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27468FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27469FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27470FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27471MACHDEP!$MACHDEP$ac_delim
27472SGI_ABI!$SGI_ABI$ac_delim
27473CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27474EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27475CC!$CC$ac_delim
27476CFLAGS!$CFLAGS$ac_delim
27477LDFLAGS!$LDFLAGS$ac_delim
27478CPPFLAGS!$CPPFLAGS$ac_delim
27479ac_ct_CC!$ac_ct_CC$ac_delim
27480EXEEXT!$EXEEXT$ac_delim
27481OBJEXT!$OBJEXT$ac_delim
27482CXX!$CXX$ac_delim
27483MAINCC!$MAINCC$ac_delim
27484CPP!$CPP$ac_delim
27485GREP!$GREP$ac_delim
27486EGREP!$EGREP$ac_delim
27487BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27488LIBRARY!$LIBRARY$ac_delim
27489LDLIBRARY!$LDLIBRARY$ac_delim
27490DLLLIBRARY!$DLLLIBRARY$ac_delim
27491BLDLIBRARY!$BLDLIBRARY$ac_delim
27492LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27493INSTSONAME!$INSTSONAME$ac_delim
27494RUNSHARED!$RUNSHARED$ac_delim
27495LINKCC!$LINKCC$ac_delim
27496GNULD!$GNULD$ac_delim
27497RANLIB!$RANLIB$ac_delim
27498AR!$AR$ac_delim
27499ARFLAGS!$ARFLAGS$ac_delim
27500SVNVERSION!$SVNVERSION$ac_delim
27501INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27502INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27503INSTALL_DATA!$INSTALL_DATA$ac_delim
27504LN!$LN$ac_delim
27505OPT!$OPT$ac_delim
27506BASECFLAGS!$BASECFLAGS$ac_delim
27507UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27508OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27509LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27510SO!$SO$ac_delim
27511LDSHARED!$LDSHARED$ac_delim
27512BLDSHARED!$BLDSHARED$ac_delim
27513CCSHARED!$CCSHARED$ac_delim
27514LINKFORSHARED!$LINKFORSHARED$ac_delim
27515CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27516_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027517
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027518 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027519 break
27520 elif $ac_last_try; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027521 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27522echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027523 { (exit 1); exit 1; }; }
27524 else
27525 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027526 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027527done
27528
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027529ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27530if test -n "$ac_eof"; then
27531 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27532 ac_eof=`expr $ac_eof + 1`
27533fi
27534
27535cat >>$CONFIG_STATUS <<_ACEOF
27536cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27537/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027538_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027539sed '
27540s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27541s/^/s,@/; s/!/@,|#_!!_#|/
27542:n
27543t n
27544s/'"$ac_delim"'$/,g/; t
27545s/$/\\/; p
27546N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27547' >>$CONFIG_STATUS <conf$$subs.sed
27548rm -f conf$$subs.sed
27549cat >>$CONFIG_STATUS <<_ACEOF
27550CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027551_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027552
27553
27554ac_delim='%!_!# '
27555for ac_last_try in false false false false false :; do
27556 cat >conf$$subs.sed <<_ACEOF
27557SHLIBS!$SHLIBS$ac_delim
27558USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27559SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27560USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27561LDLAST!$LDLAST$ac_delim
27562THREADOBJ!$THREADOBJ$ac_delim
27563DLINCLDIR!$DLINCLDIR$ac_delim
27564DYNLOADFILE!$DYNLOADFILE$ac_delim
27565MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27566TRUE!$TRUE$ac_delim
27567LIBOBJS!$LIBOBJS$ac_delim
27568HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27569HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27570HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27571HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27572HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27573LIBM!$LIBM$ac_delim
27574LIBC!$LIBC$ac_delim
27575THREADHEADERS!$THREADHEADERS$ac_delim
27576SRCDIRS!$SRCDIRS$ac_delim
27577LTLIBOBJS!$LTLIBOBJS$ac_delim
27578_ACEOF
27579
27580 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
27581 break
27582 elif $ac_last_try; then
27583 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27584echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027585 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027586 else
27587 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27588 fi
27589done
27590
27591ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27592if test -n "$ac_eof"; then
27593 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27594 ac_eof=`expr $ac_eof + 1`
27595fi
27596
27597cat >>$CONFIG_STATUS <<_ACEOF
27598cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27599/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027600_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027601sed '
27602s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27603s/^/s,@/; s/!/@,|#_!!_#|/
27604:n
27605t n
27606s/'"$ac_delim"'$/,g/; t
27607s/$/\\/; p
27608N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27609' >>$CONFIG_STATUS <conf$$subs.sed
27610rm -f conf$$subs.sed
27611cat >>$CONFIG_STATUS <<_ACEOF
27612:end
27613s/|#_!!_#|//g
27614CEOF$ac_eof
27615_ACEOF
27616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027617
27618# VPATH may cause trouble with some makes, so we remove $(srcdir),
27619# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27620# trailing colons and then remove the whole line if VPATH becomes empty
27621# (actually we leave an empty line to preserve line numbers).
27622if test "x$srcdir" = x.; then
27623 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27624s/:*\$(srcdir):*/:/
27625s/:*\${srcdir}:*/:/
27626s/:*@srcdir@:*/:/
27627s/^\([^=]*=[ ]*\):*/\1/
27628s/:*$//
27629s/^[^=]*=[ ]*$//
27630}'
27631fi
27632
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027633cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027634fi # test -n "$CONFIG_FILES"
27635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027636
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027637for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027638do
27639 case $ac_tag in
27640 :[FHLC]) ac_mode=$ac_tag; continue;;
27641 esac
27642 case $ac_mode$ac_tag in
27643 :[FHL]*:*);;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027644 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27645echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027646 { (exit 1); exit 1; }; };;
27647 :[FH]-) ac_tag=-:-;;
27648 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27649 esac
27650 ac_save_IFS=$IFS
27651 IFS=:
27652 set x $ac_tag
27653 IFS=$ac_save_IFS
27654 shift
27655 ac_file=$1
27656 shift
27657
27658 case $ac_mode in
27659 :L) ac_source=$1;;
27660 :[FH])
27661 ac_file_inputs=
27662 for ac_f
27663 do
27664 case $ac_f in
27665 -) ac_f="$tmp/stdin";;
27666 *) # Look for the file first in the build tree, then in the source tree
27667 # (if the path is not absolute). The absolute path cannot be DOS-style,
27668 # because $ac_f cannot contain `:'.
27669 test -f "$ac_f" ||
27670 case $ac_f in
27671 [\\/$]*) false;;
27672 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27673 esac ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027674 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27675echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027676 { (exit 1); exit 1; }; };;
27677 esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027678 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027679 done
27680
27681 # Let's still pretend it is `configure' which instantiates (i.e., don't
27682 # use $as_me), people would be surprised to read:
27683 # /* config.h. Generated by config.status. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027684 configure_input="Generated from "`IFS=:
27685 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027686 if test x"$ac_file" != x-; then
27687 configure_input="$ac_file. $configure_input"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027688 { echo "$as_me:$LINENO: creating $ac_file" >&5
27689echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027690 fi
27691
27692 case $ac_tag in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027693 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027694 esac
27695 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027696 esac
27697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027698 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027699$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027700 X"$ac_file" : 'X\(//\)[^/]' \| \
27701 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027702 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027703echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027704 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27705 s//\1/
27706 q
27707 }
27708 /^X\(\/\/\)[^/].*/{
27709 s//\1/
27710 q
27711 }
27712 /^X\(\/\/\)$/{
27713 s//\1/
27714 q
27715 }
27716 /^X\(\/\).*/{
27717 s//\1/
27718 q
27719 }
27720 s/.*/./; q'`
27721 { as_dir="$ac_dir"
27722 case $as_dir in #(
27723 -*) as_dir=./$as_dir;;
27724 esac
27725 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027726 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027727 while :; do
27728 case $as_dir in #(
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027729 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027730 *) as_qdir=$as_dir;;
27731 esac
27732 as_dirs="'$as_qdir' $as_dirs"
27733 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027734$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027735 X"$as_dir" : 'X\(//\)[^/]' \| \
27736 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027737 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027738echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027739 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27740 s//\1/
27741 q
27742 }
27743 /^X\(\/\/\)[^/].*/{
27744 s//\1/
27745 q
27746 }
27747 /^X\(\/\/\)$/{
27748 s//\1/
27749 q
27750 }
27751 /^X\(\/\).*/{
27752 s//\1/
27753 q
27754 }
27755 s/.*/./; q'`
27756 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027757 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027758 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027759 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27760echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027761 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027762 ac_builddir=.
27763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027764case "$ac_dir" in
27765.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27766*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027767 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027768 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027769 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027770 case $ac_top_builddir_sub in
27771 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27772 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27773 esac ;;
27774esac
27775ac_abs_top_builddir=$ac_pwd
27776ac_abs_builddir=$ac_pwd$ac_dir_suffix
27777# for backward compatibility:
27778ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027779
27780case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027781 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027782 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027783 ac_top_srcdir=$ac_top_builddir_sub
27784 ac_abs_top_srcdir=$ac_pwd ;;
27785 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027786 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027787 ac_top_srcdir=$srcdir
27788 ac_abs_top_srcdir=$srcdir ;;
27789 *) # Relative name.
27790 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27791 ac_top_srcdir=$ac_top_build_prefix$srcdir
27792 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027793esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027794ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027795
Martin v. Löwis11437992002-04-12 09:54:03 +000027796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027797 case $ac_mode in
27798 :F)
27799 #
27800 # CONFIG_FILE
27801 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027802
27803 case $INSTALL in
27804 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027805 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027806 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027807_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027808
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027809cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027810# If the template does not know about datarootdir, expand it.
27811# FIXME: This hack should be removed a few years after 2.60.
27812ac_datarootdir_hack=; ac_datarootdir_seen=
27813
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027814case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027815 p
27816 q
27817}
27818/@datadir@/p
27819/@docdir@/p
27820/@infodir@/p
27821/@localedir@/p
27822/@mandir@/p
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027823' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027824*datarootdir*) ac_datarootdir_seen=yes;;
27825*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027826 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27827echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027828_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027829cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027830 ac_datarootdir_hack='
27831 s&@datadir@&$datadir&g
27832 s&@docdir@&$docdir&g
27833 s&@infodir@&$infodir&g
27834 s&@localedir@&$localedir&g
27835 s&@mandir@&$mandir&g
27836 s&\\\${datarootdir}&$datarootdir&g' ;;
27837esac
27838_ACEOF
27839
27840# Neutralize VPATH when `$srcdir' = `.'.
27841# Shell code in configure.ac might set extrasub.
27842# FIXME: do we really want to maintain this feature?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027843cat >>$CONFIG_STATUS <<_ACEOF
27844 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027845$extrasub
27846_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027847cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027848:t
27849/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027850s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027851s&@top_builddir@&$ac_top_builddir_sub&;t t
27852s&@srcdir@&$ac_srcdir&;t t
27853s&@abs_srcdir@&$ac_abs_srcdir&;t t
27854s&@top_srcdir@&$ac_top_srcdir&;t t
27855s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27856s&@builddir@&$ac_builddir&;t t
27857s&@abs_builddir@&$ac_abs_builddir&;t t
27858s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27859s&@INSTALL@&$ac_INSTALL&;t t
27860$ac_datarootdir_hack
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027861" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027863test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27864 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27865 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027866 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027867which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027868echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027869which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027872 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027873 -) cat "$tmp/out"; rm -f "$tmp/out";;
27874 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27875 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027876 ;;
27877 :H)
27878 #
27879 # CONFIG_HEADER
27880 #
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027881_ACEOF
27882
27883# Transform confdefs.h into a sed script `conftest.defines', that
27884# substitutes the proper values into config.h.in to produce config.h.
27885rm -f conftest.defines conftest.tail
27886# First, append a space to every undef/define line, to ease matching.
27887echo 's/$/ /' >conftest.defines
27888# Then, protect against being on the right side of a sed subst, or in
27889# an unquoted here document, in config.status. If some macros were
27890# called several times there might be several #defines for the same
27891# symbol, which is useless. But do not sort them, since the last
27892# AC_DEFINE must be honored.
27893ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27894# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27895# NAME is the cpp macro being defined, VALUE is the value it is being given.
27896# PARAMS is the parameter list in the macro definition--in most cases, it's
27897# just an empty string.
27898ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27899ac_dB='\\)[ (].*,\\1define\\2'
27900ac_dC=' '
27901ac_dD=' ,'
27902
27903uniq confdefs.h |
27904 sed -n '
27905 t rset
27906 :rset
27907 s/^[ ]*#[ ]*define[ ][ ]*//
27908 t ok
27909 d
27910 :ok
27911 s/[\\&,]/\\&/g
27912 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27913 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27914 ' >>conftest.defines
27915
27916# Remove the space that was appended to ease matching.
27917# Then replace #undef with comments. This is necessary, for
27918# example, in the case of _POSIX_SOURCE, which is predefined and required
27919# on some systems where configure will not decide to define it.
27920# (The regexp can be short, since the line contains either #define or #undef.)
27921echo 's/ $//
27922s,^[ #]*u.*,/* & */,' >>conftest.defines
27923
27924# Break up conftest.defines:
27925ac_max_sed_lines=50
27926
27927# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27928# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27929# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27930# et cetera.
27931ac_in='$ac_file_inputs'
27932ac_out='"$tmp/out1"'
27933ac_nxt='"$tmp/out2"'
27934
27935while :
27936do
27937 # Write a here document:
27938 cat >>$CONFIG_STATUS <<_ACEOF
27939 # First, check the format of the line:
27940 cat >"\$tmp/defines.sed" <<\\CEOF
27941/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27942/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27943b
27944:def
27945_ACEOF
27946 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27947 echo 'CEOF
27948 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27949 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27950 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27951 grep . conftest.tail >/dev/null || break
27952 rm -f conftest.defines
27953 mv conftest.tail conftest.defines
27954done
27955rm -f conftest.defines conftest.tail
27956
27957echo "ac_result=$ac_in" >>$CONFIG_STATUS
27958cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027959 if test x"$ac_file" != x-; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027960 echo "/* $configure_input */" >"$tmp/config.h"
27961 cat "$ac_result" >>"$tmp/config.h"
27962 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27963 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27964echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027965 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027966 rm -f $ac_file
27967 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027968 fi
27969 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027970 echo "/* $configure_input */"
27971 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027972 fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027973 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027974 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027976
27977 esac
27978
27979done # for ac_tag
27980
Guido van Rossum627b2d71993-12-24 10:39:16 +000027981
Martin v. Löwis11437992002-04-12 09:54:03 +000027982{ (exit 0); exit 0; }
27983_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027984chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027985ac_clean_files=$ac_clean_files_save
27986
27987
27988# configure is writing to config.log, and then calls config.status.
27989# config.status does its own redirection, appending to config.log.
27990# Unfortunately, on DOS this fails, as config.log is still kept open
27991# by configure, so config.status won't be able to write to it; its
27992# output is simply discarded. So we exec the FD to /dev/null,
27993# effectively closing config.log, so it can be properly (re)opened and
27994# appended to by config.status. When coming back to configure, we
27995# need to make the FD available again.
27996if test "$no_create" != yes; then
27997 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027998 ac_config_status_args=
27999 test "$silent" = yes &&
28000 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028001 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028002 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028003 exec 5>>config.log
28004 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28005 # would make configure fail if this is the last instruction.
28006 $ac_cs_success || { (exit 1); exit 1; }
28007fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028008
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028009
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028010echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028011if test ! -f Modules/Setup
28012then
28013 cp $srcdir/Modules/Setup.dist Modules/Setup
28014fi
28015
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028016echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028017if test ! -f Modules/Setup.local
28018then
28019 echo "# Edit this file for local setup changes" >Modules/Setup.local
28020fi
28021
28022echo "creating Makefile"
28023$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28024 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028025 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028026mv config.c Modules