blob: a7dfabb120639ebaeb955b21038fa77b5480cbb0 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinsona614f042009-11-28 12:48:43 +00002# From configure.in Revision: 76552 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +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,
Ronald Oussoren74f29b42009-09-20 20:09:26 +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=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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.
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +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=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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.
Ronald Oussoren74f29b42009-09-20 20:09:26 +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" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +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'
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +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-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +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.
Ronald Oussoren74f29b42009-09-20 20:09:26 +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; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +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-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +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.
Ronald Oussoren74f29b42009-09-20 20:09:26 +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; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +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-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +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.
Ronald Oussoren74f29b42009-09-20 20:09:26 +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; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +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-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +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.
Ronald Oussoren74f29b42009-09-20 20:09:26 +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; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +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.
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +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'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +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" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +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.
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +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=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +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:
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001356 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001357 --with(out)-pymalloc disable/enable specialized mallocs
1358 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001359 --with-fpectl enable SIGFPE catching
1360 --with-libm=STRING math library
1361 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001362 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001363 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1364 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001365
1366Some influential environment variables:
1367 CC C compiler command
1368 CFLAGS C compiler flags
1369 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1370 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 LIBS libraries to pass to the linker, e.g. -l<library>
1372 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1373 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 CPP C preprocessor
1375
1376Use these variables to override the choices made by `configure' or to help
1377it to find libraries and programs with nonstandard names/locations.
1378
Georg Brandle2e15612009-05-20 18:25:10 +00001379Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001380_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001382fi
1383
1384if test "$ac_init_help" = "recursive"; then
1385 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001387 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 ac_builddir=.
1389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001390case "$ac_dir" in
1391.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1392*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001394 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001395 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396 case $ac_top_builddir_sub in
1397 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1399 esac ;;
1400esac
1401ac_abs_top_builddir=$ac_pwd
1402ac_abs_builddir=$ac_pwd$ac_dir_suffix
1403# for backward compatibility:
1404ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001407 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001409 ac_top_srcdir=$ac_top_builddir_sub
1410 ac_abs_top_srcdir=$ac_pwd ;;
1411 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 ac_top_srcdir=$srcdir
1414 ac_abs_top_srcdir=$srcdir ;;
1415 *) # Relative name.
1416 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1417 ac_top_srcdir=$ac_top_build_prefix$srcdir
1418 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001419esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001420ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001422 cd "$ac_dir" || { ac_status=$?; continue; }
1423 # Check for guested configure.
1424 if test -f "$ac_srcdir/configure.gnu"; then
1425 echo &&
1426 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1427 elif test -f "$ac_srcdir/configure"; then
1428 echo &&
1429 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001431 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001432 fi || ac_status=$?
1433 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 done
1435fi
1436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001437test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001438if $ac_init_version; then
1439 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001440python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001441generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014442002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001445This configure script is free software; the Free Software Foundation
1446gives unlimited permission to copy, distribute and modify it.
1447_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001448 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This file contains any messages produced by compilers while
1452running configure, to aid debugging if configure makes a mistake.
1453
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001454It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001455generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001456
1457 $ $0 $@
1458
1459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001461{
1462cat <<_ASUNAME
1463## --------- ##
1464## Platform. ##
1465## --------- ##
1466
1467hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1468uname -m = `(uname -m) 2>/dev/null || echo unknown`
1469uname -r = `(uname -r) 2>/dev/null || echo unknown`
1470uname -s = `(uname -s) 2>/dev/null || echo unknown`
1471uname -v = `(uname -v) 2>/dev/null || echo unknown`
1472
1473/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1474/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1475
1476/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1477/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1478/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001480/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1481/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1482/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1483
1484_ASUNAME
1485
1486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1487for as_dir in $PATH
1488do
1489 IFS=$as_save_IFS
1490 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001491 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001492done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001494
1495} >&5
1496
1497cat >&5 <<_ACEOF
1498
1499
1500## ----------- ##
1501## Core tests. ##
1502## ----------- ##
1503
1504_ACEOF
1505
1506
1507# Keep a trace of the command line.
1508# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001509# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001511# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001512ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001513ac_configure_args0=
1514ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001515ac_must_keep_next=false
1516for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001517do
Skip Montanaro6dead952003-09-25 14:50:04 +00001518 for ac_arg
1519 do
1520 case $ac_arg in
1521 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1522 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1523 | -silent | --silent | --silen | --sile | --sil)
1524 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001526 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001527 esac
1528 case $ac_pass in
1529 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1530 2)
1531 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1532 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001533 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001534 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001535 case $ac_arg in
1536 *=* | --config-cache | -C | -disable-* | --disable-* \
1537 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1538 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1539 | -with-* | --with-* | -without-* | --without-* | --x)
1540 case "$ac_configure_args0 " in
1541 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1542 esac
1543 ;;
1544 -* ) ac_must_keep_next=true ;;
1545 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001546 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001548 ;;
1549 esac
1550 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001551done
Skip Montanaro6dead952003-09-25 14:50:04 +00001552$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1553$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 +00001554
1555# When interrupted or exit'd, cleanup temporary files, and complete
1556# config.log. We remove comments because anyway the quotes in there
1557# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558# WARNING: Use '\'' to represent an apostrophe within the trap.
1559# 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 +00001560trap 'exit_status=$?
1561 # Save into config.log some information that might help in debugging.
1562 {
1563 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001564
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 cat <<\_ASBOX
1566## ---------------- ##
1567## Cache variables. ##
1568## ---------------- ##
1569_ASBOX
1570 echo
1571 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572(
1573 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1574 eval ac_val=\$$ac_var
1575 case $ac_val in #(
1576 *${as_nl}*)
1577 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001578 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1579echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 esac
1581 case $ac_var in #(
1582 _ | IFS | as_nl) ;; #(
1583 *) $as_unset $ac_var ;;
1584 esac ;;
1585 esac
1586 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1589 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 "s/'\''/'\''\\\\'\'''\''/g;
1592 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1593 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001594 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001596 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 esac |
1598 sort
1599)
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001601
1602 cat <<\_ASBOX
1603## ----------------- ##
1604## Output variables. ##
1605## ----------------- ##
1606_ASBOX
1607 echo
1608 for ac_var in $ac_subst_vars
1609 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610 eval ac_val=\$$ac_var
1611 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001612 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001614 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001615 done | sort
1616 echo
1617
1618 if test -n "$ac_subst_files"; then
1619 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620## ------------------- ##
1621## File substitutions. ##
1622## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001623_ASBOX
1624 echo
1625 for ac_var in $ac_subst_files
1626 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 eval ac_val=\$$ac_var
1628 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001629 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001631 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001632 done | sort
1633 echo
1634 fi
1635
Martin v. Löwis11437992002-04-12 09:54:03 +00001636 if test -s confdefs.h; then
1637 cat <<\_ASBOX
1638## ----------- ##
1639## confdefs.h. ##
1640## ----------- ##
1641_ASBOX
1642 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001644 echo
1645 fi
1646 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001647 echo "$as_me: caught signal $ac_signal"
1648 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001649 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 rm -f core *.core core.conftest.* &&
1651 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001654for ac_signal in 1 2 13 15; do
1655 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1656done
1657ac_signal=0
1658
1659# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001660rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001661
1662# Predefined preprocessor variables.
1663
1664cat >>confdefs.h <<_ACEOF
1665#define PACKAGE_NAME "$PACKAGE_NAME"
1666_ACEOF
1667
1668
1669cat >>confdefs.h <<_ACEOF
1670#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1671_ACEOF
1672
1673
1674cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_VERSION "$PACKAGE_VERSION"
1676_ACEOF
1677
1678
1679cat >>confdefs.h <<_ACEOF
1680#define PACKAGE_STRING "$PACKAGE_STRING"
1681_ACEOF
1682
1683
1684cat >>confdefs.h <<_ACEOF
1685#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1686_ACEOF
1687
1688
1689# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001690# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001691if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001692 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001693elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001694 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696 set x "$ac_default_prefix/share/config.site" \
1697 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001699shift
1700for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001703 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1704echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 . "$ac_site_file"
1707 fi
1708done
1709
1710if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 # Some versions of bash will fail to source /dev/null (special
1712 # files actually), so we avoid doing that.
1713 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001714 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1715echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001716 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001717 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1718 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001719 esac
1720 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001722 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1723echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 >$cache_file
1725fi
1726
1727# Check that the precious variables saved in the cache have kept the same
1728# value.
1729ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001730for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1732 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1734 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 case $ac_old_set,$ac_new_set in
1736 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001737 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1738echo "$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 +00001739 ac_cache_corrupted=: ;;
1740 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,);;
1745 *)
1746 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1748echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1749 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1750echo "$as_me: former value: $ac_old_val" >&2;}
1751 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1752echo "$as_me: current value: $ac_new_val" >&2;}
1753 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 fi;;
1755 esac
1756 # Pass precious variables to config.status.
1757 if test "$ac_new_set" = set; then
1758 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001759 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 *) ac_arg=$ac_var=$ac_new_val ;;
1761 esac
1762 case " $ac_configure_args " in
1763 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1764 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1765 esac
1766 fi
1767done
1768if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001769 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1770echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1771 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1772echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001773 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774fi
1775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
Guido van Rossum7f43da71994-08-01 12:15:30 +00001800ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001802ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1803ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1804ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805
Guido van Rossum627b2d71993-12-24 10:39:16 +00001806
Michael W. Hudson54241132001-12-07 15:38:26 +00001807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001808ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001809
1810
Martin v. Löwis11437992002-04-12 09:54:03 +00001811
Benjamin Petersond23f8222009-04-05 19:13:16 +00001812if test "$prefix" != "/"; then
1813 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1814fi
1815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
1818
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001819
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001820
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001821# We don't use PACKAGE_ variables, and they cause conflicts
1822# with other autoconf-based packages that include Python.h
1823grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1824rm confdefs.h
1825mv confdefs.h.new confdefs.h
1826
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001827
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001828VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001829
Martin v. Löwis1142de32002-03-29 16:28:31 +00001830
1831SOVERSION=1.0
1832
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001833# The later defininition of _XOPEN_SOURCE disables certain features
1834# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define _GNU_SOURCE 1
1838_ACEOF
1839
1840
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1843# them.
1844
1845cat >>confdefs.h <<\_ACEOF
1846#define _NETBSD_SOURCE 1
1847_ACEOF
1848
1849
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001850# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1851# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1852# them.
1853
1854cat >>confdefs.h <<\_ACEOF
1855#define __BSD_VISIBLE 1
1856_ACEOF
1857
1858
Martin v. Löwisd6320502004-08-12 13:45:08 +00001859# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1860# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define _BSD_TYPES 1
1864_ACEOF
1865
1866
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001867# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1868# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1869# them.
1870
1871cat >>confdefs.h <<\_ACEOF
1872#define _DARWIN_C_SOURCE 1
1873_ACEOF
1874
1875
1876
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001877define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001878
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001879# Arguments passed to configure.
1880
1881CONFIG_ARGS="$ac_configure_args"
1882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001883# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001884if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001885 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001886 case $enableval in
1887 yes)
1888 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1889 ;;
1890 esac
1891 case $enableval in
1892 no)
1893 UNIVERSALSDK=
1894 enable_universalsdk=
1895 ;;
1896 *)
1897 UNIVERSALSDK=$enableval
1898 ;;
1899 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001900
Thomas Wouters477c8d52006-05-27 19:21:47 +00001901else
1902
1903 UNIVERSALSDK=
1904 enable_universalsdk=
1905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001906fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001907
1908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001909
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001910
1911
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001912UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001913{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1914echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001915
1916# Check whether --with-universal-archs was given.
1917if test "${with_universal_archs+set}" = set; then
1918 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001919 { echo "$as_me:$LINENO: result: $withval" >&5
1920echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001921 UNIVERSAL_ARCHS="$withval"
1922
1923else
1924
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001925 { echo "$as_me:$LINENO: result: 32-bit" >&5
1926echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001927
1928fi
1929
1930
1931
1932
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001933
1934# Check whether --with-framework-name was given.
1935if test "${with_framework_name+set}" = set; then
1936 withval=$with_framework_name;
1937 PYTHONFRAMEWORK=${withval}
1938 PYTHONFRAMEWORKDIR=${withval}.framework
1939 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1940
1941else
1942
1943 PYTHONFRAMEWORK=Python
1944 PYTHONFRAMEWORKDIR=Python.framework
1945 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1946
1947fi
1948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001949# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001950if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001951 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001952 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001953 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001954 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001955 esac
1956 case $enableval in
1957 no)
1958 PYTHONFRAMEWORK=
1959 PYTHONFRAMEWORKDIR=no-framework
1960 PYTHONFRAMEWORKPREFIX=
1961 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001962 FRAMEWORKINSTALLFIRST=
1963 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001964 FRAMEWORKALTINSTALLFIRST=
1965 FRAMEWORKALTINSTALLLAST=
1966 if test "x${prefix}" = "xNONE"; then
1967 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1968 else
1969 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1970 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001971 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001972 ;;
1973 *)
1974 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001975 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001976 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001977 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001978 if test "$UNIVERSAL_ARCHS" = "all"
1979 then
1980 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001981 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001982 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001983 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001984 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1985 fi
1986
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001987 if test "x${prefix}" = "xNONE" ; then
1988 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1989 else
1990 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1991 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001992 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001993
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001994 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001995 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001996 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001998 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001999
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002000 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2001
2002 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2003
Jack Jansene578a632001-08-15 01:27:14 +00002004 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002005
Guido van Rossum563e7081996-09-10 18:20:48 +00002006else
Martin v. Löwis11437992002-04-12 09:54:03 +00002007
Jack Jansene578a632001-08-15 01:27:14 +00002008 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002009 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002010 PYTHONFRAMEWORKPREFIX=
2011 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002012 FRAMEWORKINSTALLFIRST=
2013 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002014 FRAMEWORKALTINSTALLFIRST=
2015 FRAMEWORKALTINSTALLLAST=
2016 if test "x${prefix}" = "xNONE" ; then
2017 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2018 else
2019 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2020 fi
Jack Jansene578a632001-08-15 01:27:14 +00002021 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002022
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002023 if test "$UNIVERSAL_ARCHS" = "all"
2024 then
2025 FRAMEWORKINSTALLLAST=update4wayuniversal
2026 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2027 fi
2028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002029fi
2030
Thomas Wouters477c8d52006-05-27 19:21:47 +00002031
2032
Michael W. Hudson54241132001-12-07 15:38:26 +00002033
2034
2035
2036
Jack Jansene578a632001-08-15 01:27:14 +00002037
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002038
2039
2040
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002041
Jack Jansene578a632001-08-15 01:27:14 +00002042##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002043## AC_HELP_STRING(--with-dyld,
2044## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002045##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002046# Set name for machine-dependent library files
2047
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002048{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2049echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050if test -z "$MACHDEP"
2051then
Guido van Rossum563e7081996-09-10 18:20:48 +00002052 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002053 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002054 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002055 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002056 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002057 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002058 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002059 ac_md_system=`echo $ac_sys_system |
2060 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2061 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002062 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002063 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002064
Guido van Rossum07397971997-04-29 21:49:50 +00002065 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002066 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002067 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002068 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002069 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070 esac
2071fi
Guido van Rossum91922671997-10-09 20:24:13 +00002072
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002073# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2074# disable features if it is defined, without any means to access these
2075# features as extensions. For these systems, we skip the definition of
2076# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2077# some feature, make sure there is no alternative way to access this
2078# feature. Also, when using wildcards, make sure you have verified the
2079# need for not defining _XOPEN_SOURCE on all systems matching the
2080# wildcard, and that the wildcard does not include future systems
2081# (which may remove their limitations).
2082case $ac_sys_system/$ac_sys_release in
2083 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2084 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002085 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002086 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002087 define_xopen_source=no
2088 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2089 # also defined. This can be overridden by defining _BSD_SOURCE
2090 # As this has a different meaning on Linux, only define it on OpenBSD
2091
2092cat >>confdefs.h <<\_ACEOF
2093#define _BSD_SOURCE 1
2094_ACEOF
2095
2096 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002097 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2098 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2099 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002100 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 +00002101 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002102 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2103 # of union __?sigval. Reported by Stuart Bishop.
2104 SunOS/5.6)
2105 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002106 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2107 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002108 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002109 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002110 define_xopen_source=no;;
2111 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002112 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002113 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002115 # On FreeBSD 4, the math functions C89 does not cover are never defined
2116 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2117 FreeBSD/4.*)
2118 define_xopen_source=no;;
2119 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2120 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2121 # identifies itself as Darwin/7.*
2122 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2123 # disables platform specific features beyond repair.
2124 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # has no effect, don't bother defining them
2126 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002127 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002128 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2129 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2130 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002131 AIX/4)
2132 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002133 AIX/5)
2134 if test `uname -r` -eq 1; then
2135 define_xopen_source=no
2136 fi
2137 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002138 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2139 # defining NI_NUMERICHOST.
2140 QNX/6.3.2)
2141 define_xopen_source=no
2142 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002143
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002144esac
2145
2146if test $define_xopen_source = yes
2147then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002148 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2149 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002150 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2151 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002152 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002153 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154
2155cat >>confdefs.h <<\_ACEOF
2156#define _XOPEN_SOURCE 500
2157_ACEOF
2158
2159 ;;
2160 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002161
2162cat >>confdefs.h <<\_ACEOF
2163#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002164_ACEOF
2165
Skip Montanarof0d5f792004-08-15 14:08:23 +00002166 ;;
2167 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002168
2169 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2170 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2171 # several APIs are not declared. Since this is also needed in some
2172 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002173 # except for Solaris 10, where it must not be defined,
2174 # as it implies XPG4.2
2175 case $ac_sys_system/$ac_sys_release in
2176 SunOS/5.10)
2177 ;;
2178 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002179
2180cat >>confdefs.h <<\_ACEOF
2181#define _XOPEN_SOURCE_EXTENDED 1
2182_ACEOF
2183
Martin v. Löwis7dece662005-11-26 11:38:24 +00002184 ;;
2185 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002186
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002187
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188cat >>confdefs.h <<\_ACEOF
2189#define _POSIX_C_SOURCE 200112L
2190_ACEOF
2191
2192
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002193fi
2194
Guido van Rossum91922671997-10-09 20:24:13 +00002195#
2196# SGI compilers allow the specification of the both the ABI and the
2197# ISA on the command line. Depending on the values of these switches,
2198# different and often incompatable code will be generated.
2199#
2200# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2201# thus supply support for various ABI/ISA combinations. The MACHDEP
2202# variable is also adjusted.
2203#
2204
2205if test ! -z "$SGI_ABI"
2206then
2207 CC="cc $SGI_ABI"
2208 LDFLAGS="$SGI_ABI $LDFLAGS"
2209 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2210fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002211{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2212echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002213
Jack Jansen6b08a402004-06-03 12:41:45 +00002214# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2215# it may influence the way we can build extensions, so distutils
2216# needs to check it
2217
Thomas Wouters477c8d52006-05-27 19:21:47 +00002218
Jack Jansen6b08a402004-06-03 12:41:45 +00002219CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002221
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002222{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2223echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002224ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002225{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2226echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002227
Guido van Rossum627b2d71993-12-24 10:39:16 +00002228# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002229
2230# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2231# for debug/optimization stuff. BASECFLAGS is for flags that are required
2232# just to get things to compile and link. Users are free to override OPT
2233# when running configure or make. The build should not break if they do.
2234# BASECFLAGS should generally not be messed with, however.
2235
2236# XXX shouldn't some/most/all of this code be merged with the stuff later
2237# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002238{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2239echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002241# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002243 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002244 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002245 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002246 without_gcc=yes;;
2247 yes) CC=gcc
2248 without_gcc=no;;
2249 *) CC=$withval
2250 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002251 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002252else
Martin v. Löwis11437992002-04-12 09:54:03 +00002253
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002254 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002255 AIX*) CC=cc_r
2256 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002257 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002258 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002259fi
2260
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002261{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2262echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002263
Guido van Rossum8b131c51995-03-09 14:10:13 +00002264# If the user switches compilers, we can't believe the cache
2265if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2266then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002267 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002268(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002269echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002270(it is also a good idea to do 'make clean' before compiling)" >&2;}
2271 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002272fi
2273
Martin v. Löwis11437992002-04-12 09:54:03 +00002274ac_ext=c
2275ac_cpp='$CPP $CPPFLAGS'
2276ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2277ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2278ac_compiler_gnu=$ac_cv_c_compiler_gnu
2279if test -n "$ac_tool_prefix"; then
2280 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2281set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002282{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002284if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002286else
2287 if test -n "$CC"; then
2288 ac_cv_prog_CC="$CC" # Let the user override the test.
2289else
Martin v. Löwis11437992002-04-12 09:54:03 +00002290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2291for as_dir in $PATH
2292do
2293 IFS=$as_save_IFS
2294 test -z "$as_dir" && as_dir=.
2295 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002296 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 +00002297 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002298 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002299 break 2
2300 fi
2301done
2302done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002303IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002304
Jack Jansendd19cf82001-12-06 22:36:17 +00002305fi
2306fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002307CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002308if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002309 { echo "$as_me:$LINENO: result: $CC" >&5
2310echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002311else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002312 { echo "$as_me:$LINENO: result: no" >&5
2313echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002314fi
2315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002316
Martin v. Löwis11437992002-04-12 09:54:03 +00002317fi
2318if test -z "$ac_cv_prog_CC"; then
2319 ac_ct_CC=$CC
2320 # Extract the first word of "gcc", so it can be a program name with args.
2321set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002322{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002324if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002325 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002326else
2327 if test -n "$ac_ct_CC"; then
2328 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2329else
2330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2331for as_dir in $PATH
2332do
2333 IFS=$as_save_IFS
2334 test -z "$as_dir" && as_dir=.
2335 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336 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 +00002337 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002339 break 2
2340 fi
2341done
2342done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345fi
2346fi
2347ac_ct_CC=$ac_cv_prog_ac_ct_CC
2348if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002349 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2350echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002352 { echo "$as_me:$LINENO: result: no" >&5
2353echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002354fi
2355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356 if test "x$ac_ct_CC" = x; then
2357 CC=""
2358 else
2359 case $cross_compiling:$ac_tool_warned in
2360yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002361{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2362whose name does not start with the host triplet. If you think this
2363configuration is useful to you, please write to autoconf@gnu.org." >&5
2364echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2365whose name does not start with the host triplet. If you think this
2366configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367ac_tool_warned=yes ;;
2368esac
2369 CC=$ac_ct_CC
2370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002371else
2372 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002373fi
2374
Jack Jansendd19cf82001-12-06 22:36:17 +00002375if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376 if test -n "$ac_tool_prefix"; then
2377 # 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 +00002378set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002379{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002381if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002382 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002383else
2384 if test -n "$CC"; then
2385 ac_cv_prog_CC="$CC" # Let the user override the test.
2386else
Martin v. Löwis11437992002-04-12 09:54:03 +00002387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2388for as_dir in $PATH
2389do
2390 IFS=$as_save_IFS
2391 test -z "$as_dir" && as_dir=.
2392 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393 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 +00002394 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 break 2
2397 fi
2398done
2399done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002400IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002401
2402fi
2403fi
2404CC=$ac_cv_prog_CC
2405if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002406 { echo "$as_me:$LINENO: result: $CC" >&5
2407echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002408else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002409 { echo "$as_me:$LINENO: result: no" >&5
2410echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002411fi
2412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413
Martin v. Löwis11437992002-04-12 09:54:03 +00002414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002415fi
2416if test -z "$CC"; then
2417 # Extract the first word of "cc", so it can be a program name with args.
2418set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002421if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002422 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002423else
2424 if test -n "$CC"; then
2425 ac_cv_prog_CC="$CC" # Let the user override the test.
2426else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002427 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429for as_dir in $PATH
2430do
2431 IFS=$as_save_IFS
2432 test -z "$as_dir" && as_dir=.
2433 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434 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 +00002435 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2436 ac_prog_rejected=yes
2437 continue
2438 fi
2439 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002440 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 break 2
2442 fi
2443done
2444done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002446
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002447if test $ac_prog_rejected = yes; then
2448 # We found a bogon in the path, so make sure we never use it.
2449 set dummy $ac_cv_prog_CC
2450 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002451 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002452 # We chose a different compiler from the bogus one.
2453 # However, it has the same basename, so the bogon will be chosen
2454 # first if we set CC to just the basename; use the full file name.
2455 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002457 fi
2458fi
2459fi
2460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002461CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002463 { echo "$as_me:$LINENO: result: $CC" >&5
2464echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002466 { echo "$as_me:$LINENO: result: no" >&5
2467echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002468fi
2469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470
Martin v. Löwis11437992002-04-12 09:54:03 +00002471fi
2472if test -z "$CC"; then
2473 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 do
2476 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2477set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002481 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002482else
2483 if test -n "$CC"; then
2484 ac_cv_prog_CC="$CC" # Let the user override the test.
2485else
Martin v. Löwis11437992002-04-12 09:54:03 +00002486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2487for as_dir in $PATH
2488do
2489 IFS=$as_save_IFS
2490 test -z "$as_dir" && as_dir=.
2491 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 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 +00002493 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002497done
2498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501fi
2502fi
2503CC=$ac_cv_prog_CC
2504if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002505 { echo "$as_me:$LINENO: result: $CC" >&5
2506echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002510fi
2511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 test -n "$CC" && break
2514 done
2515fi
2516if test -z "$CC"; then
2517 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002519do
2520 # Extract the first word of "$ac_prog", so it can be a program name with args.
2521set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002522{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2523echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002524if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002526else
2527 if test -n "$ac_ct_CC"; then
2528 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2529else
2530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2531for as_dir in $PATH
2532do
2533 IFS=$as_save_IFS
2534 test -z "$as_dir" && as_dir=.
2535 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 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 +00002537 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002538 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 break 2
2540 fi
2541done
2542done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545fi
2546fi
2547ac_ct_CC=$ac_cv_prog_ac_ct_CC
2548if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002549 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2550echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002551else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002552 { echo "$as_me:$LINENO: result: no" >&5
2553echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002554fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 test -n "$ac_ct_CC" && break
2558done
Michael W. Hudson54241132001-12-07 15:38:26 +00002559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 if test "x$ac_ct_CC" = x; then
2561 CC=""
2562 else
2563 case $cross_compiling:$ac_tool_warned in
2564yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002565{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2566whose name does not start with the host triplet. If you think this
2567configuration is useful to you, please write to autoconf@gnu.org." >&5
2568echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2569whose name does not start with the host triplet. If you think this
2570configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571ac_tool_warned=yes ;;
2572esac
2573 CC=$ac_ct_CC
2574 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002575fi
2576
2577fi
2578
2579
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002580test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002581See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002582echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002583See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002584 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002585
2586# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002587echo "$as_me:$LINENO: checking for C compiler version" >&5
2588ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589{ (ac_try="$ac_compiler --version >&5"
2590case "(($ac_try" in
2591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2592 *) ac_try_echo=$ac_try;;
2593esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599{ (ac_try="$ac_compiler -v >&5"
2600case "(($ac_try" in
2601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2602 *) ac_try_echo=$ac_try;;
2603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609{ (ac_try="$ac_compiler -V >&5"
2610case "(($ac_try" in
2611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2612 *) ac_try_echo=$ac_try;;
2613esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 (exit $ac_status); }
2619
2620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002621/* confdefs.h. */
2622_ACEOF
2623cat confdefs.h >>conftest.$ac_ext
2624cat >>conftest.$ac_ext <<_ACEOF
2625/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627int
2628main ()
2629{
2630
2631 ;
2632 return 0;
2633}
2634_ACEOF
2635ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002636ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002637# Try to create an executable without -o first, disregard a.out.
2638# It will help us diagnose broken compilers, and finding out an intuition
2639# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002640{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2641echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2642ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2643#
2644# List of possible output files, starting from the most likely.
2645# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2646# only as a last resort. b.out is created by i960 compilers.
2647ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2648#
2649# The IRIX 6 linker writes into existing files which may not be
2650# executable, retaining their permissions. Remove them first so a
2651# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652ac_rmfiles=
2653for ac_file in $ac_files
2654do
2655 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002656 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2658 esac
2659done
2660rm -f $ac_rmfiles
2661
2662if { (ac_try="$ac_link_default"
2663case "(($ac_try" in
2664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2665 *) ac_try_echo=$ac_try;;
2666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2673# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2674# in a Makefile. We should not override ac_cv_exeext if it was cached,
2675# so that the user can short-circuit this test for compilers unknown to
2676# Autoconf.
2677for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002678do
2679 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002681 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002682 ;;
2683 [ab].out )
2684 # We found the default executable, but exeext='' is most
2685 # certainly right.
2686 break;;
2687 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2689 then :; else
2690 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2691 fi
2692 # We set ac_cv_exeext here because the later test for it is not
2693 # safe: cross compilers may not add the suffix if given an `-o'
2694 # argument, so we may need to know it at that point already.
2695 # Even if this section looks crufty: it has the advantage of
2696 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002697 break;;
2698 * )
2699 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 esac
2701done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002702test "$ac_cv_exeext" = no && ac_cv_exeext=
2703
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002704else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705 ac_file=''
2706fi
2707
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002708{ echo "$as_me:$LINENO: result: $ac_file" >&5
2709echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002710if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002712sed 's/^/| /' conftest.$ac_ext >&5
2713
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002714{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002715See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002716echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002717See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002718 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002719fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002720
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002721ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002723# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002724# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002725{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2726echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002727# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2728# If not cross compiling, check that we can run a simple program.
2729if test "$cross_compiling" != yes; then
2730 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002731 { (case "(($ac_try" in
2732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2733 *) ac_try_echo=$ac_try;;
2734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 (exit $ac_status); }; }; then
2740 cross_compiling=no
2741 else
2742 if test "$cross_compiling" = maybe; then
2743 cross_compiling=yes
2744 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002745 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002746If you meant to cross compile, use \`--host'.
2747See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002748echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002749If you meant to cross compile, use \`--host'.
2750See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002751 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 fi
2753 fi
2754fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002755{ echo "$as_me:$LINENO: result: yes" >&5
2756echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002757
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002758rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002759ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002760# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002761# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002762{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2763echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2764{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2765echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002766
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002767{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2768echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769if { (ac_try="$ac_link"
2770case "(($ac_try" in
2771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772 *) ac_try_echo=$ac_try;;
2773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002779 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2780# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2781# work properly (i.e., refer to `conftest.exe'), while it won't with
2782# `rm'.
2783for ac_file in conftest.exe conftest conftest.*; do
2784 test -f "$ac_file" || continue
2785 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002786 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002787 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2788 break;;
2789 * ) break;;
2790 esac
2791done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002792else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002793 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002794See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002795echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002796See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002797 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002798fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002799
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002800rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002801{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2802echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002803
2804rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002805EXEEXT=$ac_cv_exeext
2806ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002807{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2808echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002809if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002810 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002811else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002812 cat >conftest.$ac_ext <<_ACEOF
2813/* confdefs.h. */
2814_ACEOF
2815cat confdefs.h >>conftest.$ac_ext
2816cat >>conftest.$ac_ext <<_ACEOF
2817/* end confdefs.h. */
2818
2819int
2820main ()
2821{
2822
2823 ;
2824 return 0;
2825}
2826_ACEOF
2827rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828if { (ac_try="$ac_compile"
2829case "(($ac_try" in
2830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831 *) ac_try_echo=$ac_try;;
2832esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002834 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838 for ac_file in conftest.o conftest.obj conftest.*; do
2839 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002841 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2843 break;;
2844 esac
2845done
2846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002848sed 's/^/| /' conftest.$ac_ext >&5
2849
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002850{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002851See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002852echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002854 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855fi
2856
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002857rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002858fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002859{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2860echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002861OBJEXT=$ac_cv_objext
2862ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002863{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2864echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002865if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002866 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002867else
2868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002869/* confdefs.h. */
2870_ACEOF
2871cat confdefs.h >>conftest.$ac_ext
2872cat >>conftest.$ac_ext <<_ACEOF
2873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002874
Martin v. Löwis11437992002-04-12 09:54:03 +00002875int
2876main ()
2877{
2878#ifndef __GNUC__
2879 choke me
2880#endif
2881
2882 ;
2883 return 0;
2884}
2885_ACEOF
2886rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887if { (ac_try="$ac_compile"
2888case "(($ac_try" in
2889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2890 *) ac_try_echo=$ac_try;;
2891esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002895 grep -v '^ *+' conftest.er1 >conftest.err
2896 rm -f conftest.er1
2897 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002899 (exit $ac_status); } && {
2900 test -z "$ac_c_werror_flag" ||
2901 test ! -s conftest.err
2902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 ac_compiler_gnu=yes
2904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002906sed 's/^/| /' conftest.$ac_ext >&5
2907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910
2911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002912ac_cv_c_compiler_gnu=$ac_compiler_gnu
2913
2914fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002915{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2916echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2917GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002918ac_test_CFLAGS=${CFLAGS+set}
2919ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002920{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2921echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002922if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002924else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002925 ac_save_c_werror_flag=$ac_c_werror_flag
2926 ac_c_werror_flag=yes
2927 ac_cv_prog_cc_g=no
2928 CFLAGS="-g"
2929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002930/* confdefs.h. */
2931_ACEOF
2932cat confdefs.h >>conftest.$ac_ext
2933cat >>conftest.$ac_ext <<_ACEOF
2934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002935
Martin v. Löwis11437992002-04-12 09:54:03 +00002936int
2937main ()
2938{
2939
2940 ;
2941 return 0;
2942}
2943_ACEOF
2944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002945if { (ac_try="$ac_compile"
2946case "(($ac_try" in
2947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2948 *) ac_try_echo=$ac_try;;
2949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002953 grep -v '^ *+' conftest.er1 >conftest.err
2954 rm -f conftest.er1
2955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002957 (exit $ac_status); } && {
2958 test -z "$ac_c_werror_flag" ||
2959 test ! -s conftest.err
2960 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002961 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002962else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002964sed 's/^/| /' conftest.$ac_ext >&5
2965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002966 CFLAGS=""
2967 cat >conftest.$ac_ext <<_ACEOF
2968/* confdefs.h. */
2969_ACEOF
2970cat confdefs.h >>conftest.$ac_ext
2971cat >>conftest.$ac_ext <<_ACEOF
2972/* end confdefs.h. */
2973
2974int
2975main ()
2976{
2977
2978 ;
2979 return 0;
2980}
2981_ACEOF
2982rm -f conftest.$ac_objext
2983if { (ac_try="$ac_compile"
2984case "(($ac_try" in
2985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2986 *) ac_try_echo=$ac_try;;
2987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 (eval "$ac_compile") 2>conftest.er1
2990 ac_status=$?
2991 grep -v '^ *+' conftest.er1 >conftest.err
2992 rm -f conftest.er1
2993 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002995 (exit $ac_status); } && {
2996 test -z "$ac_c_werror_flag" ||
2997 test ! -s conftest.err
2998 } && test -s conftest.$ac_objext; then
2999 :
3000else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003001 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002sed 's/^/| /' conftest.$ac_ext >&5
3003
3004 ac_c_werror_flag=$ac_save_c_werror_flag
3005 CFLAGS="-g"
3006 cat >conftest.$ac_ext <<_ACEOF
3007/* confdefs.h. */
3008_ACEOF
3009cat confdefs.h >>conftest.$ac_ext
3010cat >>conftest.$ac_ext <<_ACEOF
3011/* end confdefs.h. */
3012
3013int
3014main ()
3015{
3016
3017 ;
3018 return 0;
3019}
3020_ACEOF
3021rm -f conftest.$ac_objext
3022if { (ac_try="$ac_compile"
3023case "(($ac_try" in
3024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3025 *) ac_try_echo=$ac_try;;
3026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 (eval "$ac_compile") 2>conftest.er1
3029 ac_status=$?
3030 grep -v '^ *+' conftest.er1 >conftest.err
3031 rm -f conftest.er1
3032 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034 (exit $ac_status); } && {
3035 test -z "$ac_c_werror_flag" ||
3036 test ! -s conftest.err
3037 } && test -s conftest.$ac_objext; then
3038 ac_cv_prog_cc_g=yes
3039else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003040 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041sed 's/^/| /' conftest.$ac_ext >&5
3042
3043
Guido van Rossum627b2d71993-12-24 10:39:16 +00003044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045
3046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048
3049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3050fi
3051
3052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3053 ac_c_werror_flag=$ac_save_c_werror_flag
3054fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003055{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3056echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003057if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003058 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059elif test $ac_cv_prog_cc_g = yes; then
3060 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003061 CFLAGS="-g -O2"
3062 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003063 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064 fi
3065else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003066 if test "$GCC" = yes; then
3067 CFLAGS="-O2"
3068 else
3069 CFLAGS=
3070 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003071fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003072{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3073echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003075 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003076else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003077 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003078ac_save_CC=$CC
3079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003080/* confdefs.h. */
3081_ACEOF
3082cat confdefs.h >>conftest.$ac_ext
3083cat >>conftest.$ac_ext <<_ACEOF
3084/* end confdefs.h. */
3085#include <stdarg.h>
3086#include <stdio.h>
3087#include <sys/types.h>
3088#include <sys/stat.h>
3089/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3090struct buf { int x; };
3091FILE * (*rcsopen) (struct buf *, struct stat *, int);
3092static char *e (p, i)
3093 char **p;
3094 int i;
3095{
3096 return p[i];
3097}
3098static char *f (char * (*g) (char **, int), char **p, ...)
3099{
3100 char *s;
3101 va_list v;
3102 va_start (v,p);
3103 s = g (p, va_arg (v,int));
3104 va_end (v);
3105 return s;
3106}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003107
3108/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3109 function prototypes and stuff, but not '\xHH' hex character constants.
3110 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003112 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3113 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003115int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3118 inside strings and character constants. */
3119#define FOO(x) 'x'
3120int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3121
Skip Montanaro6dead952003-09-25 14:50:04 +00003122int test (int i, double x);
3123struct s1 {int (*f) (int a);};
3124struct s2 {int (*f) (double a);};
3125int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3126int argc;
3127char **argv;
3128int
3129main ()
3130{
3131return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3132 ;
3133 return 0;
3134}
3135_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003136for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3137 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003138do
3139 CC="$ac_save_CC $ac_arg"
3140 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141if { (ac_try="$ac_compile"
3142case "(($ac_try" in
3143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3144 *) ac_try_echo=$ac_try;;
3145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003149 grep -v '^ *+' conftest.er1 >conftest.err
3150 rm -f conftest.er1
3151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153 (exit $ac_status); } && {
3154 test -z "$ac_c_werror_flag" ||
3155 test ! -s conftest.err
3156 } && test -s conftest.$ac_objext; then
3157 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003160sed 's/^/| /' conftest.$ac_ext >&5
3161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162
Skip Montanaro6dead952003-09-25 14:50:04 +00003163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164
3165rm -f core conftest.err conftest.$ac_objext
3166 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003167done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003169CC=$ac_save_CC
3170
3171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172# AC_CACHE_VAL
3173case "x$ac_cv_prog_cc_c89" in
3174 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003175 { echo "$as_me:$LINENO: result: none needed" >&5
3176echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003178 { echo "$as_me:$LINENO: result: unsupported" >&5
3179echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003180 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003181 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003182 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3183echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003184esac
3185
Skip Montanaro6dead952003-09-25 14:50:04 +00003186
Martin v. Löwis11437992002-04-12 09:54:03 +00003187ac_ext=c
3188ac_cpp='$CPP $CPPFLAGS'
3189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3191ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003192
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003193
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003194
3195
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003196{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3197echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003200if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003202
3203 case $withval in
3204 no) with_cxx_main=no
3205 MAINCC='$(CC)';;
3206 yes) with_cxx_main=yes
3207 MAINCC='$(CXX)';;
3208 *) with_cxx_main=yes
3209 MAINCC=$withval
3210 if test -z "$CXX"
3211 then
3212 CXX=$withval
3213 fi;;
3214 esac
3215else
3216
3217 with_cxx_main=no
3218 MAINCC='$(CC)'
3219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220fi
3221
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003222{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3223echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003224
3225preset_cxx="$CXX"
3226if test -z "$CXX"
3227then
3228 case "$CC" in
3229 gcc) # Extract the first word of "g++", so it can be a program name with args.
3230set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003231{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3232echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003233if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003234 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235else
3236 case $CXX in
3237 [\\/]* | ?:[\\/]*)
3238 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3239 ;;
3240 *)
3241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3242for as_dir in notfound
3243do
3244 IFS=$as_save_IFS
3245 test -z "$as_dir" && as_dir=.
3246 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003247 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 +00003248 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003249 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003250 break 2
3251 fi
3252done
3253done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003255
3256 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3257 ;;
3258esac
3259fi
3260CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003261if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003262 { echo "$as_me:$LINENO: result: $CXX" >&5
3263echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003264else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003265 { echo "$as_me:$LINENO: result: no" >&5
3266echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003268
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003269 ;;
3270 cc) # Extract the first word of "c++", so it can be a program name with args.
3271set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003272{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3273echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003274if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003275 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276else
3277 case $CXX in
3278 [\\/]* | ?:[\\/]*)
3279 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3280 ;;
3281 *)
3282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283for as_dir in notfound
3284do
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
3287 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003288 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 +00003289 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003290 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003291 break 2
3292 fi
3293done
3294done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003296
3297 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3298 ;;
3299esac
3300fi
3301CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003302if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003303 { echo "$as_me:$LINENO: result: $CXX" >&5
3304echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003306 { echo "$as_me:$LINENO: result: no" >&5
3307echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003309
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003310 ;;
3311 esac
3312 if test "$CXX" = "notfound"
3313 then
3314 CXX=""
3315 fi
3316fi
3317if test -z "$CXX"
3318then
3319 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3320do
3321 # Extract the first word of "$ac_prog", so it can be a program name with args.
3322set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003325if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003326 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327else
3328 if test -n "$CXX"; then
3329 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3330else
3331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3332for as_dir in $PATH
3333do
3334 IFS=$as_save_IFS
3335 test -z "$as_dir" && as_dir=.
3336 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003337 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 +00003338 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003340 break 2
3341 fi
3342done
3343done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003344IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003345
3346fi
3347fi
3348CXX=$ac_cv_prog_CXX
3349if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003350 { echo "$as_me:$LINENO: result: $CXX" >&5
3351echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003353 { echo "$as_me:$LINENO: result: no" >&5
3354echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003355fi
3356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003357
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358 test -n "$CXX" && break
3359done
3360test -n "$CXX" || CXX="notfound"
3361
3362 if test "$CXX" = "notfound"
3363 then
3364 CXX=""
3365 fi
3366fi
3367if test "$preset_cxx" != "$CXX"
3368then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003369 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003370
3371 By default, distutils will build C++ extension modules with \"$CXX\".
3372 If this is not intended, then set CXX on the configure command line.
3373 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003374echo "$as_me: 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 " >&2;}
3379fi
3380
3381
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003382# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003383
3384ac_ext=c
3385ac_cpp='$CPP $CPPFLAGS'
3386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3388ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003389{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3390echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003391# On Suns, sometimes $CPP names a directory.
3392if test -n "$CPP" && test -d "$CPP"; then
3393 CPP=
3394fi
3395if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003396 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003397 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003398else
Martin v. Löwis11437992002-04-12 09:54:03 +00003399 # Double quotes because CPP needs to be expanded
3400 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3401 do
3402 ac_preproc_ok=false
3403for ac_c_preproc_warn_flag in '' yes
3404do
3405 # Use a header file that comes with gcc, so configuring glibc
3406 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003407 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3408 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003409 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 # not just through cpp. "Syntax error" is here to catch this case.
3411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003412/* confdefs.h. */
3413_ACEOF
3414cat confdefs.h >>conftest.$ac_ext
3415cat >>conftest.$ac_ext <<_ACEOF
3416/* end confdefs.h. */
3417#ifdef __STDC__
3418# include <limits.h>
3419#else
3420# include <assert.h>
3421#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003422 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003423_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003424if { (ac_try="$ac_cpp conftest.$ac_ext"
3425case "(($ac_try" in
3426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3427 *) ac_try_echo=$ac_try;;
3428esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003431 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003432 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 rm -f conftest.er1
3434 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003436 (exit $ac_status); } >/dev/null && {
3437 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3438 test ! -s conftest.err
3439 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003440 :
3441else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003443sed 's/^/| /' conftest.$ac_ext >&5
3444
Martin v. Löwis11437992002-04-12 09:54:03 +00003445 # Broken: fails on valid input.
3446continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003448
Martin v. Löwis11437992002-04-12 09:54:03 +00003449rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 # can be detected and how.
3453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003454/* confdefs.h. */
3455_ACEOF
3456cat confdefs.h >>conftest.$ac_ext
3457cat >>conftest.$ac_ext <<_ACEOF
3458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003459#include <ac_nonexistent.h>
3460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461if { (ac_try="$ac_cpp conftest.$ac_ext"
3462case "(($ac_try" in
3463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3464 *) ac_try_echo=$ac_try;;
3465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003469 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 rm -f conftest.er1
3471 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 (exit $ac_status); } >/dev/null && {
3474 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3475 test ! -s conftest.err
3476 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 # Broken: success on invalid input.
3478continue
3479else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003481sed 's/^/| /' conftest.$ac_ext >&5
3482
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 # Passes both tests.
3484ac_preproc_ok=:
3485break
3486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003487
Martin v. Löwis11437992002-04-12 09:54:03 +00003488rm -f conftest.err conftest.$ac_ext
3489
3490done
3491# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3492rm -f conftest.err conftest.$ac_ext
3493if $ac_preproc_ok; then
3494 break
3495fi
3496
3497 done
3498 ac_cv_prog_CPP=$CPP
3499
3500fi
3501 CPP=$ac_cv_prog_CPP
3502else
3503 ac_cv_prog_CPP=$CPP
3504fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003505{ echo "$as_me:$LINENO: result: $CPP" >&5
3506echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003507ac_preproc_ok=false
3508for ac_c_preproc_warn_flag in '' yes
3509do
3510 # Use a header file that comes with gcc, so configuring glibc
3511 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003512 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3513 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 # On the NeXT, cc -E runs the code through the compiler's parser,
3515 # not just through cpp. "Syntax error" is here to catch this case.
3516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003517/* confdefs.h. */
3518_ACEOF
3519cat confdefs.h >>conftest.$ac_ext
3520cat >>conftest.$ac_ext <<_ACEOF
3521/* end confdefs.h. */
3522#ifdef __STDC__
3523# include <limits.h>
3524#else
3525# include <assert.h>
3526#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003527 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529if { (ac_try="$ac_cpp conftest.$ac_ext"
3530case "(($ac_try" in
3531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3532 *) ac_try_echo=$ac_try;;
3533esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003537 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 rm -f conftest.er1
3539 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541 (exit $ac_status); } >/dev/null && {
3542 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3543 test ! -s conftest.err
3544 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 :
3546else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003548sed 's/^/| /' conftest.$ac_ext >&5
3549
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 # Broken: fails on valid input.
3551continue
3552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553
Martin v. Löwis11437992002-04-12 09:54:03 +00003554rm -f conftest.err conftest.$ac_ext
3555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 # can be detected and how.
3558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003559/* confdefs.h. */
3560_ACEOF
3561cat confdefs.h >>conftest.$ac_ext
3562cat >>conftest.$ac_ext <<_ACEOF
3563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003564#include <ac_nonexistent.h>
3565_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566if { (ac_try="$ac_cpp conftest.$ac_ext"
3567case "(($ac_try" in
3568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3569 *) ac_try_echo=$ac_try;;
3570esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 rm -f conftest.er1
3576 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578 (exit $ac_status); } >/dev/null && {
3579 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3580 test ! -s conftest.err
3581 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 # Broken: success on invalid input.
3583continue
3584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003586sed 's/^/| /' conftest.$ac_ext >&5
3587
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 # Passes both tests.
3589ac_preproc_ok=:
3590break
3591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592
Martin v. Löwis11437992002-04-12 09:54:03 +00003593rm -f conftest.err conftest.$ac_ext
3594
3595done
3596# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3597rm -f conftest.err conftest.$ac_ext
3598if $ac_preproc_ok; then
3599 :
3600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003601 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003602See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003603echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003604See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003605 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606fi
3607
3608ac_ext=c
3609ac_cpp='$CPP $CPPFLAGS'
3610ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3611ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3612ac_compiler_gnu=$ac_cv_c_compiler_gnu
3613
3614
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003615{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3616echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003618 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003620 # Extract the first word of "grep ggrep" to use in msg output
3621if test -z "$GREP"; then
3622set dummy grep ggrep; ac_prog_name=$2
3623if test "${ac_cv_path_GREP+set}" = set; then
3624 echo $ECHO_N "(cached) $ECHO_C" >&6
3625else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003627# Loop through the user's path and test for each of PROGNAME-LIST
3628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3630do
3631 IFS=$as_save_IFS
3632 test -z "$as_dir" && as_dir=.
3633 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
3635 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3636 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3637 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 # Check for GNU $ac_path_GREP
3639case `"$ac_path_GREP" --version 2>&1` in
3640*GNU*)
3641 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3642*)
3643 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003644 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645 while :
3646 do
3647 cat "conftest.in" "conftest.in" >"conftest.tmp"
3648 mv "conftest.tmp" "conftest.in"
3649 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003650 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3652 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3653 ac_count=`expr $ac_count + 1`
3654 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3655 # Best one so far, save it but keep looking for a better one
3656 ac_cv_path_GREP="$ac_path_GREP"
3657 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003658 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 # 10*(2^10) chars as input seems more than enough
3660 test $ac_count -gt 10 && break
3661 done
3662 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3663esac
3664
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003665
3666 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667 done
3668done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003669
3670done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003672
3673
3674fi
3675
3676GREP="$ac_cv_path_GREP"
3677if test -z "$GREP"; then
3678 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3679echo "$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 +00003680 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003681fi
3682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683else
3684 ac_cv_path_GREP=$GREP
3685fi
3686
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003689{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3690echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691 GREP="$ac_cv_path_GREP"
3692
3693
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003694{ echo "$as_me:$LINENO: checking for egrep" >&5
3695echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003697 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698else
3699 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3700 then ac_cv_path_EGREP="$GREP -E"
3701 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003702 # Extract the first word of "egrep" to use in msg output
3703if test -z "$EGREP"; then
3704set dummy egrep; ac_prog_name=$2
3705if test "${ac_cv_path_EGREP+set}" = set; then
3706 echo $ECHO_N "(cached) $ECHO_C" >&6
3707else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003709# Loop through the user's path and test for each of PROGNAME-LIST
3710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3712do
3713 IFS=$as_save_IFS
3714 test -z "$as_dir" && as_dir=.
3715 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003716 for ac_exec_ext in '' $ac_executable_extensions; do
3717 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3718 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3719 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720 # Check for GNU $ac_path_EGREP
3721case `"$ac_path_EGREP" --version 2>&1` in
3722*GNU*)
3723 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3724*)
3725 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003726 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 while :
3728 do
3729 cat "conftest.in" "conftest.in" >"conftest.tmp"
3730 mv "conftest.tmp" "conftest.in"
3731 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003732 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3734 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3735 ac_count=`expr $ac_count + 1`
3736 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3737 # Best one so far, save it but keep looking for a better one
3738 ac_cv_path_EGREP="$ac_path_EGREP"
3739 ac_path_EGREP_max=$ac_count
3740 fi
3741 # 10*(2^10) chars as input seems more than enough
3742 test $ac_count -gt 10 && break
3743 done
3744 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3745esac
3746
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003747
3748 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749 done
3750done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003751
3752done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003754
3755
3756fi
3757
3758EGREP="$ac_cv_path_EGREP"
3759if test -z "$EGREP"; then
3760 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3761echo "$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 +00003762 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003763fi
3764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765else
3766 ac_cv_path_EGREP=$EGREP
3767fi
3768
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 fi
3771fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003772{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3773echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003775
3776
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003777
3778{ echo "$as_me:$LINENO: checking for AIX" >&5
3779echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3780cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003781/* confdefs.h. */
3782_ACEOF
3783cat confdefs.h >>conftest.$ac_ext
3784cat >>conftest.$ac_ext <<_ACEOF
3785/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003786#ifdef _AIX
3787 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003788#endif
3789
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003790_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3792 $EGREP "yes" >/dev/null 2>&1; then
3793 { echo "$as_me:$LINENO: result: yes" >&5
3794echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003795cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003796#define _ALL_SOURCE 1
3797_ACEOF
3798
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003799else
3800 { echo "$as_me:$LINENO: result: no" >&5
3801echo "${ECHO_T}no" >&6; }
3802fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00003803rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003804
3805
3806
3807# Check for unsupported systems
3808case $ac_sys_system/$ac_sys_release in
3809atheos*|Linux*/1*)
3810 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3811 echo See README for details.
3812 exit 1;;
3813esac
3814
3815
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003816{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3817echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003818
3819# Check whether --with-suffix was given.
3820if test "${with_suffix+set}" = set; then
3821 withval=$with_suffix;
3822 case $withval in
3823 no) EXEEXT=;;
3824 yes) EXEEXT=.exe;;
3825 *) EXEEXT=$withval;;
3826 esac
3827fi
3828
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003829{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3830echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003831
3832# Test whether we're running on a non-case-sensitive system, in which
3833# case we give a warning if no ext is given
3834
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003835{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3836echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003837if test ! -d CaseSensitiveTestDir; then
3838mkdir CaseSensitiveTestDir
3839fi
3840
3841if test -d casesensitivetestdir
3842then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003843 { echo "$as_me:$LINENO: result: yes" >&5
3844echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003845 BUILDEXEEXT=.exe
3846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003847 { echo "$as_me:$LINENO: result: no" >&5
3848echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003849 BUILDEXEEXT=$EXEEXT
3850fi
3851rmdir CaseSensitiveTestDir
3852
3853case $MACHDEP in
3854bsdos*)
3855 case $CC in
3856 gcc) CC="$CC -D_HAVE_BSDI";;
3857 esac;;
3858esac
3859
3860case $ac_sys_system in
3861hp*|HP*)
3862 case $CC in
3863 cc|*/cc) CC="$CC -Ae";;
3864 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003865SunOS*)
3866 # Some functions have a prototype only with that define, e.g. confstr
3867
3868cat >>confdefs.h <<\_ACEOF
3869#define __EXTENSIONS__ 1
3870_ACEOF
3871
3872 ;;
3873esac
3874
3875
3876
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003877{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3878echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003879if test -z "$LIBRARY"
3880then
3881 LIBRARY='libpython$(VERSION).a'
3882fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003883{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3884echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003885
3886# LDLIBRARY is the name of the library to link against (as opposed to the
3887# name of the library into which to insert object files). BLDLIBRARY is also
3888# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3889# is blank as the main program is not linked directly against LDLIBRARY.
3890# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3891# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3892# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3893# DLLLIBRARY is the shared (i.e., DLL) library.
3894#
3895# RUNSHARED is used to run shared python without installed libraries
3896#
3897# INSTSONAME is the name of the shared library that will be use to install
3898# on the system - some systems like version suffix, others don't
3899
3900
3901
3902
3903
3904
3905LDLIBRARY="$LIBRARY"
3906BLDLIBRARY='$(LDLIBRARY)'
3907INSTSONAME='$(LDLIBRARY)'
3908DLLLIBRARY=''
3909LDLIBRARYDIR=''
3910RUNSHARED=''
3911
3912# LINKCC is the command that links the python executable -- default is $(CC).
3913# If CXX is set, and if it is needed to link a main function that was
3914# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3915# python might then depend on the C++ runtime
3916# This is altered for AIX in order to build the export list before
3917# linking.
3918
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003919{ echo "$as_me:$LINENO: checking LINKCC" >&5
3920echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003921if test -z "$LINKCC"
3922then
3923 LINKCC='$(PURIFY) $(MAINCC)'
3924 case $ac_sys_system in
3925 AIX*)
3926 exp_extra="\"\""
3927 if test $ac_sys_release -ge 5 -o \
3928 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3929 exp_extra="."
3930 fi
3931 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003932 QNX*)
3933 # qcc must be used because the other compilers do not
3934 # support -N.
3935 LINKCC=qcc;;
3936 esac
3937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003938{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3939echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003940
3941# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3942# make sure we default having it set to "no": this is used by
3943# distutils.unixccompiler to know if it should add --enable-new-dtags
3944# to linker command lines, and failing to detect GNU ld simply results
3945# in the same bahaviour as before.
3946
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003947{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3948echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003949ac_prog=ld
3950if test "$GCC" = yes; then
3951 ac_prog=`$CC -print-prog-name=ld`
3952fi
3953case `"$ac_prog" -V 2>&1 < /dev/null` in
3954 *GNU*)
3955 GNULD=yes;;
3956 *)
3957 GNULD=no;;
3958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003959{ echo "$as_me:$LINENO: result: $GNULD" >&5
3960echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003961
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003962{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3963echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003964# Check whether --enable-shared was given.
3965if test "${enable_shared+set}" = set; then
3966 enableval=$enable_shared;
3967fi
3968
3969
3970if test -z "$enable_shared"
3971then
3972 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003973 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003974 enable_shared="yes";;
3975 *)
3976 enable_shared="no";;
3977 esac
3978fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003979{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3980echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003981
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003982{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3983echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003984# Check whether --enable-profiling was given.
3985if test "${enable_profiling+set}" = set; then
3986 enableval=$enable_profiling; ac_save_cc="$CC"
3987 CC="$CC -pg"
3988 if test "$cross_compiling" = yes; then
3989 ac_enable_profiling="no"
3990else
3991 cat >conftest.$ac_ext <<_ACEOF
3992/* confdefs.h. */
3993_ACEOF
3994cat confdefs.h >>conftest.$ac_ext
3995cat >>conftest.$ac_ext <<_ACEOF
3996/* end confdefs.h. */
3997int main() { return 0; }
3998_ACEOF
3999rm -f conftest$ac_exeext
4000if { (ac_try="$ac_link"
4001case "(($ac_try" in
4002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003 *) ac_try_echo=$ac_try;;
4004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004006 (eval "$ac_link") 2>&5
4007 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4010 { (case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004015 (eval "$ac_try") 2>&5
4016 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004018 (exit $ac_status); }; }; then
4019 ac_enable_profiling="yes"
4020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004021 echo "$as_me: program exited with status $ac_status" >&5
4022echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004023sed 's/^/| /' conftest.$ac_ext >&5
4024
4025( exit $ac_status )
4026ac_enable_profiling="no"
4027fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4029fi
4030
4031
4032 CC="$ac_save_cc"
4033fi
4034
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004035{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4036echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004037
4038case "$ac_enable_profiling" in
4039 "yes")
4040 BASECFLAGS="-pg $BASECFLAGS"
4041 LDFLAGS="-pg $LDFLAGS"
4042 ;;
4043esac
4044
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004045{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4046echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004047
4048# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4049# library that we build, but we do not want to link against it (we
4050# will find it with a -framework option). For this reason there is an
4051# extra variable BLDLIBRARY against which Python and the extension
4052# modules are linked, BLDLIBRARY. This is normally the same as
4053# LDLIBRARY, but empty for MacOSX framework builds.
4054if test "$enable_framework"
4055then
4056 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4057 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4058 BLDLIBRARY=''
4059else
4060 BLDLIBRARY='$(LDLIBRARY)'
4061fi
4062
4063# Other platforms follow
4064if test $enable_shared = "yes"; then
4065
4066cat >>confdefs.h <<\_ACEOF
4067#define Py_ENABLE_SHARED 1
4068_ACEOF
4069
4070 case $ac_sys_system in
4071 CYGWIN*)
4072 LDLIBRARY='libpython$(VERSION).dll.a'
4073 DLLLIBRARY='libpython$(VERSION).dll'
4074 ;;
4075 SunOS*)
4076 LDLIBRARY='libpython$(VERSION).so'
4077 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4078 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4079 INSTSONAME="$LDLIBRARY".$SOVERSION
4080 ;;
4081 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4082 LDLIBRARY='libpython$(VERSION).so'
4083 BLDLIBRARY='-L. -lpython$(VERSION)'
4084 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4085 case $ac_sys_system in
4086 FreeBSD*)
4087 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4088 ;;
4089 esac
4090 INSTSONAME="$LDLIBRARY".$SOVERSION
4091 ;;
4092 hp*|HP*)
4093 case `uname -m` in
4094 ia64)
4095 LDLIBRARY='libpython$(VERSION).so'
4096 ;;
4097 *)
4098 LDLIBRARY='libpython$(VERSION).sl'
4099 ;;
4100 esac
4101 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4102 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4103 ;;
4104 OSF*)
4105 LDLIBRARY='libpython$(VERSION).so'
4106 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4107 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4108 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004109 Darwin*)
4110 LDLIBRARY='libpython$(VERSION).dylib'
4111 BLDLIBRARY='-L. -lpython$(VERSION)'
4112 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4113 ;;
4114
4115 esac
4116else # shared is disabled
4117 case $ac_sys_system in
4118 CYGWIN*)
4119 BLDLIBRARY='$(LIBRARY)'
4120 LDLIBRARY='libpython$(VERSION).dll.a'
4121 ;;
4122 esac
4123fi
4124
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004125{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4126echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004127
4128if test -n "$ac_tool_prefix"; then
4129 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4130set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004131{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4132echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004133if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004134 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004135else
4136 if test -n "$RANLIB"; then
4137 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4138else
4139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4140for as_dir in $PATH
4141do
4142 IFS=$as_save_IFS
4143 test -z "$as_dir" && as_dir=.
4144 for ac_exec_ext in '' $ac_executable_extensions; do
4145 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4146 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004147 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004148 break 2
4149 fi
4150done
4151done
4152IFS=$as_save_IFS
4153
4154fi
4155fi
4156RANLIB=$ac_cv_prog_RANLIB
4157if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004158 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4159echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004161 { echo "$as_me:$LINENO: result: no" >&5
4162echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004163fi
4164
4165
4166fi
4167if test -z "$ac_cv_prog_RANLIB"; then
4168 ac_ct_RANLIB=$RANLIB
4169 # Extract the first word of "ranlib", so it can be a program name with args.
4170set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004171{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4172echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004173if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004174 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004175else
4176 if test -n "$ac_ct_RANLIB"; then
4177 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4178else
4179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4180for as_dir in $PATH
4181do
4182 IFS=$as_save_IFS
4183 test -z "$as_dir" && as_dir=.
4184 for ac_exec_ext in '' $ac_executable_extensions; do
4185 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4186 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004187 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004188 break 2
4189 fi
4190done
4191done
4192IFS=$as_save_IFS
4193
4194fi
4195fi
4196ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4197if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004198 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4199echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004201 { echo "$as_me:$LINENO: result: no" >&5
4202echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004203fi
4204
4205 if test "x$ac_ct_RANLIB" = x; then
4206 RANLIB=":"
4207 else
4208 case $cross_compiling:$ac_tool_warned in
4209yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004210{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4211whose name does not start with the host triplet. If you think this
4212configuration is useful to you, please write to autoconf@gnu.org." >&5
4213echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4214whose name does not start with the host triplet. If you think this
4215configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004216ac_tool_warned=yes ;;
4217esac
4218 RANLIB=$ac_ct_RANLIB
4219 fi
4220else
4221 RANLIB="$ac_cv_prog_RANLIB"
4222fi
4223
4224
4225for ac_prog in ar aal
4226do
4227 # Extract the first word of "$ac_prog", so it can be a program name with args.
4228set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004229{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4230echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004231if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004232 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004233else
4234 if test -n "$AR"; then
4235 ac_cv_prog_AR="$AR" # Let the user override the test.
4236else
4237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4238for as_dir in $PATH
4239do
4240 IFS=$as_save_IFS
4241 test -z "$as_dir" && as_dir=.
4242 for ac_exec_ext in '' $ac_executable_extensions; do
4243 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4244 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004245 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004246 break 2
4247 fi
4248done
4249done
4250IFS=$as_save_IFS
4251
4252fi
4253fi
4254AR=$ac_cv_prog_AR
4255if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004256 { echo "$as_me:$LINENO: result: $AR" >&5
4257echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004259 { echo "$as_me:$LINENO: result: no" >&5
4260echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004261fi
4262
4263
4264 test -n "$AR" && break
4265done
4266test -n "$AR" || AR="ar"
4267
4268
4269# tweak ARFLAGS only if the user didn't set it on the command line
4270
4271if test -z "$ARFLAGS"
4272then
4273 ARFLAGS="rc"
4274fi
4275
4276
4277# Extract the first word of "svnversion", so it can be a program name with args.
4278set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004281if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004282 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004283else
4284 if test -n "$SVNVERSION"; then
4285 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4286else
4287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4288for as_dir in $PATH
4289do
4290 IFS=$as_save_IFS
4291 test -z "$as_dir" && as_dir=.
4292 for ac_exec_ext in '' $ac_executable_extensions; do
4293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4294 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004296 break 2
4297 fi
4298done
4299done
4300IFS=$as_save_IFS
4301
4302 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4303fi
4304fi
4305SVNVERSION=$ac_cv_prog_SVNVERSION
4306if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004307 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4308echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004310 { echo "$as_me:$LINENO: result: no" >&5
4311echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004312fi
4313
4314
4315if test $SVNVERSION = found
4316then
4317 SVNVERSION="svnversion \$(srcdir)"
4318else
4319 SVNVERSION="echo Unversioned directory"
4320fi
4321
4322case $MACHDEP in
4323bsdos*|hp*|HP*)
4324 # install -d does not work on BSDI or HP-UX
4325 if test -z "$INSTALL"
4326 then
4327 INSTALL="${srcdir}/install-sh -c"
4328 fi
4329esac
4330ac_aux_dir=
4331for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4332 if test -f "$ac_dir/install-sh"; then
4333 ac_aux_dir=$ac_dir
4334 ac_install_sh="$ac_aux_dir/install-sh -c"
4335 break
4336 elif test -f "$ac_dir/install.sh"; then
4337 ac_aux_dir=$ac_dir
4338 ac_install_sh="$ac_aux_dir/install.sh -c"
4339 break
4340 elif test -f "$ac_dir/shtool"; then
4341 ac_aux_dir=$ac_dir
4342 ac_install_sh="$ac_aux_dir/shtool install -c"
4343 break
4344 fi
4345done
4346if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004347 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4348echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004349 { (exit 1); exit 1; }; }
4350fi
4351
4352# These three variables are undocumented and unsupported,
4353# and are intended to be withdrawn in a future Autoconf release.
4354# They can cause serious problems if a builder's source tree is in a directory
4355# whose full name contains unusual characters.
4356ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4357ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4358ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4359
4360
4361# Find a good install program. We prefer a C program (faster),
4362# so one script is as good as another. But avoid the broken or
4363# incompatible versions:
4364# SysV /etc/install, /usr/sbin/install
4365# SunOS /usr/etc/install
4366# IRIX /sbin/install
4367# AIX /bin/install
4368# AmigaOS /C/install, which installs bootblocks on floppy discs
4369# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4370# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4371# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4372# OS/2's system install, which has a completely different semantic
4373# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004374{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4375echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004376if test -z "$INSTALL"; then
4377if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004378 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004379else
4380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4381for as_dir in $PATH
4382do
4383 IFS=$as_save_IFS
4384 test -z "$as_dir" && as_dir=.
4385 # Account for people who put trailing slashes in PATH elements.
4386case $as_dir/ in
4387 ./ | .// | /cC/* | \
4388 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4389 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4390 /usr/ucb/* ) ;;
4391 *)
4392 # OSF1 and SCO ODT 3.0 have their own names for install.
4393 # Don't use installbsd from OSF since it installs stuff as root
4394 # by default.
4395 for ac_prog in ginstall scoinst install; do
4396 for ac_exec_ext in '' $ac_executable_extensions; do
4397 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4398 if test $ac_prog = install &&
4399 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4400 # AIX install. It has an incompatible calling convention.
4401 :
4402 elif test $ac_prog = install &&
4403 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4404 # program-specific install script used by HP pwplus--don't use.
4405 :
4406 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004407 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4408 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004409 fi
4410 fi
4411 done
4412 done
4413 ;;
4414esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004415done
4416IFS=$as_save_IFS
4417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004418
4419fi
4420 if test "${ac_cv_path_install+set}" = set; then
4421 INSTALL=$ac_cv_path_install
4422 else
4423 # As a last resort, use the slow shell script. Don't cache a
4424 # value for INSTALL within a source directory, because that will
4425 # break other packages using the cache if that directory is
4426 # removed, or if the value is a relative name.
4427 INSTALL=$ac_install_sh
4428 fi
4429fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004430{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4431echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004432
4433# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4434# It thinks the first close brace ends the variable substitution.
4435test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4436
4437test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4438
4439test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4440
4441
4442# Not every filesystem supports hard links
4443
4444if test -z "$LN" ; then
4445 case $ac_sys_system in
4446 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004447 *) LN=ln;;
4448 esac
4449fi
4450
4451# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004452{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4453echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004454
4455# Check whether --with-pydebug was given.
4456if test "${with_pydebug+set}" = set; then
4457 withval=$with_pydebug;
4458if test "$withval" != no
4459then
4460
4461cat >>confdefs.h <<\_ACEOF
4462#define Py_DEBUG 1
4463_ACEOF
4464
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004465 { echo "$as_me:$LINENO: result: yes" >&5
4466echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004467 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004468else { echo "$as_me:$LINENO: result: no" >&5
4469echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004470fi
4471else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004472 { echo "$as_me:$LINENO: result: no" >&5
4473echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004474fi
4475
4476
4477# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4478# merged with this chunk of code?
4479
4480# Optimizer/debugger flags
4481# ------------------------
4482# (The following bit of code is complicated enough - please keep things
4483# indented properly. Just pretend you're editing Python code. ;-)
4484
4485# There are two parallel sets of case statements below, one that checks to
4486# see if OPT was set and one that does BASECFLAGS setting based upon
4487# compiler and platform. BASECFLAGS tweaks need to be made even if the
4488# user set OPT.
4489
4490# tweak OPT based on compiler and platform, only if the user didn't set
4491# it on the command line
4492
4493if test -z "$OPT"
4494then
4495 case $GCC in
4496 yes)
4497 if test "$CC" != 'g++' ; then
4498 STRICT_PROTO="-Wstrict-prototypes"
4499 fi
4500 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4501 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4502 WRAP="-fwrapv"
4503 fi
4504 case $ac_cv_prog_cc_g in
4505 yes)
4506 if test "$Py_DEBUG" = 'true' ; then
4507 # Optimization messes up debuggers, so turn it off for
4508 # debug builds.
4509 OPT="-g -Wall $STRICT_PROTO"
4510 else
4511 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4512 fi
4513 ;;
4514 *)
4515 OPT="-O3 -Wall $STRICT_PROTO"
4516 ;;
4517 esac
4518 case $ac_sys_system in
4519 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4520 ;;
4521 esac
4522 ;;
4523
4524 *)
4525 OPT="-O"
4526 ;;
4527 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004528fi
4529
4530
4531
4532# The -arch flags for universal builds on OSX
4533UNIVERSAL_ARCH_FLAGS=
4534
4535
4536# tweak BASECFLAGS based on compiler and platform
4537case $GCC in
4538yes)
4539 # Python violates C99 rules, by casting between incompatible
4540 # pointer types. GCC may generate bad code as a result of that,
4541 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004542 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4543echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004544 ac_save_cc="$CC"
4545 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004546 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004547 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004548else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004549 cat >conftest.$ac_ext <<_ACEOF
4550/* confdefs.h. */
4551_ACEOF
4552cat confdefs.h >>conftest.$ac_ext
4553cat >>conftest.$ac_ext <<_ACEOF
4554/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004555
4556int
4557main ()
4558{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004559int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004560 ;
4561 return 0;
4562}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004563_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004564rm -f conftest.$ac_objext
4565if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004566case "(($ac_try" in
4567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4568 *) ac_try_echo=$ac_try;;
4569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004571 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004572 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004573 grep -v '^ *+' conftest.er1 >conftest.err
4574 rm -f conftest.er1
4575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004577 (exit $ac_status); } && {
4578 test -z "$ac_c_werror_flag" ||
4579 test ! -s conftest.err
4580 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004581 ac_cv_no_strict_aliasing_ok=yes
4582else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004583 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004584sed 's/^/| /' conftest.$ac_ext >&5
4585
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004586 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004587fi
4588
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004590fi
4591
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004592 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004593 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4594echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004595 if test $ac_cv_no_strict_aliasing_ok = yes
4596 then
4597 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4598 fi
4599
4600 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4601 # support. Without this, treatment of subnormals doesn't follow
4602 # the standard.
4603 case $ac_sys_machine in
4604 alpha*)
4605 BASECFLAGS="$BASECFLAGS -mieee"
4606 ;;
4607 esac
4608
4609 case $ac_sys_system in
4610 SCO_SV*)
4611 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4612 ;;
4613 # is there any other compiler on Darwin besides gcc?
4614 Darwin*)
4615 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4616 # used to be here, but non-Apple gcc doesn't accept them.
4617
4618
4619 if test "${enable_universalsdk}"; then
4620 UNIVERSAL_ARCH_FLAGS=""
4621 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4622 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4623 ARCH_RUN_32BIT=""
4624
4625 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4626 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004627 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628
4629 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4630 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4631 ARCH_RUN_32BIT="arch -i386 -ppc"
4632
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004633 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4634 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4635 ARCH_RUN_32BIT="arch -i386"
4636
4637 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4638 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4639 ARCH_RUN_32BIT="arch -i386 -ppc"
4640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004642 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4643echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004644 { (exit 1); exit 1; }; }
4645
4646 fi
4647
4648
4649 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4650 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4651 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4652 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4653 fi
4654 fi
4655
4656 # Calculate the right deployment target for this build.
4657 #
4658 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4659 if test ${cur_target} '>' 10.2; then
4660 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004661 if test ${enable_universalsdk}; then
4662 if test "${UNIVERSAL_ARCHS}" = "all"; then
4663 # Ensure that the default platform for a
4664 # 4-way universal build is OSX 10.5,
4665 # that's the first OS release where
4666 # 4-way builds make sense.
4667 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004668
4669 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4670 cur_target='10.5'
4671
4672 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4673 cur_target='10.5'
4674
4675 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4676 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004677 fi
4678 else
4679 if test `arch` = "i386"; then
4680 # On Intel macs default to a deployment
4681 # target of 10.4, that's the first OSX
4682 # release with Intel support.
4683 cur_target="10.4"
4684 fi
4685 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686 fi
4687 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4688
4689 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4690 # environment with a value that is the same as what we'll use
4691 # in the Makefile to ensure that we'll get the same compiler
4692 # environment during configure and build time.
4693 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4694 export MACOSX_DEPLOYMENT_TARGET
4695 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4696
4697 ;;
4698 OSF*)
4699 BASECFLAGS="$BASECFLAGS -mieee"
4700 ;;
4701 esac
4702 ;;
4703
4704*)
4705 case $ac_sys_system in
4706 OpenUNIX*|UnixWare*)
4707 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4708 ;;
4709 OSF*)
4710 BASECFLAGS="$BASECFLAGS -ieee -std"
4711 ;;
4712 SCO_SV*)
4713 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4714 ;;
4715 esac
4716 ;;
4717esac
4718
4719if test "$Py_DEBUG" = 'true'; then
4720 :
4721else
4722 OPT="-DNDEBUG $OPT"
4723fi
4724
4725if test "$ac_arch_flags"
4726then
4727 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4728fi
4729
4730# disable check for icc since it seems to pass, but generates a warning
4731if test "$CC" = icc
4732then
4733 ac_cv_opt_olimit_ok=no
4734fi
4735
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004736{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4737echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004738if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004739 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740else
4741 ac_save_cc="$CC"
4742CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004743cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744/* confdefs.h. */
4745_ACEOF
4746cat confdefs.h >>conftest.$ac_ext
4747cat >>conftest.$ac_ext <<_ACEOF
4748/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004749
4750int
4751main ()
4752{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004754 ;
4755 return 0;
4756}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004758rm -f conftest.$ac_objext
4759if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760case "(($ac_try" in
4761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4762 *) ac_try_echo=$ac_try;;
4763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004765 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004766 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004767 grep -v '^ *+' conftest.er1 >conftest.err
4768 rm -f conftest.er1
4769 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004771 (exit $ac_status); } && {
4772 test -z "$ac_c_werror_flag" ||
4773 test ! -s conftest.err
4774 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775 ac_cv_opt_olimit_ok=yes
4776else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004777 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778sed 's/^/| /' conftest.$ac_ext >&5
4779
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004780 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781fi
4782
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784CC="$ac_save_cc"
4785fi
4786
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004787{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4788echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789if test $ac_cv_opt_olimit_ok = yes; then
4790 case $ac_sys_system in
4791 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4792 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4793 # environment?
4794 Darwin*)
4795 ;;
4796 *)
4797 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4798 ;;
4799 esac
4800else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004801 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4802echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004803 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004804 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004805else
4806 ac_save_cc="$CC"
4807 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808 cat >conftest.$ac_ext <<_ACEOF
4809/* confdefs.h. */
4810_ACEOF
4811cat confdefs.h >>conftest.$ac_ext
4812cat >>conftest.$ac_ext <<_ACEOF
4813/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004814
4815int
4816main ()
4817{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004818int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004819 ;
4820 return 0;
4821}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004823rm -f conftest.$ac_objext
4824if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004825case "(($ac_try" in
4826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4827 *) ac_try_echo=$ac_try;;
4828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004830 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004831 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004832 grep -v '^ *+' conftest.er1 >conftest.err
4833 rm -f conftest.er1
4834 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004836 (exit $ac_status); } && {
4837 test -z "$ac_c_werror_flag" ||
4838 test ! -s conftest.err
4839 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840 ac_cv_olimit_ok=yes
4841else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004842 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843sed 's/^/| /' conftest.$ac_ext >&5
4844
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004845 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004846fi
4847
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849 CC="$ac_save_cc"
4850fi
4851
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004852 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4853echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854 if test $ac_cv_olimit_ok = yes; then
4855 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4856 fi
4857fi
4858
4859# Check whether GCC supports PyArg_ParseTuple format
4860if test "$GCC" = "yes"
4861then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004862 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4863echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864 save_CFLAGS=$CFLAGS
4865 CFLAGS="$CFLAGS -Werror"
4866 cat >conftest.$ac_ext <<_ACEOF
4867/* confdefs.h. */
4868_ACEOF
4869cat confdefs.h >>conftest.$ac_ext
4870cat >>conftest.$ac_ext <<_ACEOF
4871/* end confdefs.h. */
4872
4873 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4874
4875int
4876main ()
4877{
4878
4879 ;
4880 return 0;
4881}
4882_ACEOF
4883rm -f conftest.$ac_objext
4884if { (ac_try="$ac_compile"
4885case "(($ac_try" in
4886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4887 *) ac_try_echo=$ac_try;;
4888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890 (eval "$ac_compile") 2>conftest.er1
4891 ac_status=$?
4892 grep -v '^ *+' conftest.er1 >conftest.err
4893 rm -f conftest.er1
4894 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004896 (exit $ac_status); } && {
4897 test -z "$ac_c_werror_flag" ||
4898 test ! -s conftest.err
4899 } && test -s conftest.$ac_objext; then
4900
4901cat >>confdefs.h <<\_ACEOF
4902#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4903_ACEOF
4904
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004905 { echo "$as_me:$LINENO: result: yes" >&5
4906echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004908 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909sed 's/^/| /' conftest.$ac_ext >&5
4910
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004911 { echo "$as_me:$LINENO: result: no" >&5
4912echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913
4914fi
4915
4916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4917 CFLAGS=$save_CFLAGS
4918fi
4919
4920# On some compilers, pthreads are available without further options
4921# (e.g. MacOS X). On some of these systems, the compiler will not
4922# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4923# So we have to see first whether pthreads are available without
4924# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004925{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4926echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004928 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004929else
4930 if test "$cross_compiling" = yes; then
4931 ac_cv_pthread_is_default=no
4932else
4933 cat >conftest.$ac_ext <<_ACEOF
4934/* confdefs.h. */
4935_ACEOF
4936cat confdefs.h >>conftest.$ac_ext
4937cat >>conftest.$ac_ext <<_ACEOF
4938/* end confdefs.h. */
4939
4940#include <pthread.h>
4941
4942void* routine(void* p){return NULL;}
4943
4944int main(){
4945 pthread_t p;
4946 if(pthread_create(&p,NULL,routine,NULL)!=0)
4947 return 1;
4948 (void)pthread_detach(p);
4949 return 0;
4950}
4951
4952_ACEOF
4953rm -f conftest$ac_exeext
4954if { (ac_try="$ac_link"
4955case "(($ac_try" in
4956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4957 *) ac_try_echo=$ac_try;;
4958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960 (eval "$ac_link") 2>&5
4961 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4964 { (case "(($ac_try" in
4965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4966 *) ac_try_echo=$ac_try;;
4967esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969 (eval "$ac_try") 2>&5
4970 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 (exit $ac_status); }; }; then
4973
4974 ac_cv_pthread_is_default=yes
4975 ac_cv_kthread=no
4976 ac_cv_pthread=no
4977
4978else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004979 echo "$as_me: program exited with status $ac_status" >&5
4980echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981sed 's/^/| /' conftest.$ac_ext >&5
4982
4983( exit $ac_status )
4984ac_cv_pthread_is_default=no
4985fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4987fi
4988
4989
4990
4991fi
4992
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004993{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4994echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995
4996
4997if test $ac_cv_pthread_is_default = yes
4998then
4999 ac_cv_kpthread=no
5000else
5001# -Kpthread, if available, provides the right #defines
5002# and linker options to make pthread_create available
5003# Some compilers won't report that they do not support -Kpthread,
5004# so we need to run a program to see whether it really made the
5005# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005006{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5007echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005009 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010else
5011 ac_save_cc="$CC"
5012CC="$CC -Kpthread"
5013if test "$cross_compiling" = yes; then
5014 ac_cv_kpthread=no
5015else
5016 cat >conftest.$ac_ext <<_ACEOF
5017/* confdefs.h. */
5018_ACEOF
5019cat confdefs.h >>conftest.$ac_ext
5020cat >>conftest.$ac_ext <<_ACEOF
5021/* end confdefs.h. */
5022
5023#include <pthread.h>
5024
5025void* routine(void* p){return NULL;}
5026
5027int main(){
5028 pthread_t p;
5029 if(pthread_create(&p,NULL,routine,NULL)!=0)
5030 return 1;
5031 (void)pthread_detach(p);
5032 return 0;
5033}
5034
5035_ACEOF
5036rm -f conftest$ac_exeext
5037if { (ac_try="$ac_link"
5038case "(($ac_try" in
5039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5040 *) ac_try_echo=$ac_try;;
5041esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 (eval "$ac_link") 2>&5
5044 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5047 { (case "(($ac_try" in
5048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5049 *) ac_try_echo=$ac_try;;
5050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052 (eval "$ac_try") 2>&5
5053 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055 (exit $ac_status); }; }; then
5056 ac_cv_kpthread=yes
5057else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005058 echo "$as_me: program exited with status $ac_status" >&5
5059echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060sed 's/^/| /' conftest.$ac_ext >&5
5061
5062( exit $ac_status )
5063ac_cv_kpthread=no
5064fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5066fi
5067
5068
5069CC="$ac_save_cc"
5070fi
5071
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005072{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5073echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074fi
5075
5076if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5077then
5078# -Kthread, if available, provides the right #defines
5079# and linker options to make pthread_create available
5080# Some compilers won't report that they do not support -Kthread,
5081# so we need to run a program to see whether it really made the
5082# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005083{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5084echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005085if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005086 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087else
5088 ac_save_cc="$CC"
5089CC="$CC -Kthread"
5090if test "$cross_compiling" = yes; then
5091 ac_cv_kthread=no
5092else
5093 cat >conftest.$ac_ext <<_ACEOF
5094/* confdefs.h. */
5095_ACEOF
5096cat confdefs.h >>conftest.$ac_ext
5097cat >>conftest.$ac_ext <<_ACEOF
5098/* end confdefs.h. */
5099
5100#include <pthread.h>
5101
5102void* routine(void* p){return NULL;}
5103
5104int main(){
5105 pthread_t p;
5106 if(pthread_create(&p,NULL,routine,NULL)!=0)
5107 return 1;
5108 (void)pthread_detach(p);
5109 return 0;
5110}
5111
5112_ACEOF
5113rm -f conftest$ac_exeext
5114if { (ac_try="$ac_link"
5115case "(($ac_try" in
5116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5117 *) ac_try_echo=$ac_try;;
5118esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120 (eval "$ac_link") 2>&5
5121 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5124 { (case "(($ac_try" in
5125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5126 *) ac_try_echo=$ac_try;;
5127esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129 (eval "$ac_try") 2>&5
5130 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132 (exit $ac_status); }; }; then
5133 ac_cv_kthread=yes
5134else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005135 echo "$as_me: program exited with status $ac_status" >&5
5136echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137sed 's/^/| /' conftest.$ac_ext >&5
5138
5139( exit $ac_status )
5140ac_cv_kthread=no
5141fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5143fi
5144
5145
5146CC="$ac_save_cc"
5147fi
5148
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005149{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5150echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151fi
5152
5153if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5154then
5155# -pthread, if available, provides the right #defines
5156# and linker options to make pthread_create available
5157# Some compilers won't report that they do not support -pthread,
5158# so we need to run a program to see whether it really made the
5159# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005160{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5161echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005162if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005163 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005164else
5165 ac_save_cc="$CC"
5166CC="$CC -pthread"
5167if test "$cross_compiling" = yes; then
5168 ac_cv_pthread=no
5169else
5170 cat >conftest.$ac_ext <<_ACEOF
5171/* confdefs.h. */
5172_ACEOF
5173cat confdefs.h >>conftest.$ac_ext
5174cat >>conftest.$ac_ext <<_ACEOF
5175/* end confdefs.h. */
5176
5177#include <pthread.h>
5178
5179void* routine(void* p){return NULL;}
5180
5181int main(){
5182 pthread_t p;
5183 if(pthread_create(&p,NULL,routine,NULL)!=0)
5184 return 1;
5185 (void)pthread_detach(p);
5186 return 0;
5187}
5188
5189_ACEOF
5190rm -f conftest$ac_exeext
5191if { (ac_try="$ac_link"
5192case "(($ac_try" in
5193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5194 *) ac_try_echo=$ac_try;;
5195esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 (eval "$ac_link") 2>&5
5198 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5201 { (case "(($ac_try" in
5202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5203 *) ac_try_echo=$ac_try;;
5204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 (eval "$ac_try") 2>&5
5207 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209 (exit $ac_status); }; }; then
5210 ac_cv_pthread=yes
5211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005212 echo "$as_me: program exited with status $ac_status" >&5
5213echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005214sed 's/^/| /' conftest.$ac_ext >&5
5215
5216( exit $ac_status )
5217ac_cv_pthread=no
5218fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5220fi
5221
5222
5223CC="$ac_save_cc"
5224fi
5225
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005226{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5227echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228fi
5229
5230# If we have set a CC compiler flag for thread support then
5231# check if it works for CXX, too.
5232ac_cv_cxx_thread=no
5233if test ! -z "$CXX"
5234then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005235{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5236echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005237ac_save_cxx="$CXX"
5238
5239if test "$ac_cv_kpthread" = "yes"
5240then
5241 CXX="$CXX -Kpthread"
5242 ac_cv_cxx_thread=yes
5243elif test "$ac_cv_kthread" = "yes"
5244then
5245 CXX="$CXX -Kthread"
5246 ac_cv_cxx_thread=yes
5247elif test "$ac_cv_pthread" = "yes"
5248then
5249 CXX="$CXX -pthread"
5250 ac_cv_cxx_thread=yes
5251fi
5252
5253if test $ac_cv_cxx_thread = yes
5254then
5255 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5256 $CXX -c conftest.$ac_ext 2>&5
5257 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5258 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5259 then
5260 ac_cv_cxx_thread=yes
5261 else
5262 ac_cv_cxx_thread=no
5263 fi
5264 rm -fr conftest*
5265fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005266{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5267echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268fi
5269CXX="$ac_save_cxx"
5270
5271
5272# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005273{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5274echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005276 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005277else
5278 cat >conftest.$ac_ext <<_ACEOF
5279/* confdefs.h. */
5280_ACEOF
5281cat confdefs.h >>conftest.$ac_ext
5282cat >>conftest.$ac_ext <<_ACEOF
5283/* end confdefs.h. */
5284#include <stdlib.h>
5285#include <stdarg.h>
5286#include <string.h>
5287#include <float.h>
5288
5289int
5290main ()
5291{
5292
5293 ;
5294 return 0;
5295}
5296_ACEOF
5297rm -f conftest.$ac_objext
5298if { (ac_try="$ac_compile"
5299case "(($ac_try" in
5300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5301 *) ac_try_echo=$ac_try;;
5302esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304 (eval "$ac_compile") 2>conftest.er1
5305 ac_status=$?
5306 grep -v '^ *+' conftest.er1 >conftest.err
5307 rm -f conftest.er1
5308 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310 (exit $ac_status); } && {
5311 test -z "$ac_c_werror_flag" ||
5312 test ! -s conftest.err
5313 } && test -s conftest.$ac_objext; then
5314 ac_cv_header_stdc=yes
5315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005316 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317sed 's/^/| /' conftest.$ac_ext >&5
5318
5319 ac_cv_header_stdc=no
5320fi
5321
5322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5323
5324if test $ac_cv_header_stdc = yes; then
5325 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5326 cat >conftest.$ac_ext <<_ACEOF
5327/* confdefs.h. */
5328_ACEOF
5329cat confdefs.h >>conftest.$ac_ext
5330cat >>conftest.$ac_ext <<_ACEOF
5331/* end confdefs.h. */
5332#include <string.h>
5333
5334_ACEOF
5335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5336 $EGREP "memchr" >/dev/null 2>&1; then
5337 :
5338else
5339 ac_cv_header_stdc=no
5340fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00005341rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005342
5343fi
5344
5345if test $ac_cv_header_stdc = yes; then
5346 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5347 cat >conftest.$ac_ext <<_ACEOF
5348/* confdefs.h. */
5349_ACEOF
5350cat confdefs.h >>conftest.$ac_ext
5351cat >>conftest.$ac_ext <<_ACEOF
5352/* end confdefs.h. */
5353#include <stdlib.h>
5354
5355_ACEOF
5356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5357 $EGREP "free" >/dev/null 2>&1; then
5358 :
5359else
5360 ac_cv_header_stdc=no
5361fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00005362rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363
5364fi
5365
5366if test $ac_cv_header_stdc = yes; then
5367 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5368 if test "$cross_compiling" = yes; then
5369 :
5370else
5371 cat >conftest.$ac_ext <<_ACEOF
5372/* confdefs.h. */
5373_ACEOF
5374cat confdefs.h >>conftest.$ac_ext
5375cat >>conftest.$ac_ext <<_ACEOF
5376/* end confdefs.h. */
5377#include <ctype.h>
5378#include <stdlib.h>
5379#if ((' ' & 0x0FF) == 0x020)
5380# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5381# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5382#else
5383# define ISLOWER(c) \
5384 (('a' <= (c) && (c) <= 'i') \
5385 || ('j' <= (c) && (c) <= 'r') \
5386 || ('s' <= (c) && (c) <= 'z'))
5387# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5388#endif
5389
5390#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5391int
5392main ()
5393{
5394 int i;
5395 for (i = 0; i < 256; i++)
5396 if (XOR (islower (i), ISLOWER (i))
5397 || toupper (i) != TOUPPER (i))
5398 return 2;
5399 return 0;
5400}
5401_ACEOF
5402rm -f conftest$ac_exeext
5403if { (ac_try="$ac_link"
5404case "(($ac_try" in
5405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5406 *) ac_try_echo=$ac_try;;
5407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409 (eval "$ac_link") 2>&5
5410 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5413 { (case "(($ac_try" in
5414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5415 *) ac_try_echo=$ac_try;;
5416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418 (eval "$ac_try") 2>&5
5419 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005421 (exit $ac_status); }; }; then
5422 :
5423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005424 echo "$as_me: program exited with status $ac_status" >&5
5425echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426sed 's/^/| /' conftest.$ac_ext >&5
5427
5428( exit $ac_status )
5429ac_cv_header_stdc=no
5430fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5432fi
5433
5434
5435fi
5436fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005437{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5438echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439if test $ac_cv_header_stdc = yes; then
5440
5441cat >>confdefs.h <<\_ACEOF
5442#define STDC_HEADERS 1
5443_ACEOF
5444
5445fi
5446
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005447# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5458 inttypes.h stdint.h unistd.h
5459do
5460as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5461{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5462echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5463if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5464 echo $ECHO_N "(cached) $ECHO_C" >&6
5465else
5466 cat >conftest.$ac_ext <<_ACEOF
5467/* confdefs.h. */
5468_ACEOF
5469cat confdefs.h >>conftest.$ac_ext
5470cat >>conftest.$ac_ext <<_ACEOF
5471/* end confdefs.h. */
5472$ac_includes_default
5473
5474#include <$ac_header>
5475_ACEOF
5476rm -f conftest.$ac_objext
5477if { (ac_try="$ac_compile"
5478case "(($ac_try" in
5479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5480 *) ac_try_echo=$ac_try;;
5481esac
5482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5483 (eval "$ac_compile") 2>conftest.er1
5484 ac_status=$?
5485 grep -v '^ *+' conftest.er1 >conftest.err
5486 rm -f conftest.er1
5487 cat conftest.err >&5
5488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5489 (exit $ac_status); } && {
5490 test -z "$ac_c_werror_flag" ||
5491 test ! -s conftest.err
5492 } && test -s conftest.$ac_objext; then
5493 eval "$as_ac_Header=yes"
5494else
5495 echo "$as_me: failed program was:" >&5
5496sed 's/^/| /' conftest.$ac_ext >&5
5497
5498 eval "$as_ac_Header=no"
5499fi
5500
5501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5502fi
5503ac_res=`eval echo '${'$as_ac_Header'}'`
5504 { echo "$as_me:$LINENO: result: $ac_res" >&5
5505echo "${ECHO_T}$ac_res" >&6; }
5506if test `eval echo '${'$as_ac_Header'}'` = yes; then
5507 cat >>confdefs.h <<_ACEOF
5508#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5509_ACEOF
5510
5511fi
5512
5513done
5514
5515
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516
Martin v. Löwis11437992002-04-12 09:54:03 +00005517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
Anthony Baxter8a560de2004-10-13 15:30:56 +00005552
Martin v. Löwisc3001752005-01-23 09:27:24 +00005553
Martin v. Löwis11017b12006-01-14 18:12:57 +00005554
Thomas Wouters477c8d52006-05-27 19:21:47 +00005555
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005556
5557
5558
5559
5560
5561
5562
5563
Thomas Wouters89f507f2006-12-13 04:49:30 +00005564
Christian Heimes043d6f62008-01-07 17:19:16 +00005565
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005566
5567
Christian Heimesbbe741d2008-03-28 10:53:29 +00005568
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005569
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005570for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5571fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005572ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005573shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005574unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005575sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5576sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005577sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005578sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005579sys/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 +00005580sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005581bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005582do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005583as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005584if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005585 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5586echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005587if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005588 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005589fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005590ac_res=`eval echo '${'$as_ac_Header'}'`
5591 { echo "$as_me:$LINENO: result: $ac_res" >&5
5592echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005593else
Martin v. Löwis11437992002-04-12 09:54:03 +00005594 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005595{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5596echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005597cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005598/* confdefs.h. */
5599_ACEOF
5600cat confdefs.h >>conftest.$ac_ext
5601cat >>conftest.$ac_ext <<_ACEOF
5602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005603$ac_includes_default
5604#include <$ac_header>
5605_ACEOF
5606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005607if { (ac_try="$ac_compile"
5608case "(($ac_try" in
5609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5610 *) ac_try_echo=$ac_try;;
5611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005615 grep -v '^ *+' conftest.er1 >conftest.err
5616 rm -f conftest.er1
5617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005619 (exit $ac_status); } && {
5620 test -z "$ac_c_werror_flag" ||
5621 test ! -s conftest.err
5622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005623 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005626sed 's/^/| /' conftest.$ac_ext >&5
5627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005628 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005630
5631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005632{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5633echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005634
5635# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005636{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5637echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005639/* confdefs.h. */
5640_ACEOF
5641cat confdefs.h >>conftest.$ac_ext
5642cat >>conftest.$ac_ext <<_ACEOF
5643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005644#include <$ac_header>
5645_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005646if { (ac_try="$ac_cpp conftest.$ac_ext"
5647case "(($ac_try" in
5648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5649 *) ac_try_echo=$ac_try;;
5650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005652 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005653 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005654 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005655 rm -f conftest.er1
5656 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005658 (exit $ac_status); } >/dev/null && {
5659 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5660 test ! -s conftest.err
5661 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005662 ac_header_preproc=yes
5663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005665sed 's/^/| /' conftest.$ac_ext >&5
5666
Martin v. Löwis11437992002-04-12 09:54:03 +00005667 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005669
Martin v. Löwis11437992002-04-12 09:54:03 +00005670rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005671{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5672echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005673
5674# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005675case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5676 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005677 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5678echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5679 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5680echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005681 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005682 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005683 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005684 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5685echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5686 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5687echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5688 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5689echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5690 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5691echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5692 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5693echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5694 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5695echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005696 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005697## -------------------------------------- ##
5698## Report this to http://bugs.python.org/ ##
5699## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005700_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005701 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005702 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005703esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005704{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5705echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005706if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005707 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005708else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005709 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005710fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005711ac_res=`eval echo '${'$as_ac_Header'}'`
5712 { echo "$as_me:$LINENO: result: $ac_res" >&5
5713echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005714
5715fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005716if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005717 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005718#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005719_ACEOF
5720
5721fi
5722
Guido van Rossum627b2d71993-12-24 10:39:16 +00005723done
5724
Martin v. Löwis11437992002-04-12 09:54:03 +00005725
5726
5727
5728
5729
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005730ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005731for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005732 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5733{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5734echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005735if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005736 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005737else
Martin v. Löwis11437992002-04-12 09:54:03 +00005738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005739/* confdefs.h. */
5740_ACEOF
5741cat confdefs.h >>conftest.$ac_ext
5742cat >>conftest.$ac_ext <<_ACEOF
5743/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005744#include <sys/types.h>
5745#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005746
Martin v. Löwis11437992002-04-12 09:54:03 +00005747int
5748main ()
5749{
5750if ((DIR *) 0)
5751return 0;
5752 ;
5753 return 0;
5754}
5755_ACEOF
5756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005757if { (ac_try="$ac_compile"
5758case "(($ac_try" in
5759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5760 *) ac_try_echo=$ac_try;;
5761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005765 grep -v '^ *+' conftest.er1 >conftest.err
5766 rm -f conftest.er1
5767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005769 (exit $ac_status); } && {
5770 test -z "$ac_c_werror_flag" ||
5771 test ! -s conftest.err
5772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005773 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005776sed 's/^/| /' conftest.$ac_ext >&5
5777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005778 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005780
5781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005782fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005783ac_res=`eval echo '${'$as_ac_Header'}'`
5784 { echo "$as_me:$LINENO: result: $ac_res" >&5
5785echo "${ECHO_T}$ac_res" >&6; }
5786if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005787 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005788#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005789_ACEOF
5790
5791ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005794done
5795# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5796if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005797 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5798echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005799if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801else
Martin v. Löwis11437992002-04-12 09:54:03 +00005802 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005804/* confdefs.h. */
5805_ACEOF
5806cat confdefs.h >>conftest.$ac_ext
5807cat >>conftest.$ac_ext <<_ACEOF
5808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005810/* Override any GCC internal prototype to avoid an error.
5811 Use char because int might match the return type of a GCC
5812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005813#ifdef __cplusplus
5814extern "C"
5815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005816char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005817int
5818main ()
5819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005820return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005821 ;
5822 return 0;
5823}
5824_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005825for ac_lib in '' dir; do
5826 if test -z "$ac_lib"; then
5827 ac_res="none required"
5828 else
5829 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005830 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005831 fi
5832 rm -f conftest.$ac_objext conftest$ac_exeext
5833if { (ac_try="$ac_link"
5834case "(($ac_try" in
5835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5836 *) ac_try_echo=$ac_try;;
5837esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005839 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005840 ac_status=$?
5841 grep -v '^ *+' conftest.er1 >conftest.err
5842 rm -f conftest.er1
5843 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005845 (exit $ac_status); } && {
5846 test -z "$ac_c_werror_flag" ||
5847 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005848 } && test -s conftest$ac_exeext &&
5849 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005850 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005852 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005853sed 's/^/| /' conftest.$ac_ext >&5
5854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005855
Thomas Wouters477c8d52006-05-27 19:21:47 +00005856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005857
5858rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5859 conftest$ac_exeext
5860 if test "${ac_cv_search_opendir+set}" = set; then
5861 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005863done
5864if test "${ac_cv_search_opendir+set}" = set; then
5865 :
5866else
5867 ac_cv_search_opendir=no
5868fi
5869rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005870LIBS=$ac_func_search_save_LIBS
5871fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005872{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5873echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005874ac_res=$ac_cv_search_opendir
5875if test "$ac_res" != no; then
5876 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005879
Michael W. Hudson54241132001-12-07 15:38:26 +00005880else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005881 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5882echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005883if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005884 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005885else
5886 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005887cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005888/* confdefs.h. */
5889_ACEOF
5890cat confdefs.h >>conftest.$ac_ext
5891cat >>conftest.$ac_ext <<_ACEOF
5892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005894/* Override any GCC internal prototype to avoid an error.
5895 Use char because int might match the return type of a GCC
5896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005897#ifdef __cplusplus
5898extern "C"
5899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005900char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005901int
5902main ()
5903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005904return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005905 ;
5906 return 0;
5907}
5908_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005909for ac_lib in '' x; do
5910 if test -z "$ac_lib"; then
5911 ac_res="none required"
5912 else
5913 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005915 fi
5916 rm -f conftest.$ac_objext conftest$ac_exeext
5917if { (ac_try="$ac_link"
5918case "(($ac_try" in
5919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5920 *) ac_try_echo=$ac_try;;
5921esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005923 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005924 ac_status=$?
5925 grep -v '^ *+' conftest.er1 >conftest.err
5926 rm -f conftest.er1
5927 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005929 (exit $ac_status); } && {
5930 test -z "$ac_c_werror_flag" ||
5931 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005932 } && test -s conftest$ac_exeext &&
5933 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005934 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005936 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005937sed 's/^/| /' conftest.$ac_ext >&5
5938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005939
Thomas Wouters477c8d52006-05-27 19:21:47 +00005940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005941
5942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5943 conftest$ac_exeext
5944 if test "${ac_cv_search_opendir+set}" = set; then
5945 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005947done
5948if test "${ac_cv_search_opendir+set}" = set; then
5949 :
5950else
5951 ac_cv_search_opendir=no
5952fi
5953rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005954LIBS=$ac_func_search_save_LIBS
5955fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005956{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5957echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005958ac_res=$ac_cv_search_opendir
5959if test "$ac_res" != no; then
5960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005961
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005962fi
5963
5964fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005965
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005966{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5967echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005968if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005969 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005970else
5971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005972/* confdefs.h. */
5973_ACEOF
5974cat confdefs.h >>conftest.$ac_ext
5975cat >>conftest.$ac_ext <<_ACEOF
5976/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005977#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978int
5979main ()
5980{
5981return makedev(0, 0);
5982 ;
5983 return 0;
5984}
5985_ACEOF
5986rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005987if { (ac_try="$ac_link"
5988case "(($ac_try" in
5989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5990 *) ac_try_echo=$ac_try;;
5991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005993 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005995 grep -v '^ *+' conftest.er1 >conftest.err
5996 rm -f conftest.er1
5997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005999 (exit $ac_status); } && {
6000 test -z "$ac_c_werror_flag" ||
6001 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006002 } && test -s conftest$ac_exeext &&
6003 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006004 ac_cv_header_sys_types_h_makedev=yes
6005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006007sed 's/^/| /' conftest.$ac_ext >&5
6008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006009 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011
6012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006013 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006014
6015fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006016{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6017echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006018
6019if test $ac_cv_header_sys_types_h_makedev = no; then
6020if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006021 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6022echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006024 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006025fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006026{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6027echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006028else
6029 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006030{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6031echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006033/* confdefs.h. */
6034_ACEOF
6035cat confdefs.h >>conftest.$ac_ext
6036cat >>conftest.$ac_ext <<_ACEOF
6037/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038$ac_includes_default
6039#include <sys/mkdev.h>
6040_ACEOF
6041rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006042if { (ac_try="$ac_compile"
6043case "(($ac_try" in
6044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6045 *) ac_try_echo=$ac_try;;
6046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006050 grep -v '^ *+' conftest.er1 >conftest.err
6051 rm -f conftest.er1
6052 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006054 (exit $ac_status); } && {
6055 test -z "$ac_c_werror_flag" ||
6056 test ! -s conftest.err
6057 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006058 ac_header_compiler=yes
6059else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006061sed 's/^/| /' conftest.$ac_ext >&5
6062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006063 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006065
6066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006067{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6068echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006069
6070# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006071{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6072echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006074/* confdefs.h. */
6075_ACEOF
6076cat confdefs.h >>conftest.$ac_ext
6077cat >>conftest.$ac_ext <<_ACEOF
6078/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079#include <sys/mkdev.h>
6080_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081if { (ac_try="$ac_cpp conftest.$ac_ext"
6082case "(($ac_try" in
6083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6084 *) ac_try_echo=$ac_try;;
6085esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006089 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090 rm -f conftest.er1
6091 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093 (exit $ac_status); } >/dev/null && {
6094 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6095 test ! -s conftest.err
6096 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097 ac_header_preproc=yes
6098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006100sed 's/^/| /' conftest.$ac_ext >&5
6101
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102 ac_header_preproc=no
6103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006104
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006106{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6107echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108
6109# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006110case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6111 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006112 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6113echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6114 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6115echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006116 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006117 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006118 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006119 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6120echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6121 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6122echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6123 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6124echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6125 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6126echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6127 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6128echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6129 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6130echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006132## -------------------------------------- ##
6133## Report this to http://bugs.python.org/ ##
6134## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006135_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006137 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006139{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6140echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006142 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143else
6144 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6145fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006146{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6147echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148
6149fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006150if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151
6152cat >>confdefs.h <<\_ACEOF
6153#define MAJOR_IN_MKDEV 1
6154_ACEOF
6155
6156fi
6157
6158
6159
6160 if test $ac_cv_header_sys_mkdev_h = no; then
6161 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006162 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6163echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006165 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006167{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6168echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006169else
6170 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006171{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6172echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006174/* confdefs.h. */
6175_ACEOF
6176cat confdefs.h >>conftest.$ac_ext
6177cat >>conftest.$ac_ext <<_ACEOF
6178/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179$ac_includes_default
6180#include <sys/sysmacros.h>
6181_ACEOF
6182rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183if { (ac_try="$ac_compile"
6184case "(($ac_try" in
6185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6186 *) ac_try_echo=$ac_try;;
6187esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006191 grep -v '^ *+' conftest.er1 >conftest.err
6192 rm -f conftest.er1
6193 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195 (exit $ac_status); } && {
6196 test -z "$ac_c_werror_flag" ||
6197 test ! -s conftest.err
6198 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199 ac_header_compiler=yes
6200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006202sed 's/^/| /' conftest.$ac_ext >&5
6203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206
6207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006208{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6209echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210
6211# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006212{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6213echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006215/* confdefs.h. */
6216_ACEOF
6217cat confdefs.h >>conftest.$ac_ext
6218cat >>conftest.$ac_ext <<_ACEOF
6219/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220#include <sys/sysmacros.h>
6221_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006222if { (ac_try="$ac_cpp conftest.$ac_ext"
6223case "(($ac_try" in
6224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6225 *) ac_try_echo=$ac_try;;
6226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006230 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231 rm -f conftest.er1
6232 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234 (exit $ac_status); } >/dev/null && {
6235 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6236 test ! -s conftest.err
6237 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238 ac_header_preproc=yes
6239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006241sed 's/^/| /' conftest.$ac_ext >&5
6242
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243 ac_header_preproc=no
6244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006245
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006247{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6248echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249
6250# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006251case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6252 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006253 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6254echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6255 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6256echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006257 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006258 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006259 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006260 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6261echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6262 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6263echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6264 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6265echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6266 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6267echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6268 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6269echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6270 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6271echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006272 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006273## -------------------------------------- ##
6274## Report this to http://bugs.python.org/ ##
6275## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006276_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006277 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006278 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006280{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6281echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006283 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284else
6285 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6286fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006287{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6288echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289
6290fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006291if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292
6293cat >>confdefs.h <<\_ACEOF
6294#define MAJOR_IN_SYSMACROS 1
6295_ACEOF
6296
6297fi
6298
6299
6300 fi
6301fi
6302
Michael W. Hudson54241132001-12-07 15:38:26 +00006303
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006304# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006305
6306for ac_header in term.h
6307do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006308as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6309{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6310echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006311if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006312 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006313else
6314 cat >conftest.$ac_ext <<_ACEOF
6315/* confdefs.h. */
6316_ACEOF
6317cat confdefs.h >>conftest.$ac_ext
6318cat >>conftest.$ac_ext <<_ACEOF
6319/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006320
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006321#ifdef HAVE_CURSES_H
6322#include <curses.h>
6323#endif
6324
6325
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006326#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006327_ACEOF
6328rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006329if { (ac_try="$ac_compile"
6330case "(($ac_try" in
6331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6332 *) ac_try_echo=$ac_try;;
6333esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006336 ac_status=$?
6337 grep -v '^ *+' conftest.er1 >conftest.err
6338 rm -f conftest.er1
6339 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341 (exit $ac_status); } && {
6342 test -z "$ac_c_werror_flag" ||
6343 test ! -s conftest.err
6344 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006345 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006346else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006347 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006348sed 's/^/| /' conftest.$ac_ext >&5
6349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006350 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006352
6353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006355ac_res=`eval echo '${'$as_ac_Header'}'`
6356 { echo "$as_me:$LINENO: result: $ac_res" >&5
6357echo "${ECHO_T}$ac_res" >&6; }
6358if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006359 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006360#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006361_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006362
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006363fi
6364
6365done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366
6367
Martin v. Löwis11017b12006-01-14 18:12:57 +00006368# On Linux, netlink.h requires asm/types.h
6369
6370for ac_header in linux/netlink.h
6371do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006372as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6373{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6374echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006375if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006376 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006377else
6378 cat >conftest.$ac_ext <<_ACEOF
6379/* confdefs.h. */
6380_ACEOF
6381cat confdefs.h >>conftest.$ac_ext
6382cat >>conftest.$ac_ext <<_ACEOF
6383/* end confdefs.h. */
6384
6385#ifdef HAVE_ASM_TYPES_H
6386#include <asm/types.h>
6387#endif
6388#ifdef HAVE_SYS_SOCKET_H
6389#include <sys/socket.h>
6390#endif
6391
6392
6393#include <$ac_header>
6394_ACEOF
6395rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006396if { (ac_try="$ac_compile"
6397case "(($ac_try" in
6398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6399 *) ac_try_echo=$ac_try;;
6400esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006402 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006403 ac_status=$?
6404 grep -v '^ *+' conftest.er1 >conftest.err
6405 rm -f conftest.er1
6406 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408 (exit $ac_status); } && {
6409 test -z "$ac_c_werror_flag" ||
6410 test ! -s conftest.err
6411 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006412 eval "$as_ac_Header=yes"
6413else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006414 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006415sed 's/^/| /' conftest.$ac_ext >&5
6416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006417 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006419
6420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006421fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006422ac_res=`eval echo '${'$as_ac_Header'}'`
6423 { echo "$as_me:$LINENO: result: $ac_res" >&5
6424echo "${ECHO_T}$ac_res" >&6; }
6425if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006426 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006427#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006428_ACEOF
6429
6430fi
6431
6432done
6433
6434
Guido van Rossum627b2d71993-12-24 10:39:16 +00006435# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006436was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006437{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6438echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006439cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006440/* confdefs.h. */
6441_ACEOF
6442cat confdefs.h >>conftest.$ac_ext
6443cat >>conftest.$ac_ext <<_ACEOF
6444/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006445#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006446
6447_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006449 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006450 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006451else
Martin v. Löwis11437992002-04-12 09:54:03 +00006452
6453
6454cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006455#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006456_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006457
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006458
Guido van Rossum627b2d71993-12-24 10:39:16 +00006459fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00006460rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006462{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6463echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006464
Neal Norwitz11690112002-07-30 01:08:28 +00006465# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006466{ echo "$as_me:$LINENO: checking for makedev" >&5
6467echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006469/* confdefs.h. */
6470_ACEOF
6471cat confdefs.h >>conftest.$ac_ext
6472cat >>conftest.$ac_ext <<_ACEOF
6473/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006474#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006475int
6476main ()
6477{
6478 makedev(0, 0)
6479 ;
6480 return 0;
6481}
6482_ACEOF
6483rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006484if { (ac_try="$ac_link"
6485case "(($ac_try" in
6486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6487 *) ac_try_echo=$ac_try;;
6488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006490 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006492 grep -v '^ *+' conftest.er1 >conftest.err
6493 rm -f conftest.er1
6494 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006496 (exit $ac_status); } && {
6497 test -z "$ac_c_werror_flag" ||
6498 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006499 } && test -s conftest$ac_exeext &&
6500 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006501 ac_cv_has_makedev=yes
6502else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006504sed 's/^/| /' conftest.$ac_ext >&5
6505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006506 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006508
6509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006510 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006511if test "$ac_cv_has_makedev" = "no"; then
6512 # we didn't link, try if _OSF_SOURCE will allow us to link
6513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006519
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006520#define _OSF_SOURCE 1
6521#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006522
Neal Norwitz11690112002-07-30 01:08:28 +00006523int
6524main ()
6525{
6526 makedev(0, 0)
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006532if { (ac_try="$ac_link"
6533case "(($ac_try" in
6534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6535 *) ac_try_echo=$ac_try;;
6536esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006538 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006540 grep -v '^ *+' conftest.er1 >conftest.err
6541 rm -f conftest.er1
6542 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006544 (exit $ac_status); } && {
6545 test -z "$ac_c_werror_flag" ||
6546 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006547 } && test -s conftest$ac_exeext &&
6548 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006549 ac_cv_has_makedev=yes
6550else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006552sed 's/^/| /' conftest.$ac_ext >&5
6553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556
6557rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006558 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006559 if test "$ac_cv_has_makedev" = "yes"; then
6560
6561cat >>confdefs.h <<\_ACEOF
6562#define _OSF_SOURCE 1
6563_ACEOF
6564
6565 fi
6566fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006567{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6568echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006569if test "$ac_cv_has_makedev" = "yes"; then
6570
6571cat >>confdefs.h <<\_ACEOF
6572#define HAVE_MAKEDEV 1
6573_ACEOF
6574
6575fi
6576
Martin v. Löwis399a6892002-10-04 10:22:02 +00006577# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6578# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6579# defined, but the compiler does not support pragma redefine_extname,
6580# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6581# structures (such as rlimit64) without declaring them. As a
6582# work-around, disable LFS on such configurations
6583
6584use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006585{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6586echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006588/* confdefs.h. */
6589_ACEOF
6590cat confdefs.h >>conftest.$ac_ext
6591cat >>conftest.$ac_ext <<_ACEOF
6592/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006593
6594#define _LARGEFILE_SOURCE 1
6595#define _FILE_OFFSET_BITS 64
6596#include <sys/resource.h>
6597
Martin v. Löwis399a6892002-10-04 10:22:02 +00006598int
6599main ()
6600{
6601struct rlimit foo;
6602 ;
6603 return 0;
6604}
6605_ACEOF
6606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006607if { (ac_try="$ac_compile"
6608case "(($ac_try" in
6609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6610 *) ac_try_echo=$ac_try;;
6611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006615 grep -v '^ *+' conftest.er1 >conftest.err
6616 rm -f conftest.er1
6617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619 (exit $ac_status); } && {
6620 test -z "$ac_c_werror_flag" ||
6621 test ! -s conftest.err
6622 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006623 sol_lfs_bug=no
6624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006626sed 's/^/| /' conftest.$ac_ext >&5
6627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006630
6631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006632{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6633echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006634if test "$sol_lfs_bug" = "yes"; then
6635 use_lfs=no
6636fi
6637
6638if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006639# Two defines needed to enable largefile support on various platforms
6640# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006641
Martin v. Löwis11437992002-04-12 09:54:03 +00006642cat >>confdefs.h <<\_ACEOF
6643#define _LARGEFILE_SOURCE 1
6644_ACEOF
6645
6646
6647cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006648#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006649_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006650
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006652
Guido van Rossum84e7b241996-08-19 21:59:00 +00006653# Add some code to confdefs.h so that the test for off_t works on SCO
6654cat >> confdefs.h <<\EOF
6655#if defined(SCO_DS)
6656#undef _OFF_T
6657#endif
6658EOF
6659
Guido van Rossumef2255b2000-03-10 22:30:29 +00006660# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006661{ echo "$as_me:$LINENO: checking for mode_t" >&5
6662echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006663if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006664 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006665else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006666 cat >conftest.$ac_ext <<_ACEOF
6667/* confdefs.h. */
6668_ACEOF
6669cat confdefs.h >>conftest.$ac_ext
6670cat >>conftest.$ac_ext <<_ACEOF
6671/* end confdefs.h. */
6672$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006673typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006674int
6675main ()
6676{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006677if ((ac__type_new_ *) 0)
6678 return 0;
6679if (sizeof (ac__type_new_))
6680 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006681 ;
6682 return 0;
6683}
6684_ACEOF
6685rm -f conftest.$ac_objext
6686if { (ac_try="$ac_compile"
6687case "(($ac_try" in
6688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6689 *) ac_try_echo=$ac_try;;
6690esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006692 (eval "$ac_compile") 2>conftest.er1
6693 ac_status=$?
6694 grep -v '^ *+' conftest.er1 >conftest.err
6695 rm -f conftest.er1
6696 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006698 (exit $ac_status); } && {
6699 test -z "$ac_c_werror_flag" ||
6700 test ! -s conftest.err
6701 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006702 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006705sed 's/^/| /' conftest.$ac_ext >&5
6706
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006707 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006709
6710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006711fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006712{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6713echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6714if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006716else
Martin v. Löwis11437992002-04-12 09:54:03 +00006717
6718cat >>confdefs.h <<_ACEOF
6719#define mode_t int
6720_ACEOF
6721
6722fi
6723
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006724{ echo "$as_me:$LINENO: checking for off_t" >&5
6725echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006726if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006727 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006729 cat >conftest.$ac_ext <<_ACEOF
6730/* confdefs.h. */
6731_ACEOF
6732cat confdefs.h >>conftest.$ac_ext
6733cat >>conftest.$ac_ext <<_ACEOF
6734/* end confdefs.h. */
6735$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006736typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006737int
6738main ()
6739{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006740if ((ac__type_new_ *) 0)
6741 return 0;
6742if (sizeof (ac__type_new_))
6743 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006744 ;
6745 return 0;
6746}
6747_ACEOF
6748rm -f conftest.$ac_objext
6749if { (ac_try="$ac_compile"
6750case "(($ac_try" in
6751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6752 *) ac_try_echo=$ac_try;;
6753esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006755 (eval "$ac_compile") 2>conftest.er1
6756 ac_status=$?
6757 grep -v '^ *+' conftest.er1 >conftest.err
6758 rm -f conftest.er1
6759 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006761 (exit $ac_status); } && {
6762 test -z "$ac_c_werror_flag" ||
6763 test ! -s conftest.err
6764 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006765 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006768sed 's/^/| /' conftest.$ac_ext >&5
6769
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006770 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006772
6773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006774fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006775{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6776echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6777if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006779else
Martin v. Löwis11437992002-04-12 09:54:03 +00006780
6781cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006783_ACEOF
6784
6785fi
6786
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006787{ echo "$as_me:$LINENO: checking for pid_t" >&5
6788echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006789if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006790 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006791else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006792 cat >conftest.$ac_ext <<_ACEOF
6793/* confdefs.h. */
6794_ACEOF
6795cat confdefs.h >>conftest.$ac_ext
6796cat >>conftest.$ac_ext <<_ACEOF
6797/* end confdefs.h. */
6798$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006799typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006800int
6801main ()
6802{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006803if ((ac__type_new_ *) 0)
6804 return 0;
6805if (sizeof (ac__type_new_))
6806 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006807 ;
6808 return 0;
6809}
6810_ACEOF
6811rm -f conftest.$ac_objext
6812if { (ac_try="$ac_compile"
6813case "(($ac_try" in
6814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6815 *) ac_try_echo=$ac_try;;
6816esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006818 (eval "$ac_compile") 2>conftest.er1
6819 ac_status=$?
6820 grep -v '^ *+' conftest.er1 >conftest.err
6821 rm -f conftest.er1
6822 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006824 (exit $ac_status); } && {
6825 test -z "$ac_c_werror_flag" ||
6826 test ! -s conftest.err
6827 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006828 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006829else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006831sed 's/^/| /' conftest.$ac_ext >&5
6832
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006833 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006835
6836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006837fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006838{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6839echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6840if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006841 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006842else
Martin v. Löwis11437992002-04-12 09:54:03 +00006843
6844cat >>confdefs.h <<_ACEOF
6845#define pid_t int
6846_ACEOF
6847
6848fi
6849
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006850{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6851echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006852if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006854else
6855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006856/* confdefs.h. */
6857_ACEOF
6858cat confdefs.h >>conftest.$ac_ext
6859cat >>conftest.$ac_ext <<_ACEOF
6860/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006861#include <sys/types.h>
6862#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006863
Martin v. Löwis11437992002-04-12 09:54:03 +00006864int
6865main ()
6866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006867return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006868 ;
6869 return 0;
6870}
6871_ACEOF
6872rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873if { (ac_try="$ac_compile"
6874case "(($ac_try" in
6875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6876 *) ac_try_echo=$ac_try;;
6877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006881 grep -v '^ *+' conftest.er1 >conftest.err
6882 rm -f conftest.er1
6883 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885 (exit $ac_status); } && {
6886 test -z "$ac_c_werror_flag" ||
6887 test ! -s conftest.err
6888 } && test -s conftest.$ac_objext; then
6889 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006890else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006892sed 's/^/| /' conftest.$ac_ext >&5
6893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006894 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006896
6897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006898fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006899{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6900echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006901
Martin v. Löwis11437992002-04-12 09:54:03 +00006902cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006903#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006904_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006905
Michael W. Hudson54241132001-12-07 15:38:26 +00006906
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006907{ echo "$as_me:$LINENO: checking for size_t" >&5
6908echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006909if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006911else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006912 cat >conftest.$ac_ext <<_ACEOF
6913/* confdefs.h. */
6914_ACEOF
6915cat confdefs.h >>conftest.$ac_ext
6916cat >>conftest.$ac_ext <<_ACEOF
6917/* end confdefs.h. */
6918$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006919typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006920int
6921main ()
6922{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006923if ((ac__type_new_ *) 0)
6924 return 0;
6925if (sizeof (ac__type_new_))
6926 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006927 ;
6928 return 0;
6929}
6930_ACEOF
6931rm -f conftest.$ac_objext
6932if { (ac_try="$ac_compile"
6933case "(($ac_try" in
6934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6935 *) ac_try_echo=$ac_try;;
6936esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006938 (eval "$ac_compile") 2>conftest.er1
6939 ac_status=$?
6940 grep -v '^ *+' conftest.er1 >conftest.err
6941 rm -f conftest.er1
6942 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006944 (exit $ac_status); } && {
6945 test -z "$ac_c_werror_flag" ||
6946 test ! -s conftest.err
6947 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006948 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006949else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006951sed 's/^/| /' conftest.$ac_ext >&5
6952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006953 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955
6956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006957fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006958{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6959echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6960if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006961 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006962else
Martin v. Löwis11437992002-04-12 09:54:03 +00006963
6964cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006965#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006966_ACEOF
6967
6968fi
6969
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006970{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6971echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006972if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006973 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006974else
6975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006976/* confdefs.h. */
6977_ACEOF
6978cat confdefs.h >>conftest.$ac_ext
6979cat >>conftest.$ac_ext <<_ACEOF
6980/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006981#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006982
6983_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006985 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006986 ac_cv_type_uid_t=yes
6987else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006988 ac_cv_type_uid_t=no
6989fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00006990rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006991
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006992fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006993{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6994echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006995if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997cat >>confdefs.h <<\_ACEOF
6998#define uid_t int
6999_ACEOF
7000
7001
7002cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007004_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007005
7006fi
7007
Mark Dickinsonbd792642009-03-18 20:06:12 +00007008
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007009 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7010echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007011if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007012 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007013else
7014 ac_cv_c_uint32_t=no
7015 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7016 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7017 cat >conftest.$ac_ext <<_ACEOF
7018/* confdefs.h. */
7019_ACEOF
7020cat confdefs.h >>conftest.$ac_ext
7021cat >>conftest.$ac_ext <<_ACEOF
7022/* end confdefs.h. */
7023$ac_includes_default
7024int
7025main ()
7026{
7027static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7028test_array [0] = 0
7029
7030 ;
7031 return 0;
7032}
7033_ACEOF
7034rm -f conftest.$ac_objext
7035if { (ac_try="$ac_compile"
7036case "(($ac_try" in
7037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7038 *) ac_try_echo=$ac_try;;
7039esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007041 (eval "$ac_compile") 2>conftest.er1
7042 ac_status=$?
7043 grep -v '^ *+' conftest.er1 >conftest.err
7044 rm -f conftest.er1
7045 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007047 (exit $ac_status); } && {
7048 test -z "$ac_c_werror_flag" ||
7049 test ! -s conftest.err
7050 } && test -s conftest.$ac_objext; then
7051 case $ac_type in
7052 uint32_t) ac_cv_c_uint32_t=yes ;;
7053 *) ac_cv_c_uint32_t=$ac_type ;;
7054esac
7055
7056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007057 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007058sed 's/^/| /' conftest.$ac_ext >&5
7059
7060
7061fi
7062
7063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7064 test "$ac_cv_c_uint32_t" != no && break
7065 done
7066fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007067{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7068echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007069 case $ac_cv_c_uint32_t in #(
7070 no|yes) ;; #(
7071 *)
7072
7073cat >>confdefs.h <<\_ACEOF
7074#define _UINT32_T 1
7075_ACEOF
7076
7077
7078cat >>confdefs.h <<_ACEOF
7079#define uint32_t $ac_cv_c_uint32_t
7080_ACEOF
7081;;
7082 esac
7083
7084
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007085 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7086echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007087if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007088 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007089else
7090 ac_cv_c_uint64_t=no
7091 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7092 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7093 cat >conftest.$ac_ext <<_ACEOF
7094/* confdefs.h. */
7095_ACEOF
7096cat confdefs.h >>conftest.$ac_ext
7097cat >>conftest.$ac_ext <<_ACEOF
7098/* end confdefs.h. */
7099$ac_includes_default
7100int
7101main ()
7102{
7103static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7104test_array [0] = 0
7105
7106 ;
7107 return 0;
7108}
7109_ACEOF
7110rm -f conftest.$ac_objext
7111if { (ac_try="$ac_compile"
7112case "(($ac_try" in
7113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7114 *) ac_try_echo=$ac_try;;
7115esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007117 (eval "$ac_compile") 2>conftest.er1
7118 ac_status=$?
7119 grep -v '^ *+' conftest.er1 >conftest.err
7120 rm -f conftest.er1
7121 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007123 (exit $ac_status); } && {
7124 test -z "$ac_c_werror_flag" ||
7125 test ! -s conftest.err
7126 } && test -s conftest.$ac_objext; then
7127 case $ac_type in
7128 uint64_t) ac_cv_c_uint64_t=yes ;;
7129 *) ac_cv_c_uint64_t=$ac_type ;;
7130esac
7131
7132else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007133 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007134sed 's/^/| /' conftest.$ac_ext >&5
7135
7136
7137fi
7138
7139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7140 test "$ac_cv_c_uint64_t" != no && break
7141 done
7142fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007143{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7144echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007145 case $ac_cv_c_uint64_t in #(
7146 no|yes) ;; #(
7147 *)
7148
7149cat >>confdefs.h <<\_ACEOF
7150#define _UINT64_T 1
7151_ACEOF
7152
7153
7154cat >>confdefs.h <<_ACEOF
7155#define uint64_t $ac_cv_c_uint64_t
7156_ACEOF
7157;;
7158 esac
7159
7160
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007161 { echo "$as_me:$LINENO: checking for int32_t" >&5
7162echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007163if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007164 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007165else
7166 ac_cv_c_int32_t=no
7167 for ac_type in 'int32_t' 'int' 'long int' \
7168 'long long int' 'short int' 'signed char'; do
7169 cat >conftest.$ac_ext <<_ACEOF
7170/* confdefs.h. */
7171_ACEOF
7172cat confdefs.h >>conftest.$ac_ext
7173cat >>conftest.$ac_ext <<_ACEOF
7174/* end confdefs.h. */
7175$ac_includes_default
7176int
7177main ()
7178{
7179static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7180test_array [0] = 0
7181
7182 ;
7183 return 0;
7184}
7185_ACEOF
7186rm -f conftest.$ac_objext
7187if { (ac_try="$ac_compile"
7188case "(($ac_try" in
7189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7190 *) ac_try_echo=$ac_try;;
7191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007193 (eval "$ac_compile") 2>conftest.er1
7194 ac_status=$?
7195 grep -v '^ *+' conftest.er1 >conftest.err
7196 rm -f conftest.er1
7197 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007199 (exit $ac_status); } && {
7200 test -z "$ac_c_werror_flag" ||
7201 test ! -s conftest.err
7202 } && test -s conftest.$ac_objext; then
7203 cat >conftest.$ac_ext <<_ACEOF
7204/* confdefs.h. */
7205_ACEOF
7206cat confdefs.h >>conftest.$ac_ext
7207cat >>conftest.$ac_ext <<_ACEOF
7208/* end confdefs.h. */
7209$ac_includes_default
7210int
7211main ()
7212{
7213static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007214 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007215test_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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 :
7239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007240 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007241sed 's/^/| /' conftest.$ac_ext >&5
7242
7243 case $ac_type in
7244 int32_t) ac_cv_c_int32_t=yes ;;
7245 *) ac_cv_c_int32_t=$ac_type ;;
7246esac
7247
7248fi
7249
7250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7251else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007252 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007253sed 's/^/| /' conftest.$ac_ext >&5
7254
7255
7256fi
7257
7258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259 test "$ac_cv_c_int32_t" != no && break
7260 done
7261fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007262{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7263echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007264 case $ac_cv_c_int32_t in #(
7265 no|yes) ;; #(
7266 *)
7267
7268cat >>confdefs.h <<_ACEOF
7269#define int32_t $ac_cv_c_int32_t
7270_ACEOF
7271;;
7272 esac
7273
7274
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007275 { echo "$as_me:$LINENO: checking for int64_t" >&5
7276echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007277if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007278 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007279else
7280 ac_cv_c_int64_t=no
7281 for ac_type in 'int64_t' 'int' 'long int' \
7282 'long long int' 'short int' 'signed char'; do
7283 cat >conftest.$ac_ext <<_ACEOF
7284/* confdefs.h. */
7285_ACEOF
7286cat confdefs.h >>conftest.$ac_ext
7287cat >>conftest.$ac_ext <<_ACEOF
7288/* end confdefs.h. */
7289$ac_includes_default
7290int
7291main ()
7292{
7293static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7294test_array [0] = 0
7295
7296 ;
7297 return 0;
7298}
7299_ACEOF
7300rm -f conftest.$ac_objext
7301if { (ac_try="$ac_compile"
7302case "(($ac_try" in
7303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7304 *) ac_try_echo=$ac_try;;
7305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007307 (eval "$ac_compile") 2>conftest.er1
7308 ac_status=$?
7309 grep -v '^ *+' conftest.er1 >conftest.err
7310 rm -f conftest.er1
7311 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007313 (exit $ac_status); } && {
7314 test -z "$ac_c_werror_flag" ||
7315 test ! -s conftest.err
7316 } && test -s conftest.$ac_objext; then
7317 cat >conftest.$ac_ext <<_ACEOF
7318/* confdefs.h. */
7319_ACEOF
7320cat confdefs.h >>conftest.$ac_ext
7321cat >>conftest.$ac_ext <<_ACEOF
7322/* end confdefs.h. */
7323$ac_includes_default
7324int
7325main ()
7326{
7327static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007328 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007329test_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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 :
7353else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007354 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007355sed 's/^/| /' conftest.$ac_ext >&5
7356
7357 case $ac_type in
7358 int64_t) ac_cv_c_int64_t=yes ;;
7359 *) ac_cv_c_int64_t=$ac_type ;;
7360esac
7361
7362fi
7363
7364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007366 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007367sed 's/^/| /' conftest.$ac_ext >&5
7368
7369
7370fi
7371
7372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7373 test "$ac_cv_c_int64_t" != no && break
7374 done
7375fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007376{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7377echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007378 case $ac_cv_c_int64_t in #(
7379 no|yes) ;; #(
7380 *)
7381
7382cat >>confdefs.h <<_ACEOF
7383#define int64_t $ac_cv_c_int64_t
7384_ACEOF
7385;;
7386 esac
7387
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007388{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7389echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007390if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007392else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007393 cat >conftest.$ac_ext <<_ACEOF
7394/* confdefs.h. */
7395_ACEOF
7396cat confdefs.h >>conftest.$ac_ext
7397cat >>conftest.$ac_ext <<_ACEOF
7398/* end confdefs.h. */
7399$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007400typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007401int
7402main ()
7403{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007404if ((ac__type_new_ *) 0)
7405 return 0;
7406if (sizeof (ac__type_new_))
7407 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007408 ;
7409 return 0;
7410}
7411_ACEOF
7412rm -f conftest.$ac_objext
7413if { (ac_try="$ac_compile"
7414case "(($ac_try" in
7415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7416 *) ac_try_echo=$ac_try;;
7417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007419 (eval "$ac_compile") 2>conftest.er1
7420 ac_status=$?
7421 grep -v '^ *+' conftest.er1 >conftest.err
7422 rm -f conftest.er1
7423 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007425 (exit $ac_status); } && {
7426 test -z "$ac_c_werror_flag" ||
7427 test ! -s conftest.err
7428 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007429 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007430else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007431 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007432sed 's/^/| /' conftest.$ac_ext >&5
7433
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007434 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007436
7437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007438fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007439{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7440echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7441if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007442
7443cat >>confdefs.h <<\_ACEOF
7444#define HAVE_SSIZE_T 1
7445_ACEOF
7446
7447fi
7448
Jack Jansendd19cf82001-12-06 22:36:17 +00007449
Michael W. Hudson54241132001-12-07 15:38:26 +00007450# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007451# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007452{ echo "$as_me:$LINENO: checking for int" >&5
7453echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7454if test "${ac_cv_type_int+set}" = set; then
7455 echo $ECHO_N "(cached) $ECHO_C" >&6
7456else
7457 cat >conftest.$ac_ext <<_ACEOF
7458/* confdefs.h. */
7459_ACEOF
7460cat confdefs.h >>conftest.$ac_ext
7461cat >>conftest.$ac_ext <<_ACEOF
7462/* end confdefs.h. */
7463$ac_includes_default
7464typedef int ac__type_new_;
7465int
7466main ()
7467{
7468if ((ac__type_new_ *) 0)
7469 return 0;
7470if (sizeof (ac__type_new_))
7471 return 0;
7472 ;
7473 return 0;
7474}
7475_ACEOF
7476rm -f conftest.$ac_objext
7477if { (ac_try="$ac_compile"
7478case "(($ac_try" in
7479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7480 *) ac_try_echo=$ac_try;;
7481esac
7482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7483 (eval "$ac_compile") 2>conftest.er1
7484 ac_status=$?
7485 grep -v '^ *+' conftest.er1 >conftest.err
7486 rm -f conftest.er1
7487 cat conftest.err >&5
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); } && {
7490 test -z "$ac_c_werror_flag" ||
7491 test ! -s conftest.err
7492 } && test -s conftest.$ac_objext; then
7493 ac_cv_type_int=yes
7494else
7495 echo "$as_me: failed program was:" >&5
7496sed 's/^/| /' conftest.$ac_ext >&5
7497
7498 ac_cv_type_int=no
7499fi
7500
7501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7502fi
7503{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7504echo "${ECHO_T}$ac_cv_type_int" >&6; }
7505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007506# The cast to long int works around a bug in the HP C Compiler
7507# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7508# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7509# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007510{ echo "$as_me:$LINENO: checking size of int" >&5
7511echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007512if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007513 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007514else
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 if test "$cross_compiling" = yes; then
7516 # Depending upon the size, compute the lo and hi bounds.
7517cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007518/* confdefs.h. */
7519_ACEOF
7520cat confdefs.h >>conftest.$ac_ext
7521cat >>conftest.$ac_ext <<_ACEOF
7522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007523$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007524 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007525int
7526main ()
7527{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007528static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007529test_array [0] = 0
7530
7531 ;
7532 return 0;
7533}
7534_ACEOF
7535rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007536if { (ac_try="$ac_compile"
7537case "(($ac_try" in
7538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7539 *) ac_try_echo=$ac_try;;
7540esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007544 grep -v '^ *+' conftest.er1 >conftest.err
7545 rm -f conftest.er1
7546 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007548 (exit $ac_status); } && {
7549 test -z "$ac_c_werror_flag" ||
7550 test ! -s conftest.err
7551 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007552 ac_lo=0 ac_mid=0
7553 while :; do
7554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007555/* confdefs.h. */
7556_ACEOF
7557cat confdefs.h >>conftest.$ac_ext
7558cat >>conftest.$ac_ext <<_ACEOF
7559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007560$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007561 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007562int
7563main ()
7564{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007566test_array [0] = 0
7567
7568 ;
7569 return 0;
7570}
7571_ACEOF
7572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007573if { (ac_try="$ac_compile"
7574case "(($ac_try" in
7575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7576 *) ac_try_echo=$ac_try;;
7577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007581 grep -v '^ *+' conftest.er1 >conftest.err
7582 rm -f conftest.er1
7583 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585 (exit $ac_status); } && {
7586 test -z "$ac_c_werror_flag" ||
7587 test ! -s conftest.err
7588 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 ac_hi=$ac_mid; break
7590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007592sed 's/^/| /' conftest.$ac_ext >&5
7593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007594 ac_lo=`expr $ac_mid + 1`
7595 if test $ac_lo -le $ac_mid; then
7596 ac_lo= ac_hi=
7597 break
7598 fi
7599 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007601
7602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007603 done
7604else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007606sed 's/^/| /' conftest.$ac_ext >&5
7607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007609/* confdefs.h. */
7610_ACEOF
7611cat confdefs.h >>conftest.$ac_ext
7612cat >>conftest.$ac_ext <<_ACEOF
7613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007614$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007615 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007616int
7617main ()
7618{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007619static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007620test_array [0] = 0
7621
7622 ;
7623 return 0;
7624}
7625_ACEOF
7626rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007627if { (ac_try="$ac_compile"
7628case "(($ac_try" in
7629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7630 *) ac_try_echo=$ac_try;;
7631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007635 grep -v '^ *+' conftest.er1 >conftest.err
7636 rm -f conftest.er1
7637 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639 (exit $ac_status); } && {
7640 test -z "$ac_c_werror_flag" ||
7641 test ! -s conftest.err
7642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007643 ac_hi=-1 ac_mid=-1
7644 while :; do
7645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007646/* confdefs.h. */
7647_ACEOF
7648cat confdefs.h >>conftest.$ac_ext
7649cat >>conftest.$ac_ext <<_ACEOF
7650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007651$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007652 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007653int
7654main ()
7655{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007657test_array [0] = 0
7658
7659 ;
7660 return 0;
7661}
7662_ACEOF
7663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664if { (ac_try="$ac_compile"
7665case "(($ac_try" in
7666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7667 *) ac_try_echo=$ac_try;;
7668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007672 grep -v '^ *+' conftest.er1 >conftest.err
7673 rm -f conftest.er1
7674 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676 (exit $ac_status); } && {
7677 test -z "$ac_c_werror_flag" ||
7678 test ! -s conftest.err
7679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007680 ac_lo=$ac_mid; break
7681else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007683sed 's/^/| /' conftest.$ac_ext >&5
7684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685 ac_hi=`expr '(' $ac_mid ')' - 1`
7686 if test $ac_mid -le $ac_hi; then
7687 ac_lo= ac_hi=
7688 break
7689 fi
7690 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007692
7693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007694 done
7695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007697sed 's/^/| /' conftest.$ac_ext >&5
7698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701
7702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704
7705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007706# Binary search between lo and hi bounds.
7707while test "x$ac_lo" != "x$ac_hi"; do
7708 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007710/* confdefs.h. */
7711_ACEOF
7712cat confdefs.h >>conftest.$ac_ext
7713cat >>conftest.$ac_ext <<_ACEOF
7714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007715$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007716 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007717int
7718main ()
7719{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007721test_array [0] = 0
7722
7723 ;
7724 return 0;
7725}
7726_ACEOF
7727rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728if { (ac_try="$ac_compile"
7729case "(($ac_try" in
7730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7731 *) ac_try_echo=$ac_try;;
7732esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007736 grep -v '^ *+' conftest.er1 >conftest.err
7737 rm -f conftest.er1
7738 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740 (exit $ac_status); } && {
7741 test -z "$ac_c_werror_flag" ||
7742 test ! -s conftest.err
7743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 ac_hi=$ac_mid
7745else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007747sed 's/^/| /' conftest.$ac_ext >&5
7748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751
7752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007753done
7754case $ac_lo in
7755?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007757 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007758See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007759echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007760See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007761 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762 else
7763 ac_cv_sizeof_int=0
7764 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007765esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007766else
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007768/* confdefs.h. */
7769_ACEOF
7770cat confdefs.h >>conftest.$ac_ext
7771cat >>conftest.$ac_ext <<_ACEOF
7772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007773$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007774 typedef int ac__type_sizeof_;
7775static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7776static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007777#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007778#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007779int
7780main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007781{
Martin v. Löwis11437992002-04-12 09:54:03 +00007782
7783 FILE *f = fopen ("conftest.val", "w");
7784 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007786 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007789 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007791 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 }
7793 else
7794 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007796 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007798 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007801
7802 ;
7803 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007804}
Martin v. Löwis11437992002-04-12 09:54:03 +00007805_ACEOF
7806rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807if { (ac_try="$ac_link"
7808case "(($ac_try" in
7809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7810 *) ac_try_echo=$ac_try;;
7811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 { (case "(($ac_try" in
7818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7819 *) ac_try_echo=$ac_try;;
7820esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007825 (exit $ac_status); }; }; then
7826 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007827else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007828 echo "$as_me: program exited with status $ac_status" >&5
7829echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007830sed 's/^/| /' conftest.$ac_ext >&5
7831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007834 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007835See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007836echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007837See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007838 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839 else
7840 ac_cv_sizeof_int=0
7841 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843rm -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 +00007844fi
7845rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007846fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007847{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7848echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849
7850
7851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007853#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007854_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007855
7856
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007857{ echo "$as_me:$LINENO: checking for long" >&5
7858echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7859if test "${ac_cv_type_long+set}" = set; then
7860 echo $ECHO_N "(cached) $ECHO_C" >&6
7861else
7862 cat >conftest.$ac_ext <<_ACEOF
7863/* confdefs.h. */
7864_ACEOF
7865cat confdefs.h >>conftest.$ac_ext
7866cat >>conftest.$ac_ext <<_ACEOF
7867/* end confdefs.h. */
7868$ac_includes_default
7869typedef long ac__type_new_;
7870int
7871main ()
7872{
7873if ((ac__type_new_ *) 0)
7874 return 0;
7875if (sizeof (ac__type_new_))
7876 return 0;
7877 ;
7878 return 0;
7879}
7880_ACEOF
7881rm -f conftest.$ac_objext
7882if { (ac_try="$ac_compile"
7883case "(($ac_try" in
7884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7885 *) ac_try_echo=$ac_try;;
7886esac
7887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7888 (eval "$ac_compile") 2>conftest.er1
7889 ac_status=$?
7890 grep -v '^ *+' conftest.er1 >conftest.err
7891 rm -f conftest.er1
7892 cat conftest.err >&5
7893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7894 (exit $ac_status); } && {
7895 test -z "$ac_c_werror_flag" ||
7896 test ! -s conftest.err
7897 } && test -s conftest.$ac_objext; then
7898 ac_cv_type_long=yes
7899else
7900 echo "$as_me: failed program was:" >&5
7901sed 's/^/| /' conftest.$ac_ext >&5
7902
7903 ac_cv_type_long=no
7904fi
7905
7906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7907fi
7908{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7909echo "${ECHO_T}$ac_cv_type_long" >&6; }
7910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007911# The cast to long int works around a bug in the HP C Compiler
7912# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7913# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7914# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007915{ echo "$as_me:$LINENO: checking size of long" >&5
7916echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007917if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007918 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007919else
Martin v. Löwis11437992002-04-12 09:54:03 +00007920 if test "$cross_compiling" = yes; then
7921 # Depending upon the size, compute the lo and hi bounds.
7922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007923/* confdefs.h. */
7924_ACEOF
7925cat confdefs.h >>conftest.$ac_ext
7926cat >>conftest.$ac_ext <<_ACEOF
7927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007928$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007929 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007930int
7931main ()
7932{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007933static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007934test_array [0] = 0
7935
7936 ;
7937 return 0;
7938}
7939_ACEOF
7940rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941if { (ac_try="$ac_compile"
7942case "(($ac_try" in
7943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7944 *) ac_try_echo=$ac_try;;
7945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007949 grep -v '^ *+' conftest.er1 >conftest.err
7950 rm -f conftest.er1
7951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953 (exit $ac_status); } && {
7954 test -z "$ac_c_werror_flag" ||
7955 test ! -s conftest.err
7956 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ac_lo=0 ac_mid=0
7958 while :; do
7959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007960/* confdefs.h. */
7961_ACEOF
7962cat confdefs.h >>conftest.$ac_ext
7963cat >>conftest.$ac_ext <<_ACEOF
7964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007965$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007966 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007967int
7968main ()
7969{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007970static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007971test_array [0] = 0
7972
7973 ;
7974 return 0;
7975}
7976_ACEOF
7977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978if { (ac_try="$ac_compile"
7979case "(($ac_try" in
7980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7981 *) ac_try_echo=$ac_try;;
7982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007986 grep -v '^ *+' conftest.er1 >conftest.err
7987 rm -f conftest.er1
7988 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990 (exit $ac_status); } && {
7991 test -z "$ac_c_werror_flag" ||
7992 test ! -s conftest.err
7993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 ac_hi=$ac_mid; break
7995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007997sed 's/^/| /' conftest.$ac_ext >&5
7998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999 ac_lo=`expr $ac_mid + 1`
8000 if test $ac_lo -le $ac_mid; then
8001 ac_lo= ac_hi=
8002 break
8003 fi
8004 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006
8007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008008 done
8009else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008011sed 's/^/| /' conftest.$ac_ext >&5
8012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008014/* confdefs.h. */
8015_ACEOF
8016cat confdefs.h >>conftest.$ac_ext
8017cat >>conftest.$ac_ext <<_ACEOF
8018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008019$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008020 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008021int
8022main ()
8023{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008024static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008025test_array [0] = 0
8026
8027 ;
8028 return 0;
8029}
8030_ACEOF
8031rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032if { (ac_try="$ac_compile"
8033case "(($ac_try" in
8034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8035 *) ac_try_echo=$ac_try;;
8036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008040 grep -v '^ *+' conftest.er1 >conftest.err
8041 rm -f conftest.er1
8042 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044 (exit $ac_status); } && {
8045 test -z "$ac_c_werror_flag" ||
8046 test ! -s conftest.err
8047 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 ac_hi=-1 ac_mid=-1
8049 while :; do
8050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008051/* confdefs.h. */
8052_ACEOF
8053cat confdefs.h >>conftest.$ac_ext
8054cat >>conftest.$ac_ext <<_ACEOF
8055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008056$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008057 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008058int
8059main ()
8060{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008062test_array [0] = 0
8063
8064 ;
8065 return 0;
8066}
8067_ACEOF
8068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069if { (ac_try="$ac_compile"
8070case "(($ac_try" in
8071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8072 *) ac_try_echo=$ac_try;;
8073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008077 grep -v '^ *+' conftest.er1 >conftest.err
8078 rm -f conftest.er1
8079 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081 (exit $ac_status); } && {
8082 test -z "$ac_c_werror_flag" ||
8083 test ! -s conftest.err
8084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008085 ac_lo=$ac_mid; break
8086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008088sed 's/^/| /' conftest.$ac_ext >&5
8089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008090 ac_hi=`expr '(' $ac_mid ')' - 1`
8091 if test $ac_mid -le $ac_hi; then
8092 ac_lo= ac_hi=
8093 break
8094 fi
8095 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097
8098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 done
8100else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008102sed 's/^/| /' conftest.$ac_ext >&5
8103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106
8107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109
8110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008111# Binary search between lo and hi bounds.
8112while test "x$ac_lo" != "x$ac_hi"; do
8113 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008115/* confdefs.h. */
8116_ACEOF
8117cat confdefs.h >>conftest.$ac_ext
8118cat >>conftest.$ac_ext <<_ACEOF
8119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008120$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008121 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008122int
8123main ()
8124{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008126test_array [0] = 0
8127
8128 ;
8129 return 0;
8130}
8131_ACEOF
8132rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133if { (ac_try="$ac_compile"
8134case "(($ac_try" in
8135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8136 *) ac_try_echo=$ac_try;;
8137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008141 grep -v '^ *+' conftest.er1 >conftest.err
8142 rm -f conftest.er1
8143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145 (exit $ac_status); } && {
8146 test -z "$ac_c_werror_flag" ||
8147 test ! -s conftest.err
8148 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 ac_hi=$ac_mid
8150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008152sed 's/^/| /' conftest.$ac_ext >&5
8153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008156
8157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008158done
8159case $ac_lo in
8160?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008162 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008163See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008164echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008165See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008166 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167 else
8168 ac_cv_sizeof_long=0
8169 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008170esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008171else
Martin v. Löwis11437992002-04-12 09:54:03 +00008172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008173/* confdefs.h. */
8174_ACEOF
8175cat confdefs.h >>conftest.$ac_ext
8176cat >>conftest.$ac_ext <<_ACEOF
8177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008178$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008179 typedef long ac__type_sizeof_;
8180static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8181static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008182#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008183#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008184int
8185main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008186{
Martin v. Löwis11437992002-04-12 09:54:03 +00008187
8188 FILE *f = fopen ("conftest.val", "w");
8189 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008191 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008192 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008193 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008194 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008195 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008196 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008197 }
8198 else
8199 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008201 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008203 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
8207 ;
8208 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008209}
Martin v. Löwis11437992002-04-12 09:54:03 +00008210_ACEOF
8211rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212if { (ac_try="$ac_link"
8213case "(($ac_try" in
8214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8215 *) ac_try_echo=$ac_try;;
8216esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 { (case "(($ac_try" in
8223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8224 *) ac_try_echo=$ac_try;;
8225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 (exit $ac_status); }; }; then
8231 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008232else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008233 echo "$as_me: program exited with status $ac_status" >&5
8234echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008235sed 's/^/| /' conftest.$ac_ext >&5
8236
Martin v. Löwis11437992002-04-12 09:54:03 +00008237( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008239 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008240See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008241echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008242See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008243 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 else
8245 ac_cv_sizeof_long=0
8246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248rm -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 +00008249fi
8250rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008251fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008252{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8253echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254
8255
8256
Martin v. Löwis11437992002-04-12 09:54:03 +00008257cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008258#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008259_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008260
8261
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008262{ echo "$as_me:$LINENO: checking for void *" >&5
8263echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8264if test "${ac_cv_type_void_p+set}" = set; then
8265 echo $ECHO_N "(cached) $ECHO_C" >&6
8266else
8267 cat >conftest.$ac_ext <<_ACEOF
8268/* confdefs.h. */
8269_ACEOF
8270cat confdefs.h >>conftest.$ac_ext
8271cat >>conftest.$ac_ext <<_ACEOF
8272/* end confdefs.h. */
8273$ac_includes_default
8274typedef void * ac__type_new_;
8275int
8276main ()
8277{
8278if ((ac__type_new_ *) 0)
8279 return 0;
8280if (sizeof (ac__type_new_))
8281 return 0;
8282 ;
8283 return 0;
8284}
8285_ACEOF
8286rm -f conftest.$ac_objext
8287if { (ac_try="$ac_compile"
8288case "(($ac_try" in
8289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8290 *) ac_try_echo=$ac_try;;
8291esac
8292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8293 (eval "$ac_compile") 2>conftest.er1
8294 ac_status=$?
8295 grep -v '^ *+' conftest.er1 >conftest.err
8296 rm -f conftest.er1
8297 cat conftest.err >&5
8298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8299 (exit $ac_status); } && {
8300 test -z "$ac_c_werror_flag" ||
8301 test ! -s conftest.err
8302 } && test -s conftest.$ac_objext; then
8303 ac_cv_type_void_p=yes
8304else
8305 echo "$as_me: failed program was:" >&5
8306sed 's/^/| /' conftest.$ac_ext >&5
8307
8308 ac_cv_type_void_p=no
8309fi
8310
8311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8312fi
8313{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8314echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316# The cast to long int works around a bug in the HP C Compiler
8317# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8318# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8319# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008320{ echo "$as_me:$LINENO: checking size of void *" >&5
8321echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008322if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008323 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008324else
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 if test "$cross_compiling" = yes; then
8326 # Depending upon the size, compute the lo and hi bounds.
8327cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008328/* confdefs.h. */
8329_ACEOF
8330cat confdefs.h >>conftest.$ac_ext
8331cat >>conftest.$ac_ext <<_ACEOF
8332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008333$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008334 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008335int
8336main ()
8337{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008338static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008339test_array [0] = 0
8340
8341 ;
8342 return 0;
8343}
8344_ACEOF
8345rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346if { (ac_try="$ac_compile"
8347case "(($ac_try" in
8348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8349 *) ac_try_echo=$ac_try;;
8350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008354 grep -v '^ *+' conftest.er1 >conftest.err
8355 rm -f conftest.er1
8356 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358 (exit $ac_status); } && {
8359 test -z "$ac_c_werror_flag" ||
8360 test ! -s conftest.err
8361 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008362 ac_lo=0 ac_mid=0
8363 while :; do
8364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008365/* confdefs.h. */
8366_ACEOF
8367cat confdefs.h >>conftest.$ac_ext
8368cat >>conftest.$ac_ext <<_ACEOF
8369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008370$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008371 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008372int
8373main ()
8374{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008376test_array [0] = 0
8377
8378 ;
8379 return 0;
8380}
8381_ACEOF
8382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008383if { (ac_try="$ac_compile"
8384case "(($ac_try" in
8385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8386 *) ac_try_echo=$ac_try;;
8387esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008391 grep -v '^ *+' conftest.er1 >conftest.err
8392 rm -f conftest.er1
8393 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395 (exit $ac_status); } && {
8396 test -z "$ac_c_werror_flag" ||
8397 test ! -s conftest.err
8398 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 ac_hi=$ac_mid; break
8400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008402sed 's/^/| /' conftest.$ac_ext >&5
8403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404 ac_lo=`expr $ac_mid + 1`
8405 if test $ac_lo -le $ac_mid; then
8406 ac_lo= ac_hi=
8407 break
8408 fi
8409 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411
8412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008413 done
8414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008416sed 's/^/| /' conftest.$ac_ext >&5
8417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008419/* confdefs.h. */
8420_ACEOF
8421cat confdefs.h >>conftest.$ac_ext
8422cat >>conftest.$ac_ext <<_ACEOF
8423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008424$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008425 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008426int
8427main ()
8428{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008429static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008430test_array [0] = 0
8431
8432 ;
8433 return 0;
8434}
8435_ACEOF
8436rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437if { (ac_try="$ac_compile"
8438case "(($ac_try" in
8439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8440 *) ac_try_echo=$ac_try;;
8441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008445 grep -v '^ *+' conftest.er1 >conftest.err
8446 rm -f conftest.er1
8447 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449 (exit $ac_status); } && {
8450 test -z "$ac_c_werror_flag" ||
8451 test ! -s conftest.err
8452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 ac_hi=-1 ac_mid=-1
8454 while :; do
8455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008456/* confdefs.h. */
8457_ACEOF
8458cat confdefs.h >>conftest.$ac_ext
8459cat >>conftest.$ac_ext <<_ACEOF
8460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008461$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008462 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008466static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008467test_array [0] = 0
8468
8469 ;
8470 return 0;
8471}
8472_ACEOF
8473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474if { (ac_try="$ac_compile"
8475case "(($ac_try" in
8476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8477 *) ac_try_echo=$ac_try;;
8478esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008482 grep -v '^ *+' conftest.er1 >conftest.err
8483 rm -f conftest.er1
8484 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486 (exit $ac_status); } && {
8487 test -z "$ac_c_werror_flag" ||
8488 test ! -s conftest.err
8489 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 ac_lo=$ac_mid; break
8491else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008493sed 's/^/| /' conftest.$ac_ext >&5
8494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495 ac_hi=`expr '(' $ac_mid ')' - 1`
8496 if test $ac_mid -le $ac_hi; then
8497 ac_lo= ac_hi=
8498 break
8499 fi
8500 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008502
8503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 done
8505else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008507sed 's/^/| /' conftest.$ac_ext >&5
8508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511
8512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516# Binary search between lo and hi bounds.
8517while test "x$ac_lo" != "x$ac_hi"; do
8518 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008520/* confdefs.h. */
8521_ACEOF
8522cat confdefs.h >>conftest.$ac_ext
8523cat >>conftest.$ac_ext <<_ACEOF
8524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008525$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008526 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008527int
8528main ()
8529{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008530static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008531test_array [0] = 0
8532
8533 ;
8534 return 0;
8535}
8536_ACEOF
8537rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538if { (ac_try="$ac_compile"
8539case "(($ac_try" in
8540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8541 *) ac_try_echo=$ac_try;;
8542esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008546 grep -v '^ *+' conftest.er1 >conftest.err
8547 rm -f conftest.er1
8548 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550 (exit $ac_status); } && {
8551 test -z "$ac_c_werror_flag" ||
8552 test ! -s conftest.err
8553 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ac_hi=$ac_mid
8555else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008557sed 's/^/| /' conftest.$ac_ext >&5
8558
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561
8562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008563done
8564case $ac_lo in
8565?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008567 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008568See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008569echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008570See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008571 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572 else
8573 ac_cv_sizeof_void_p=0
8574 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008575esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008576else
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008578/* confdefs.h. */
8579_ACEOF
8580cat confdefs.h >>conftest.$ac_ext
8581cat >>conftest.$ac_ext <<_ACEOF
8582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008583$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008584 typedef void * ac__type_sizeof_;
8585static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8586static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008587#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008588#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008589int
8590main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008591{
Martin v. Löwis11437992002-04-12 09:54:03 +00008592
8593 FILE *f = fopen ("conftest.val", "w");
8594 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008596 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008599 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008601 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008602 }
8603 else
8604 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008606 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008608 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008611
8612 ;
8613 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008614}
Martin v. Löwis11437992002-04-12 09:54:03 +00008615_ACEOF
8616rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617if { (ac_try="$ac_link"
8618case "(($ac_try" in
8619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8620 *) ac_try_echo=$ac_try;;
8621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 { (case "(($ac_try" in
8628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8629 *) ac_try_echo=$ac_try;;
8630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 (exit $ac_status); }; }; then
8636 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008637else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008638 echo "$as_me: program exited with status $ac_status" >&5
8639echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008640sed 's/^/| /' conftest.$ac_ext >&5
8641
Martin v. Löwis11437992002-04-12 09:54:03 +00008642( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008644 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008645See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008646echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008647See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008648 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649 else
8650 ac_cv_sizeof_void_p=0
8651 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653rm -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 +00008654fi
8655rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008656fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008657{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8658echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659
8660
8661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008663#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008664_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008665
8666
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008667{ echo "$as_me:$LINENO: checking for short" >&5
8668echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8669if test "${ac_cv_type_short+set}" = set; then
8670 echo $ECHO_N "(cached) $ECHO_C" >&6
8671else
8672 cat >conftest.$ac_ext <<_ACEOF
8673/* confdefs.h. */
8674_ACEOF
8675cat confdefs.h >>conftest.$ac_ext
8676cat >>conftest.$ac_ext <<_ACEOF
8677/* end confdefs.h. */
8678$ac_includes_default
8679typedef short ac__type_new_;
8680int
8681main ()
8682{
8683if ((ac__type_new_ *) 0)
8684 return 0;
8685if (sizeof (ac__type_new_))
8686 return 0;
8687 ;
8688 return 0;
8689}
8690_ACEOF
8691rm -f conftest.$ac_objext
8692if { (ac_try="$ac_compile"
8693case "(($ac_try" in
8694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8695 *) ac_try_echo=$ac_try;;
8696esac
8697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8698 (eval "$ac_compile") 2>conftest.er1
8699 ac_status=$?
8700 grep -v '^ *+' conftest.er1 >conftest.err
8701 rm -f conftest.er1
8702 cat conftest.err >&5
8703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8704 (exit $ac_status); } && {
8705 test -z "$ac_c_werror_flag" ||
8706 test ! -s conftest.err
8707 } && test -s conftest.$ac_objext; then
8708 ac_cv_type_short=yes
8709else
8710 echo "$as_me: failed program was:" >&5
8711sed 's/^/| /' conftest.$ac_ext >&5
8712
8713 ac_cv_type_short=no
8714fi
8715
8716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8717fi
8718{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8719echo "${ECHO_T}$ac_cv_type_short" >&6; }
8720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721# The cast to long int works around a bug in the HP C Compiler
8722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8724# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008725{ echo "$as_me:$LINENO: checking size of short" >&5
8726echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008727if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008728 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008729else
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 if test "$cross_compiling" = yes; then
8731 # Depending upon the size, compute the lo and hi bounds.
8732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008733/* confdefs.h. */
8734_ACEOF
8735cat confdefs.h >>conftest.$ac_ext
8736cat >>conftest.$ac_ext <<_ACEOF
8737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008738$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008739 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008740int
8741main ()
8742{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008743static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008744test_array [0] = 0
8745
8746 ;
8747 return 0;
8748}
8749_ACEOF
8750rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008751if { (ac_try="$ac_compile"
8752case "(($ac_try" in
8753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8754 *) ac_try_echo=$ac_try;;
8755esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008759 grep -v '^ *+' conftest.er1 >conftest.err
8760 rm -f conftest.er1
8761 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008763 (exit $ac_status); } && {
8764 test -z "$ac_c_werror_flag" ||
8765 test ! -s conftest.err
8766 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ac_lo=0 ac_mid=0
8768 while :; do
8769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008770/* confdefs.h. */
8771_ACEOF
8772cat confdefs.h >>conftest.$ac_ext
8773cat >>conftest.$ac_ext <<_ACEOF
8774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008775$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008776 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008777int
8778main ()
8779{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008781test_array [0] = 0
8782
8783 ;
8784 return 0;
8785}
8786_ACEOF
8787rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008788if { (ac_try="$ac_compile"
8789case "(($ac_try" in
8790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8791 *) ac_try_echo=$ac_try;;
8792esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008796 grep -v '^ *+' conftest.er1 >conftest.err
8797 rm -f conftest.er1
8798 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 (exit $ac_status); } && {
8801 test -z "$ac_c_werror_flag" ||
8802 test ! -s conftest.err
8803 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 ac_hi=$ac_mid; break
8805else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008807sed 's/^/| /' conftest.$ac_ext >&5
8808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809 ac_lo=`expr $ac_mid + 1`
8810 if test $ac_lo -le $ac_mid; then
8811 ac_lo= ac_hi=
8812 break
8813 fi
8814 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816
8817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 done
8819else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008821sed 's/^/| /' conftest.$ac_ext >&5
8822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008824/* confdefs.h. */
8825_ACEOF
8826cat confdefs.h >>conftest.$ac_ext
8827cat >>conftest.$ac_ext <<_ACEOF
8828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008829$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008830 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008831int
8832main ()
8833{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008835test_array [0] = 0
8836
8837 ;
8838 return 0;
8839}
8840_ACEOF
8841rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842if { (ac_try="$ac_compile"
8843case "(($ac_try" in
8844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8845 *) ac_try_echo=$ac_try;;
8846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008850 grep -v '^ *+' conftest.er1 >conftest.err
8851 rm -f conftest.er1
8852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854 (exit $ac_status); } && {
8855 test -z "$ac_c_werror_flag" ||
8856 test ! -s conftest.err
8857 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ac_hi=-1 ac_mid=-1
8859 while :; do
8860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008861/* confdefs.h. */
8862_ACEOF
8863cat confdefs.h >>conftest.$ac_ext
8864cat >>conftest.$ac_ext <<_ACEOF
8865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008866$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008867 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008868int
8869main ()
8870{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008872test_array [0] = 0
8873
8874 ;
8875 return 0;
8876}
8877_ACEOF
8878rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879if { (ac_try="$ac_compile"
8880case "(($ac_try" in
8881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8882 *) ac_try_echo=$ac_try;;
8883esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008887 grep -v '^ *+' conftest.er1 >conftest.err
8888 rm -f conftest.er1
8889 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891 (exit $ac_status); } && {
8892 test -z "$ac_c_werror_flag" ||
8893 test ! -s conftest.err
8894 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ac_lo=$ac_mid; break
8896else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008898sed 's/^/| /' conftest.$ac_ext >&5
8899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900 ac_hi=`expr '(' $ac_mid ')' - 1`
8901 if test $ac_mid -le $ac_hi; then
8902 ac_lo= ac_hi=
8903 break
8904 fi
8905 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907
8908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 done
8910else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008912sed 's/^/| /' conftest.$ac_ext >&5
8913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916
8917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919
8920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008921# Binary search between lo and hi bounds.
8922while test "x$ac_lo" != "x$ac_hi"; do
8923 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8924 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008925/* confdefs.h. */
8926_ACEOF
8927cat confdefs.h >>conftest.$ac_ext
8928cat >>conftest.$ac_ext <<_ACEOF
8929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008930$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008931 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
8934{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008935static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008936test_array [0] = 0
8937
8938 ;
8939 return 0;
8940}
8941_ACEOF
8942rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943if { (ac_try="$ac_compile"
8944case "(($ac_try" in
8945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8946 *) ac_try_echo=$ac_try;;
8947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008951 grep -v '^ *+' conftest.er1 >conftest.err
8952 rm -f conftest.er1
8953 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955 (exit $ac_status); } && {
8956 test -z "$ac_c_werror_flag" ||
8957 test ! -s conftest.err
8958 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 ac_hi=$ac_mid
8960else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008962sed 's/^/| /' conftest.$ac_ext >&5
8963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966
8967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008968done
8969case $ac_lo in
8970?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008972 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008973See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008974echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008975See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008976 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977 else
8978 ac_cv_sizeof_short=0
8979 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008980esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008981else
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008983/* confdefs.h. */
8984_ACEOF
8985cat confdefs.h >>conftest.$ac_ext
8986cat >>conftest.$ac_ext <<_ACEOF
8987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008988$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008989 typedef short ac__type_sizeof_;
8990static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8991static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008992#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008993#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008994int
8995main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008996{
Martin v. Löwis11437992002-04-12 09:54:03 +00008997
8998 FILE *f = fopen ("conftest.val", "w");
8999 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009001 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009004 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009005 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009006 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 }
9008 else
9009 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009011 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009013 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
9017 ;
9018 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009019}
Martin v. Löwis11437992002-04-12 09:54:03 +00009020_ACEOF
9021rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022if { (ac_try="$ac_link"
9023case "(($ac_try" in
9024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9025 *) ac_try_echo=$ac_try;;
9026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009028 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032 { (case "(($ac_try" in
9033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9034 *) ac_try_echo=$ac_try;;
9035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 (exit $ac_status); }; }; then
9041 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009042else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009043 echo "$as_me: program exited with status $ac_status" >&5
9044echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009045sed 's/^/| /' conftest.$ac_ext >&5
9046
Martin v. Löwis11437992002-04-12 09:54:03 +00009047( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009048if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009049 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009050See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009051echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009052See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009053 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009054 else
9055 ac_cv_sizeof_short=0
9056 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009058rm -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 +00009059fi
9060rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009061fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009062{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9063echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009064
9065
9066
Martin v. Löwis11437992002-04-12 09:54:03 +00009067cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009068#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009069_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009070
9071
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009072{ echo "$as_me:$LINENO: checking for float" >&5
9073echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9074if test "${ac_cv_type_float+set}" = set; then
9075 echo $ECHO_N "(cached) $ECHO_C" >&6
9076else
9077 cat >conftest.$ac_ext <<_ACEOF
9078/* confdefs.h. */
9079_ACEOF
9080cat confdefs.h >>conftest.$ac_ext
9081cat >>conftest.$ac_ext <<_ACEOF
9082/* end confdefs.h. */
9083$ac_includes_default
9084typedef float ac__type_new_;
9085int
9086main ()
9087{
9088if ((ac__type_new_ *) 0)
9089 return 0;
9090if (sizeof (ac__type_new_))
9091 return 0;
9092 ;
9093 return 0;
9094}
9095_ACEOF
9096rm -f conftest.$ac_objext
9097if { (ac_try="$ac_compile"
9098case "(($ac_try" in
9099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9100 *) ac_try_echo=$ac_try;;
9101esac
9102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9103 (eval "$ac_compile") 2>conftest.er1
9104 ac_status=$?
9105 grep -v '^ *+' conftest.er1 >conftest.err
9106 rm -f conftest.er1
9107 cat conftest.err >&5
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); } && {
9110 test -z "$ac_c_werror_flag" ||
9111 test ! -s conftest.err
9112 } && test -s conftest.$ac_objext; then
9113 ac_cv_type_float=yes
9114else
9115 echo "$as_me: failed program was:" >&5
9116sed 's/^/| /' conftest.$ac_ext >&5
9117
9118 ac_cv_type_float=no
9119fi
9120
9121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9122fi
9123{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9124echo "${ECHO_T}$ac_cv_type_float" >&6; }
9125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009126# The cast to long int works around a bug in the HP C Compiler
9127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9129# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009130{ echo "$as_me:$LINENO: checking size of float" >&5
9131echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009132if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009133 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009134else
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 if test "$cross_compiling" = yes; then
9136 # Depending upon the size, compute the lo and hi bounds.
9137cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009138/* confdefs.h. */
9139_ACEOF
9140cat confdefs.h >>conftest.$ac_ext
9141cat >>conftest.$ac_ext <<_ACEOF
9142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009143$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009144 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009145int
9146main ()
9147{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009148static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009149test_array [0] = 0
9150
9151 ;
9152 return 0;
9153}
9154_ACEOF
9155rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009156if { (ac_try="$ac_compile"
9157case "(($ac_try" in
9158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9159 *) ac_try_echo=$ac_try;;
9160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009164 grep -v '^ *+' conftest.er1 >conftest.err
9165 rm -f conftest.er1
9166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168 (exit $ac_status); } && {
9169 test -z "$ac_c_werror_flag" ||
9170 test ! -s conftest.err
9171 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 ac_lo=0 ac_mid=0
9173 while :; do
9174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009175/* confdefs.h. */
9176_ACEOF
9177cat confdefs.h >>conftest.$ac_ext
9178cat >>conftest.$ac_ext <<_ACEOF
9179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009180$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009181 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009182int
9183main ()
9184{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009185static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009186test_array [0] = 0
9187
9188 ;
9189 return 0;
9190}
9191_ACEOF
9192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009193if { (ac_try="$ac_compile"
9194case "(($ac_try" in
9195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9196 *) ac_try_echo=$ac_try;;
9197esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009201 grep -v '^ *+' conftest.er1 >conftest.err
9202 rm -f conftest.er1
9203 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205 (exit $ac_status); } && {
9206 test -z "$ac_c_werror_flag" ||
9207 test ! -s conftest.err
9208 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 ac_hi=$ac_mid; break
9210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009212sed 's/^/| /' conftest.$ac_ext >&5
9213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009214 ac_lo=`expr $ac_mid + 1`
9215 if test $ac_lo -le $ac_mid; then
9216 ac_lo= ac_hi=
9217 break
9218 fi
9219 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009221
9222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009223 done
9224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009226sed 's/^/| /' conftest.$ac_ext >&5
9227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009229/* confdefs.h. */
9230_ACEOF
9231cat confdefs.h >>conftest.$ac_ext
9232cat >>conftest.$ac_ext <<_ACEOF
9233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009234$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009235 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009236int
9237main ()
9238{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009239static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009240test_array [0] = 0
9241
9242 ;
9243 return 0;
9244}
9245_ACEOF
9246rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009247if { (ac_try="$ac_compile"
9248case "(($ac_try" in
9249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9250 *) ac_try_echo=$ac_try;;
9251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009255 grep -v '^ *+' conftest.er1 >conftest.err
9256 rm -f conftest.er1
9257 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259 (exit $ac_status); } && {
9260 test -z "$ac_c_werror_flag" ||
9261 test ! -s conftest.err
9262 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 ac_hi=-1 ac_mid=-1
9264 while :; do
9265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009266/* confdefs.h. */
9267_ACEOF
9268cat confdefs.h >>conftest.$ac_ext
9269cat >>conftest.$ac_ext <<_ACEOF
9270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009271$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009272 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009273int
9274main ()
9275{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009276static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009277test_array [0] = 0
9278
9279 ;
9280 return 0;
9281}
9282_ACEOF
9283rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009284if { (ac_try="$ac_compile"
9285case "(($ac_try" in
9286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9287 *) ac_try_echo=$ac_try;;
9288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009292 grep -v '^ *+' conftest.er1 >conftest.err
9293 rm -f conftest.er1
9294 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296 (exit $ac_status); } && {
9297 test -z "$ac_c_werror_flag" ||
9298 test ! -s conftest.err
9299 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 ac_lo=$ac_mid; break
9301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009303sed 's/^/| /' conftest.$ac_ext >&5
9304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009305 ac_hi=`expr '(' $ac_mid ')' - 1`
9306 if test $ac_mid -le $ac_hi; then
9307 ac_lo= ac_hi=
9308 break
9309 fi
9310 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312
9313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 done
9315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009317sed 's/^/| /' conftest.$ac_ext >&5
9318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321
9322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324
9325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009326# Binary search between lo and hi bounds.
9327while test "x$ac_lo" != "x$ac_hi"; do
9328 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9329 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009330/* confdefs.h. */
9331_ACEOF
9332cat confdefs.h >>conftest.$ac_ext
9333cat >>conftest.$ac_ext <<_ACEOF
9334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009335$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009336 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009337int
9338main ()
9339{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009340static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009341test_array [0] = 0
9342
9343 ;
9344 return 0;
9345}
9346_ACEOF
9347rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009348if { (ac_try="$ac_compile"
9349case "(($ac_try" in
9350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9351 *) ac_try_echo=$ac_try;;
9352esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009356 grep -v '^ *+' conftest.er1 >conftest.err
9357 rm -f conftest.er1
9358 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360 (exit $ac_status); } && {
9361 test -z "$ac_c_werror_flag" ||
9362 test ! -s conftest.err
9363 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 ac_hi=$ac_mid
9365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009367sed 's/^/| /' conftest.$ac_ext >&5
9368
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371
9372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009373done
9374case $ac_lo in
9375?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009376'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009377 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009378See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009379echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009380See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009381 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009382 else
9383 ac_cv_sizeof_float=0
9384 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009385esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009386else
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009388/* confdefs.h. */
9389_ACEOF
9390cat confdefs.h >>conftest.$ac_ext
9391cat >>conftest.$ac_ext <<_ACEOF
9392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009393$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009394 typedef float ac__type_sizeof_;
9395static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9396static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009397#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009398#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009399int
9400main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009401{
Martin v. Löwis11437992002-04-12 09:54:03 +00009402
9403 FILE *f = fopen ("conftest.val", "w");
9404 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009406 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009407 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009409 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009411 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009412 }
9413 else
9414 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009416 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009418 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009421
9422 ;
9423 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009424}
Martin v. Löwis11437992002-04-12 09:54:03 +00009425_ACEOF
9426rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427if { (ac_try="$ac_link"
9428case "(($ac_try" in
9429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9430 *) ac_try_echo=$ac_try;;
9431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437 { (case "(($ac_try" in
9438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9439 *) ac_try_echo=$ac_try;;
9440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 (exit $ac_status); }; }; then
9446 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009447else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009448 echo "$as_me: program exited with status $ac_status" >&5
9449echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009450sed 's/^/| /' conftest.$ac_ext >&5
9451
Martin v. Löwis11437992002-04-12 09:54:03 +00009452( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009455See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009456echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009457See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009458 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459 else
9460 ac_cv_sizeof_float=0
9461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463rm -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 +00009464fi
9465rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009466fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009467{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9468echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469
9470
9471
Martin v. Löwis11437992002-04-12 09:54:03 +00009472cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009473#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009474_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009475
9476
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009477{ echo "$as_me:$LINENO: checking for double" >&5
9478echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9479if test "${ac_cv_type_double+set}" = set; then
9480 echo $ECHO_N "(cached) $ECHO_C" >&6
9481else
9482 cat >conftest.$ac_ext <<_ACEOF
9483/* confdefs.h. */
9484_ACEOF
9485cat confdefs.h >>conftest.$ac_ext
9486cat >>conftest.$ac_ext <<_ACEOF
9487/* end confdefs.h. */
9488$ac_includes_default
9489typedef double ac__type_new_;
9490int
9491main ()
9492{
9493if ((ac__type_new_ *) 0)
9494 return 0;
9495if (sizeof (ac__type_new_))
9496 return 0;
9497 ;
9498 return 0;
9499}
9500_ACEOF
9501rm -f conftest.$ac_objext
9502if { (ac_try="$ac_compile"
9503case "(($ac_try" in
9504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9505 *) ac_try_echo=$ac_try;;
9506esac
9507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9508 (eval "$ac_compile") 2>conftest.er1
9509 ac_status=$?
9510 grep -v '^ *+' conftest.er1 >conftest.err
9511 rm -f conftest.er1
9512 cat conftest.err >&5
9513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9514 (exit $ac_status); } && {
9515 test -z "$ac_c_werror_flag" ||
9516 test ! -s conftest.err
9517 } && test -s conftest.$ac_objext; then
9518 ac_cv_type_double=yes
9519else
9520 echo "$as_me: failed program was:" >&5
9521sed 's/^/| /' conftest.$ac_ext >&5
9522
9523 ac_cv_type_double=no
9524fi
9525
9526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9527fi
9528{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9529echo "${ECHO_T}$ac_cv_type_double" >&6; }
9530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531# The cast to long int works around a bug in the HP C Compiler
9532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9534# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009535{ echo "$as_me:$LINENO: checking size of double" >&5
9536echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009537if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009538 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009539else
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 if test "$cross_compiling" = yes; then
9541 # Depending upon the size, compute the lo and hi bounds.
9542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* confdefs.h. */
9544_ACEOF
9545cat confdefs.h >>conftest.$ac_ext
9546cat >>conftest.$ac_ext <<_ACEOF
9547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009548$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009549 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009550int
9551main ()
9552{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009553static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009554test_array [0] = 0
9555
9556 ;
9557 return 0;
9558}
9559_ACEOF
9560rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561if { (ac_try="$ac_compile"
9562case "(($ac_try" in
9563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9564 *) ac_try_echo=$ac_try;;
9565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009569 grep -v '^ *+' conftest.er1 >conftest.err
9570 rm -f conftest.er1
9571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573 (exit $ac_status); } && {
9574 test -z "$ac_c_werror_flag" ||
9575 test ! -s conftest.err
9576 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009577 ac_lo=0 ac_mid=0
9578 while :; do
9579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009580/* confdefs.h. */
9581_ACEOF
9582cat confdefs.h >>conftest.$ac_ext
9583cat >>conftest.$ac_ext <<_ACEOF
9584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009585$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009586 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009587int
9588main ()
9589{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009590static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009591test_array [0] = 0
9592
9593 ;
9594 return 0;
9595}
9596_ACEOF
9597rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598if { (ac_try="$ac_compile"
9599case "(($ac_try" in
9600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9601 *) ac_try_echo=$ac_try;;
9602esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009606 grep -v '^ *+' conftest.er1 >conftest.err
9607 rm -f conftest.er1
9608 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610 (exit $ac_status); } && {
9611 test -z "$ac_c_werror_flag" ||
9612 test ! -s conftest.err
9613 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 ac_hi=$ac_mid; break
9615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009617sed 's/^/| /' conftest.$ac_ext >&5
9618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009619 ac_lo=`expr $ac_mid + 1`
9620 if test $ac_lo -le $ac_mid; then
9621 ac_lo= ac_hi=
9622 break
9623 fi
9624 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009626
9627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 done
9629else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009631sed 's/^/| /' conftest.$ac_ext >&5
9632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009634/* confdefs.h. */
9635_ACEOF
9636cat confdefs.h >>conftest.$ac_ext
9637cat >>conftest.$ac_ext <<_ACEOF
9638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009639$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009640 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009641int
9642main ()
9643{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009644static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009645test_array [0] = 0
9646
9647 ;
9648 return 0;
9649}
9650_ACEOF
9651rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652if { (ac_try="$ac_compile"
9653case "(($ac_try" in
9654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9655 *) ac_try_echo=$ac_try;;
9656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009660 grep -v '^ *+' conftest.er1 >conftest.err
9661 rm -f conftest.er1
9662 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664 (exit $ac_status); } && {
9665 test -z "$ac_c_werror_flag" ||
9666 test ! -s conftest.err
9667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_hi=-1 ac_mid=-1
9669 while :; do
9670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009671/* confdefs.h. */
9672_ACEOF
9673cat confdefs.h >>conftest.$ac_ext
9674cat >>conftest.$ac_ext <<_ACEOF
9675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009676$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009677 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009678int
9679main ()
9680{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009681static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009682test_array [0] = 0
9683
9684 ;
9685 return 0;
9686}
9687_ACEOF
9688rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689if { (ac_try="$ac_compile"
9690case "(($ac_try" in
9691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9692 *) ac_try_echo=$ac_try;;
9693esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009697 grep -v '^ *+' conftest.er1 >conftest.err
9698 rm -f conftest.er1
9699 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701 (exit $ac_status); } && {
9702 test -z "$ac_c_werror_flag" ||
9703 test ! -s conftest.err
9704 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 ac_lo=$ac_mid; break
9706else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009708sed 's/^/| /' conftest.$ac_ext >&5
9709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710 ac_hi=`expr '(' $ac_mid ')' - 1`
9711 if test $ac_mid -le $ac_hi; then
9712 ac_lo= ac_hi=
9713 break
9714 fi
9715 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717
9718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 done
9720else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009722sed 's/^/| /' conftest.$ac_ext >&5
9723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726
9727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729
9730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009731# Binary search between lo and hi bounds.
9732while test "x$ac_lo" != "x$ac_hi"; do
9733 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009735/* confdefs.h. */
9736_ACEOF
9737cat confdefs.h >>conftest.$ac_ext
9738cat >>conftest.$ac_ext <<_ACEOF
9739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009740$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009741 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009742int
9743main ()
9744{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009745static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009746test_array [0] = 0
9747
9748 ;
9749 return 0;
9750}
9751_ACEOF
9752rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753if { (ac_try="$ac_compile"
9754case "(($ac_try" in
9755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9756 *) ac_try_echo=$ac_try;;
9757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009761 grep -v '^ *+' conftest.er1 >conftest.err
9762 rm -f conftest.er1
9763 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765 (exit $ac_status); } && {
9766 test -z "$ac_c_werror_flag" ||
9767 test ! -s conftest.err
9768 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ac_hi=$ac_mid
9770else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009772sed 's/^/| /' conftest.$ac_ext >&5
9773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776
9777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009778done
9779case $ac_lo in
9780?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009782 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009783See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009784echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009785See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009786 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787 else
9788 ac_cv_sizeof_double=0
9789 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009790esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009791else
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009793/* confdefs.h. */
9794_ACEOF
9795cat confdefs.h >>conftest.$ac_ext
9796cat >>conftest.$ac_ext <<_ACEOF
9797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009798$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009799 typedef double ac__type_sizeof_;
9800static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9801static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009802#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009803#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009804int
9805main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009806{
Martin v. Löwis11437992002-04-12 09:54:03 +00009807
9808 FILE *f = fopen ("conftest.val", "w");
9809 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009811 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009814 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009816 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 }
9818 else
9819 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009821 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009823 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009826
9827 ;
9828 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009829}
Martin v. Löwis11437992002-04-12 09:54:03 +00009830_ACEOF
9831rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832if { (ac_try="$ac_link"
9833case "(($ac_try" in
9834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9835 *) ac_try_echo=$ac_try;;
9836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842 { (case "(($ac_try" in
9843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9844 *) ac_try_echo=$ac_try;;
9845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 (exit $ac_status); }; }; then
9851 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009853 echo "$as_me: program exited with status $ac_status" >&5
9854echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009855sed 's/^/| /' conftest.$ac_ext >&5
9856
Martin v. Löwis11437992002-04-12 09:54:03 +00009857( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009859 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009860See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009861echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009862See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009863 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864 else
9865 ac_cv_sizeof_double=0
9866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868rm -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 +00009869fi
9870rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009871fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009872{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9873echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874
9875
9876
Martin v. Löwis11437992002-04-12 09:54:03 +00009877cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009878#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009879_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009880
9881
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009882{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9883echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9884if test "${ac_cv_type_fpos_t+set}" = set; then
9885 echo $ECHO_N "(cached) $ECHO_C" >&6
9886else
9887 cat >conftest.$ac_ext <<_ACEOF
9888/* confdefs.h. */
9889_ACEOF
9890cat confdefs.h >>conftest.$ac_ext
9891cat >>conftest.$ac_ext <<_ACEOF
9892/* end confdefs.h. */
9893$ac_includes_default
9894typedef fpos_t ac__type_new_;
9895int
9896main ()
9897{
9898if ((ac__type_new_ *) 0)
9899 return 0;
9900if (sizeof (ac__type_new_))
9901 return 0;
9902 ;
9903 return 0;
9904}
9905_ACEOF
9906rm -f conftest.$ac_objext
9907if { (ac_try="$ac_compile"
9908case "(($ac_try" in
9909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9910 *) ac_try_echo=$ac_try;;
9911esac
9912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9913 (eval "$ac_compile") 2>conftest.er1
9914 ac_status=$?
9915 grep -v '^ *+' conftest.er1 >conftest.err
9916 rm -f conftest.er1
9917 cat conftest.err >&5
9918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919 (exit $ac_status); } && {
9920 test -z "$ac_c_werror_flag" ||
9921 test ! -s conftest.err
9922 } && test -s conftest.$ac_objext; then
9923 ac_cv_type_fpos_t=yes
9924else
9925 echo "$as_me: failed program was:" >&5
9926sed 's/^/| /' conftest.$ac_ext >&5
9927
9928 ac_cv_type_fpos_t=no
9929fi
9930
9931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9932fi
9933{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9934echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936# The cast to long int works around a bug in the HP C Compiler
9937# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9938# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9939# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009940{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9941echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009942if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009943 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009944else
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 if test "$cross_compiling" = yes; then
9946 # Depending upon the size, compute the lo and hi bounds.
9947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009948/* confdefs.h. */
9949_ACEOF
9950cat confdefs.h >>conftest.$ac_ext
9951cat >>conftest.$ac_ext <<_ACEOF
9952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009953$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009954 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009955int
9956main ()
9957{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009958static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009959test_array [0] = 0
9960
9961 ;
9962 return 0;
9963}
9964_ACEOF
9965rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009966if { (ac_try="$ac_compile"
9967case "(($ac_try" in
9968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9969 *) ac_try_echo=$ac_try;;
9970esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009974 grep -v '^ *+' conftest.er1 >conftest.err
9975 rm -f conftest.er1
9976 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978 (exit $ac_status); } && {
9979 test -z "$ac_c_werror_flag" ||
9980 test ! -s conftest.err
9981 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009982 ac_lo=0 ac_mid=0
9983 while :; do
9984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009985/* confdefs.h. */
9986_ACEOF
9987cat confdefs.h >>conftest.$ac_ext
9988cat >>conftest.$ac_ext <<_ACEOF
9989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009990$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009991 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009992int
9993main ()
9994{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009995static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009996test_array [0] = 0
9997
9998 ;
9999 return 0;
10000}
10001_ACEOF
10002rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003if { (ac_try="$ac_compile"
10004case "(($ac_try" in
10005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10006 *) ac_try_echo=$ac_try;;
10007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010011 grep -v '^ *+' conftest.er1 >conftest.err
10012 rm -f conftest.er1
10013 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015 (exit $ac_status); } && {
10016 test -z "$ac_c_werror_flag" ||
10017 test ! -s conftest.err
10018 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 ac_hi=$ac_mid; break
10020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010022sed 's/^/| /' conftest.$ac_ext >&5
10023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024 ac_lo=`expr $ac_mid + 1`
10025 if test $ac_lo -le $ac_mid; then
10026 ac_lo= ac_hi=
10027 break
10028 fi
10029 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010031
10032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 done
10034else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010036sed 's/^/| /' conftest.$ac_ext >&5
10037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010039/* confdefs.h. */
10040_ACEOF
10041cat confdefs.h >>conftest.$ac_ext
10042cat >>conftest.$ac_ext <<_ACEOF
10043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010044$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010045 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010046int
10047main ()
10048{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010049static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010050test_array [0] = 0
10051
10052 ;
10053 return 0;
10054}
10055_ACEOF
10056rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057if { (ac_try="$ac_compile"
10058case "(($ac_try" in
10059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10060 *) ac_try_echo=$ac_try;;
10061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010065 grep -v '^ *+' conftest.er1 >conftest.err
10066 rm -f conftest.er1
10067 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069 (exit $ac_status); } && {
10070 test -z "$ac_c_werror_flag" ||
10071 test ! -s conftest.err
10072 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010073 ac_hi=-1 ac_mid=-1
10074 while :; do
10075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010076/* confdefs.h. */
10077_ACEOF
10078cat confdefs.h >>conftest.$ac_ext
10079cat >>conftest.$ac_ext <<_ACEOF
10080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010081$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010082 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010083int
10084main ()
10085{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010086static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010087test_array [0] = 0
10088
10089 ;
10090 return 0;
10091}
10092_ACEOF
10093rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094if { (ac_try="$ac_compile"
10095case "(($ac_try" in
10096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10097 *) ac_try_echo=$ac_try;;
10098esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010102 grep -v '^ *+' conftest.er1 >conftest.err
10103 rm -f conftest.er1
10104 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106 (exit $ac_status); } && {
10107 test -z "$ac_c_werror_flag" ||
10108 test ! -s conftest.err
10109 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 ac_lo=$ac_mid; break
10111else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010113sed 's/^/| /' conftest.$ac_ext >&5
10114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115 ac_hi=`expr '(' $ac_mid ')' - 1`
10116 if test $ac_mid -le $ac_hi; then
10117 ac_lo= ac_hi=
10118 break
10119 fi
10120 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122
10123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 done
10125else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010127sed 's/^/| /' conftest.$ac_ext >&5
10128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010129 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131
10132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134
10135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136# Binary search between lo and hi bounds.
10137while test "x$ac_lo" != "x$ac_hi"; do
10138 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10139 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010140/* confdefs.h. */
10141_ACEOF
10142cat confdefs.h >>conftest.$ac_ext
10143cat >>conftest.$ac_ext <<_ACEOF
10144/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010145$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010146 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010147int
10148main ()
10149{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010150static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010151test_array [0] = 0
10152
10153 ;
10154 return 0;
10155}
10156_ACEOF
10157rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158if { (ac_try="$ac_compile"
10159case "(($ac_try" in
10160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10161 *) ac_try_echo=$ac_try;;
10162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010166 grep -v '^ *+' conftest.er1 >conftest.err
10167 rm -f conftest.er1
10168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170 (exit $ac_status); } && {
10171 test -z "$ac_c_werror_flag" ||
10172 test ! -s conftest.err
10173 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010174 ac_hi=$ac_mid
10175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010177sed 's/^/| /' conftest.$ac_ext >&5
10178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181
10182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010183done
10184case $ac_lo in
10185?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010187 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010188See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010189echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010190See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010191 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192 else
10193 ac_cv_sizeof_fpos_t=0
10194 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010195esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010196else
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010198/* confdefs.h. */
10199_ACEOF
10200cat confdefs.h >>conftest.$ac_ext
10201cat >>conftest.$ac_ext <<_ACEOF
10202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010203$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010204 typedef fpos_t ac__type_sizeof_;
10205static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10206static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010207#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010208#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010209int
10210main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010211{
Martin v. Löwis11437992002-04-12 09:54:03 +000010212
10213 FILE *f = fopen ("conftest.val", "w");
10214 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010216 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010219 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010221 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 }
10223 else
10224 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010226 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010228 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010231
10232 ;
10233 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010234}
Martin v. Löwis11437992002-04-12 09:54:03 +000010235_ACEOF
10236rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237if { (ac_try="$ac_link"
10238case "(($ac_try" in
10239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10240 *) ac_try_echo=$ac_try;;
10241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010243 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247 { (case "(($ac_try" in
10248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10249 *) ac_try_echo=$ac_try;;
10250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 (exit $ac_status); }; }; then
10256 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010257else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010258 echo "$as_me: program exited with status $ac_status" >&5
10259echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010260sed 's/^/| /' conftest.$ac_ext >&5
10261
Martin v. Löwis11437992002-04-12 09:54:03 +000010262( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010264 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010265See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010266echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010267See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010268 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269 else
10270 ac_cv_sizeof_fpos_t=0
10271 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273rm -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 +000010274fi
10275rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010276fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010277{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10278echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279
10280
10281
Martin v. Löwis11437992002-04-12 09:54:03 +000010282cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010283#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010284_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010285
Michael W. Hudson54241132001-12-07 15:38:26 +000010286
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010287{ echo "$as_me:$LINENO: checking for size_t" >&5
10288echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10289if test "${ac_cv_type_size_t+set}" = set; then
10290 echo $ECHO_N "(cached) $ECHO_C" >&6
10291else
10292 cat >conftest.$ac_ext <<_ACEOF
10293/* confdefs.h. */
10294_ACEOF
10295cat confdefs.h >>conftest.$ac_ext
10296cat >>conftest.$ac_ext <<_ACEOF
10297/* end confdefs.h. */
10298$ac_includes_default
10299typedef size_t ac__type_new_;
10300int
10301main ()
10302{
10303if ((ac__type_new_ *) 0)
10304 return 0;
10305if (sizeof (ac__type_new_))
10306 return 0;
10307 ;
10308 return 0;
10309}
10310_ACEOF
10311rm -f conftest.$ac_objext
10312if { (ac_try="$ac_compile"
10313case "(($ac_try" in
10314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10315 *) ac_try_echo=$ac_try;;
10316esac
10317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10318 (eval "$ac_compile") 2>conftest.er1
10319 ac_status=$?
10320 grep -v '^ *+' conftest.er1 >conftest.err
10321 rm -f conftest.er1
10322 cat conftest.err >&5
10323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10324 (exit $ac_status); } && {
10325 test -z "$ac_c_werror_flag" ||
10326 test ! -s conftest.err
10327 } && test -s conftest.$ac_objext; then
10328 ac_cv_type_size_t=yes
10329else
10330 echo "$as_me: failed program was:" >&5
10331sed 's/^/| /' conftest.$ac_ext >&5
10332
10333 ac_cv_type_size_t=no
10334fi
10335
10336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10337fi
10338{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10339echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341# The cast to long int works around a bug in the HP C Compiler
10342# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10343# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10344# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010345{ echo "$as_me:$LINENO: checking size of size_t" >&5
10346echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010347if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010348 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010349else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010350 if test "$cross_compiling" = yes; then
10351 # Depending upon the size, compute the lo and hi bounds.
10352cat >conftest.$ac_ext <<_ACEOF
10353/* confdefs.h. */
10354_ACEOF
10355cat confdefs.h >>conftest.$ac_ext
10356cat >>conftest.$ac_ext <<_ACEOF
10357/* end confdefs.h. */
10358$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010359 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010360int
10361main ()
10362{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010363static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010364test_array [0] = 0
10365
10366 ;
10367 return 0;
10368}
10369_ACEOF
10370rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010371if { (ac_try="$ac_compile"
10372case "(($ac_try" in
10373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10374 *) ac_try_echo=$ac_try;;
10375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010378 ac_status=$?
10379 grep -v '^ *+' conftest.er1 >conftest.err
10380 rm -f conftest.er1
10381 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383 (exit $ac_status); } && {
10384 test -z "$ac_c_werror_flag" ||
10385 test ! -s conftest.err
10386 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010387 ac_lo=0 ac_mid=0
10388 while :; do
10389 cat >conftest.$ac_ext <<_ACEOF
10390/* confdefs.h. */
10391_ACEOF
10392cat confdefs.h >>conftest.$ac_ext
10393cat >>conftest.$ac_ext <<_ACEOF
10394/* end confdefs.h. */
10395$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010396 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010397int
10398main ()
10399{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010400static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010401test_array [0] = 0
10402
10403 ;
10404 return 0;
10405}
10406_ACEOF
10407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408if { (ac_try="$ac_compile"
10409case "(($ac_try" in
10410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10411 *) ac_try_echo=$ac_try;;
10412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010415 ac_status=$?
10416 grep -v '^ *+' conftest.er1 >conftest.err
10417 rm -f conftest.er1
10418 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420 (exit $ac_status); } && {
10421 test -z "$ac_c_werror_flag" ||
10422 test ! -s conftest.err
10423 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424 ac_hi=$ac_mid; break
10425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010426 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010427sed 's/^/| /' conftest.$ac_ext >&5
10428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010429 ac_lo=`expr $ac_mid + 1`
10430 if test $ac_lo -le $ac_mid; then
10431 ac_lo= ac_hi=
10432 break
10433 fi
10434 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010436
10437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010438 done
10439else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010440 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010441sed 's/^/| /' conftest.$ac_ext >&5
10442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444/* confdefs.h. */
10445_ACEOF
10446cat confdefs.h >>conftest.$ac_ext
10447cat >>conftest.$ac_ext <<_ACEOF
10448/* end confdefs.h. */
10449$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010450 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010451int
10452main ()
10453{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010454static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010455test_array [0] = 0
10456
10457 ;
10458 return 0;
10459}
10460_ACEOF
10461rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462if { (ac_try="$ac_compile"
10463case "(($ac_try" in
10464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10465 *) ac_try_echo=$ac_try;;
10466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010469 ac_status=$?
10470 grep -v '^ *+' conftest.er1 >conftest.err
10471 rm -f conftest.er1
10472 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474 (exit $ac_status); } && {
10475 test -z "$ac_c_werror_flag" ||
10476 test ! -s conftest.err
10477 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010478 ac_hi=-1 ac_mid=-1
10479 while :; do
10480 cat >conftest.$ac_ext <<_ACEOF
10481/* confdefs.h. */
10482_ACEOF
10483cat confdefs.h >>conftest.$ac_ext
10484cat >>conftest.$ac_ext <<_ACEOF
10485/* end confdefs.h. */
10486$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010487 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010488int
10489main ()
10490{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010491static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010492test_array [0] = 0
10493
10494 ;
10495 return 0;
10496}
10497_ACEOF
10498rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499if { (ac_try="$ac_compile"
10500case "(($ac_try" in
10501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10502 *) ac_try_echo=$ac_try;;
10503esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010506 ac_status=$?
10507 grep -v '^ *+' conftest.er1 >conftest.err
10508 rm -f conftest.er1
10509 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511 (exit $ac_status); } && {
10512 test -z "$ac_c_werror_flag" ||
10513 test ! -s conftest.err
10514 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010515 ac_lo=$ac_mid; break
10516else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010517 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518sed 's/^/| /' conftest.$ac_ext >&5
10519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520 ac_hi=`expr '(' $ac_mid ')' - 1`
10521 if test $ac_mid -le $ac_hi; then
10522 ac_lo= ac_hi=
10523 break
10524 fi
10525 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010527
10528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010529 done
10530else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010531 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532sed 's/^/| /' conftest.$ac_ext >&5
10533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536
10537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539
10540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541# Binary search between lo and hi bounds.
10542while test "x$ac_lo" != "x$ac_hi"; do
10543 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10544 cat >conftest.$ac_ext <<_ACEOF
10545/* confdefs.h. */
10546_ACEOF
10547cat confdefs.h >>conftest.$ac_ext
10548cat >>conftest.$ac_ext <<_ACEOF
10549/* end confdefs.h. */
10550$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010551 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010552int
10553main ()
10554{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010555static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010556test_array [0] = 0
10557
10558 ;
10559 return 0;
10560}
10561_ACEOF
10562rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010563if { (ac_try="$ac_compile"
10564case "(($ac_try" in
10565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10566 *) ac_try_echo=$ac_try;;
10567esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010570 ac_status=$?
10571 grep -v '^ *+' conftest.er1 >conftest.err
10572 rm -f conftest.er1
10573 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575 (exit $ac_status); } && {
10576 test -z "$ac_c_werror_flag" ||
10577 test ! -s conftest.err
10578 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579 ac_hi=$ac_mid
10580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010581 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582sed 's/^/| /' conftest.$ac_ext >&5
10583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010584 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586
10587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588done
10589case $ac_lo in
10590?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010591'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010592 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010594echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010595See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010596 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597 else
10598 ac_cv_sizeof_size_t=0
10599 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600esac
10601else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602 cat >conftest.$ac_ext <<_ACEOF
10603/* confdefs.h. */
10604_ACEOF
10605cat confdefs.h >>conftest.$ac_ext
10606cat >>conftest.$ac_ext <<_ACEOF
10607/* end confdefs.h. */
10608$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010609 typedef size_t ac__type_sizeof_;
10610static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10611static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612#include <stdio.h>
10613#include <stdlib.h>
10614int
10615main ()
10616{
10617
10618 FILE *f = fopen ("conftest.val", "w");
10619 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010620 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010621 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010624 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010626 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627 }
10628 else
10629 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010631 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010633 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636
10637 ;
10638 return 0;
10639}
10640_ACEOF
10641rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642if { (ac_try="$ac_link"
10643case "(($ac_try" in
10644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10645 *) ac_try_echo=$ac_try;;
10646esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010651 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652 { (case "(($ac_try" in
10653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10654 *) ac_try_echo=$ac_try;;
10655esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660 (exit $ac_status); }; }; then
10661 ac_cv_sizeof_size_t=`cat conftest.val`
10662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010663 echo "$as_me: program exited with status $ac_status" >&5
10664echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665sed 's/^/| /' conftest.$ac_ext >&5
10666
10667( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010669 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010671echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010673 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674 else
10675 ac_cv_sizeof_size_t=0
10676 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678rm -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 +000010679fi
10680rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010681fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010682{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10683echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684
10685
10686
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687cat >>confdefs.h <<_ACEOF
10688#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10689_ACEOF
10690
10691
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010692{ echo "$as_me:$LINENO: checking for pid_t" >&5
10693echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10694if test "${ac_cv_type_pid_t+set}" = set; then
10695 echo $ECHO_N "(cached) $ECHO_C" >&6
10696else
10697 cat >conftest.$ac_ext <<_ACEOF
10698/* confdefs.h. */
10699_ACEOF
10700cat confdefs.h >>conftest.$ac_ext
10701cat >>conftest.$ac_ext <<_ACEOF
10702/* end confdefs.h. */
10703$ac_includes_default
10704typedef pid_t ac__type_new_;
10705int
10706main ()
10707{
10708if ((ac__type_new_ *) 0)
10709 return 0;
10710if (sizeof (ac__type_new_))
10711 return 0;
10712 ;
10713 return 0;
10714}
10715_ACEOF
10716rm -f conftest.$ac_objext
10717if { (ac_try="$ac_compile"
10718case "(($ac_try" in
10719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10720 *) ac_try_echo=$ac_try;;
10721esac
10722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10723 (eval "$ac_compile") 2>conftest.er1
10724 ac_status=$?
10725 grep -v '^ *+' conftest.er1 >conftest.err
10726 rm -f conftest.er1
10727 cat conftest.err >&5
10728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10729 (exit $ac_status); } && {
10730 test -z "$ac_c_werror_flag" ||
10731 test ! -s conftest.err
10732 } && test -s conftest.$ac_objext; then
10733 ac_cv_type_pid_t=yes
10734else
10735 echo "$as_me: failed program was:" >&5
10736sed 's/^/| /' conftest.$ac_ext >&5
10737
10738 ac_cv_type_pid_t=no
10739fi
10740
10741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10742fi
10743{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10744echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10745
Christian Heimes400adb02008-02-01 08:12:03 +000010746# The cast to long int works around a bug in the HP C Compiler
10747# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10748# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10749# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010750{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10751echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010752if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010753 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010754else
10755 if test "$cross_compiling" = yes; then
10756 # Depending upon the size, compute the lo and hi bounds.
10757cat >conftest.$ac_ext <<_ACEOF
10758/* confdefs.h. */
10759_ACEOF
10760cat confdefs.h >>conftest.$ac_ext
10761cat >>conftest.$ac_ext <<_ACEOF
10762/* end confdefs.h. */
10763$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010764 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010765int
10766main ()
10767{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010768static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010769test_array [0] = 0
10770
10771 ;
10772 return 0;
10773}
10774_ACEOF
10775rm -f conftest.$ac_objext
10776if { (ac_try="$ac_compile"
10777case "(($ac_try" in
10778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10779 *) ac_try_echo=$ac_try;;
10780esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010782 (eval "$ac_compile") 2>conftest.er1
10783 ac_status=$?
10784 grep -v '^ *+' conftest.er1 >conftest.err
10785 rm -f conftest.er1
10786 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010788 (exit $ac_status); } && {
10789 test -z "$ac_c_werror_flag" ||
10790 test ! -s conftest.err
10791 } && test -s conftest.$ac_objext; then
10792 ac_lo=0 ac_mid=0
10793 while :; do
10794 cat >conftest.$ac_ext <<_ACEOF
10795/* confdefs.h. */
10796_ACEOF
10797cat confdefs.h >>conftest.$ac_ext
10798cat >>conftest.$ac_ext <<_ACEOF
10799/* end confdefs.h. */
10800$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010801 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010802int
10803main ()
10804{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010805static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010806test_array [0] = 0
10807
10808 ;
10809 return 0;
10810}
10811_ACEOF
10812rm -f conftest.$ac_objext
10813if { (ac_try="$ac_compile"
10814case "(($ac_try" in
10815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10816 *) ac_try_echo=$ac_try;;
10817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010819 (eval "$ac_compile") 2>conftest.er1
10820 ac_status=$?
10821 grep -v '^ *+' conftest.er1 >conftest.err
10822 rm -f conftest.er1
10823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010825 (exit $ac_status); } && {
10826 test -z "$ac_c_werror_flag" ||
10827 test ! -s conftest.err
10828 } && test -s conftest.$ac_objext; then
10829 ac_hi=$ac_mid; break
10830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010831 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010832sed 's/^/| /' conftest.$ac_ext >&5
10833
10834 ac_lo=`expr $ac_mid + 1`
10835 if test $ac_lo -le $ac_mid; then
10836 ac_lo= ac_hi=
10837 break
10838 fi
10839 ac_mid=`expr 2 '*' $ac_mid + 1`
10840fi
10841
10842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10843 done
10844else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010845 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010846sed 's/^/| /' conftest.$ac_ext >&5
10847
10848 cat >conftest.$ac_ext <<_ACEOF
10849/* confdefs.h. */
10850_ACEOF
10851cat confdefs.h >>conftest.$ac_ext
10852cat >>conftest.$ac_ext <<_ACEOF
10853/* end confdefs.h. */
10854$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010855 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010856int
10857main ()
10858{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010859static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010860test_array [0] = 0
10861
10862 ;
10863 return 0;
10864}
10865_ACEOF
10866rm -f conftest.$ac_objext
10867if { (ac_try="$ac_compile"
10868case "(($ac_try" in
10869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10870 *) ac_try_echo=$ac_try;;
10871esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010873 (eval "$ac_compile") 2>conftest.er1
10874 ac_status=$?
10875 grep -v '^ *+' conftest.er1 >conftest.err
10876 rm -f conftest.er1
10877 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010879 (exit $ac_status); } && {
10880 test -z "$ac_c_werror_flag" ||
10881 test ! -s conftest.err
10882 } && test -s conftest.$ac_objext; then
10883 ac_hi=-1 ac_mid=-1
10884 while :; do
10885 cat >conftest.$ac_ext <<_ACEOF
10886/* confdefs.h. */
10887_ACEOF
10888cat confdefs.h >>conftest.$ac_ext
10889cat >>conftest.$ac_ext <<_ACEOF
10890/* end confdefs.h. */
10891$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010892 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010893int
10894main ()
10895{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010897test_array [0] = 0
10898
10899 ;
10900 return 0;
10901}
10902_ACEOF
10903rm -f conftest.$ac_objext
10904if { (ac_try="$ac_compile"
10905case "(($ac_try" in
10906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10907 *) ac_try_echo=$ac_try;;
10908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010910 (eval "$ac_compile") 2>conftest.er1
10911 ac_status=$?
10912 grep -v '^ *+' conftest.er1 >conftest.err
10913 rm -f conftest.er1
10914 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010916 (exit $ac_status); } && {
10917 test -z "$ac_c_werror_flag" ||
10918 test ! -s conftest.err
10919 } && test -s conftest.$ac_objext; then
10920 ac_lo=$ac_mid; break
10921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010922 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010923sed 's/^/| /' conftest.$ac_ext >&5
10924
10925 ac_hi=`expr '(' $ac_mid ')' - 1`
10926 if test $ac_mid -le $ac_hi; then
10927 ac_lo= ac_hi=
10928 break
10929 fi
10930 ac_mid=`expr 2 '*' $ac_mid`
10931fi
10932
10933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10934 done
10935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010936 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010937sed 's/^/| /' conftest.$ac_ext >&5
10938
10939 ac_lo= ac_hi=
10940fi
10941
10942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10943fi
10944
10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10946# Binary search between lo and hi bounds.
10947while test "x$ac_lo" != "x$ac_hi"; do
10948 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10949 cat >conftest.$ac_ext <<_ACEOF
10950/* confdefs.h. */
10951_ACEOF
10952cat confdefs.h >>conftest.$ac_ext
10953cat >>conftest.$ac_ext <<_ACEOF
10954/* end confdefs.h. */
10955$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010956 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010957int
10958main ()
10959{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010960static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010961test_array [0] = 0
10962
10963 ;
10964 return 0;
10965}
10966_ACEOF
10967rm -f conftest.$ac_objext
10968if { (ac_try="$ac_compile"
10969case "(($ac_try" in
10970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10971 *) ac_try_echo=$ac_try;;
10972esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010974 (eval "$ac_compile") 2>conftest.er1
10975 ac_status=$?
10976 grep -v '^ *+' conftest.er1 >conftest.err
10977 rm -f conftest.er1
10978 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010980 (exit $ac_status); } && {
10981 test -z "$ac_c_werror_flag" ||
10982 test ! -s conftest.err
10983 } && test -s conftest.$ac_objext; then
10984 ac_hi=$ac_mid
10985else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010986 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010987sed 's/^/| /' conftest.$ac_ext >&5
10988
10989 ac_lo=`expr '(' $ac_mid ')' + 1`
10990fi
10991
10992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10993done
10994case $ac_lo in
10995?*) ac_cv_sizeof_pid_t=$ac_lo;;
10996'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010997 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010998See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010999echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011000See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011001 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011002 else
11003 ac_cv_sizeof_pid_t=0
11004 fi ;;
11005esac
11006else
11007 cat >conftest.$ac_ext <<_ACEOF
11008/* confdefs.h. */
11009_ACEOF
11010cat confdefs.h >>conftest.$ac_ext
11011cat >>conftest.$ac_ext <<_ACEOF
11012/* end confdefs.h. */
11013$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011014 typedef pid_t ac__type_sizeof_;
11015static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11016static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011017#include <stdio.h>
11018#include <stdlib.h>
11019int
11020main ()
11021{
11022
11023 FILE *f = fopen ("conftest.val", "w");
11024 if (! f)
11025 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011026 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011027 {
11028 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011029 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011030 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011031 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011032 }
11033 else
11034 {
11035 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011036 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011037 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011038 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011039 }
11040 return ferror (f) || fclose (f) != 0;
11041
11042 ;
11043 return 0;
11044}
11045_ACEOF
11046rm -f conftest$ac_exeext
11047if { (ac_try="$ac_link"
11048case "(($ac_try" in
11049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11050 *) ac_try_echo=$ac_try;;
11051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011053 (eval "$ac_link") 2>&5
11054 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11057 { (case "(($ac_try" in
11058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11059 *) ac_try_echo=$ac_try;;
11060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011062 (eval "$ac_try") 2>&5
11063 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011065 (exit $ac_status); }; }; then
11066 ac_cv_sizeof_pid_t=`cat conftest.val`
11067else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011068 echo "$as_me: program exited with status $ac_status" >&5
11069echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011070sed 's/^/| /' conftest.$ac_ext >&5
11071
11072( exit $ac_status )
11073if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011074 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011075See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011076echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011077See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011078 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011079 else
11080 ac_cv_sizeof_pid_t=0
11081 fi
11082fi
11083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11084fi
11085rm -f conftest.val
11086fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011087{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11088echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011089
11090
11091
11092cat >>confdefs.h <<_ACEOF
11093#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11094_ACEOF
11095
11096
Michael W. Hudson54241132001-12-07 15:38:26 +000011097
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011098{ echo "$as_me:$LINENO: checking for long long support" >&5
11099echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011100have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011101cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011102/* confdefs.h. */
11103_ACEOF
11104cat confdefs.h >>conftest.$ac_ext
11105cat >>conftest.$ac_ext <<_ACEOF
11106/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011107
Martin v. Löwis11437992002-04-12 09:54:03 +000011108int
11109main ()
11110{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011111long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 ;
11113 return 0;
11114}
11115_ACEOF
11116rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117if { (ac_try="$ac_compile"
11118case "(($ac_try" in
11119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11120 *) ac_try_echo=$ac_try;;
11121esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011125 grep -v '^ *+' conftest.er1 >conftest.err
11126 rm -f conftest.er1
11127 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129 (exit $ac_status); } && {
11130 test -z "$ac_c_werror_flag" ||
11131 test ! -s conftest.err
11132 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011133
11134
11135cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011136#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011137_ACEOF
11138
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011139 have_long_long=yes
11140
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011141else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011143sed 's/^/| /' conftest.$ac_ext >&5
11144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011145
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147
11148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011149{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11150echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011151if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011152{ echo "$as_me:$LINENO: checking for long long" >&5
11153echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11154if test "${ac_cv_type_long_long+set}" = set; then
11155 echo $ECHO_N "(cached) $ECHO_C" >&6
11156else
11157 cat >conftest.$ac_ext <<_ACEOF
11158/* confdefs.h. */
11159_ACEOF
11160cat confdefs.h >>conftest.$ac_ext
11161cat >>conftest.$ac_ext <<_ACEOF
11162/* end confdefs.h. */
11163$ac_includes_default
11164typedef long long ac__type_new_;
11165int
11166main ()
11167{
11168if ((ac__type_new_ *) 0)
11169 return 0;
11170if (sizeof (ac__type_new_))
11171 return 0;
11172 ;
11173 return 0;
11174}
11175_ACEOF
11176rm -f conftest.$ac_objext
11177if { (ac_try="$ac_compile"
11178case "(($ac_try" in
11179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11180 *) ac_try_echo=$ac_try;;
11181esac
11182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11183 (eval "$ac_compile") 2>conftest.er1
11184 ac_status=$?
11185 grep -v '^ *+' conftest.er1 >conftest.err
11186 rm -f conftest.er1
11187 cat conftest.err >&5
11188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11189 (exit $ac_status); } && {
11190 test -z "$ac_c_werror_flag" ||
11191 test ! -s conftest.err
11192 } && test -s conftest.$ac_objext; then
11193 ac_cv_type_long_long=yes
11194else
11195 echo "$as_me: failed program was:" >&5
11196sed 's/^/| /' conftest.$ac_ext >&5
11197
11198 ac_cv_type_long_long=no
11199fi
11200
11201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11202fi
11203{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11204echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206# The cast to long int works around a bug in the HP C Compiler
11207# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11208# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11209# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011210{ echo "$as_me:$LINENO: checking size of long long" >&5
11211echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011212if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011213 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011214else
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 if test "$cross_compiling" = yes; then
11216 # Depending upon the size, compute the lo and hi bounds.
11217cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011218/* confdefs.h. */
11219_ACEOF
11220cat confdefs.h >>conftest.$ac_ext
11221cat >>conftest.$ac_ext <<_ACEOF
11222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011223$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011224 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011225int
11226main ()
11227{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011229test_array [0] = 0
11230
11231 ;
11232 return 0;
11233}
11234_ACEOF
11235rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236if { (ac_try="$ac_compile"
11237case "(($ac_try" in
11238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11239 *) ac_try_echo=$ac_try;;
11240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011244 grep -v '^ *+' conftest.er1 >conftest.err
11245 rm -f conftest.er1
11246 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248 (exit $ac_status); } && {
11249 test -z "$ac_c_werror_flag" ||
11250 test ! -s conftest.err
11251 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ac_lo=0 ac_mid=0
11253 while :; do
11254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011255/* confdefs.h. */
11256_ACEOF
11257cat confdefs.h >>conftest.$ac_ext
11258cat >>conftest.$ac_ext <<_ACEOF
11259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011260$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011261 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011262int
11263main ()
11264{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011265static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011266test_array [0] = 0
11267
11268 ;
11269 return 0;
11270}
11271_ACEOF
11272rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011273if { (ac_try="$ac_compile"
11274case "(($ac_try" in
11275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11276 *) ac_try_echo=$ac_try;;
11277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011281 grep -v '^ *+' conftest.er1 >conftest.err
11282 rm -f conftest.er1
11283 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285 (exit $ac_status); } && {
11286 test -z "$ac_c_werror_flag" ||
11287 test ! -s conftest.err
11288 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 ac_hi=$ac_mid; break
11290else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011292sed 's/^/| /' conftest.$ac_ext >&5
11293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294 ac_lo=`expr $ac_mid + 1`
11295 if test $ac_lo -le $ac_mid; then
11296 ac_lo= ac_hi=
11297 break
11298 fi
11299 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011301
11302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 done
11304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011306sed 's/^/| /' conftest.$ac_ext >&5
11307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011309/* confdefs.h. */
11310_ACEOF
11311cat confdefs.h >>conftest.$ac_ext
11312cat >>conftest.$ac_ext <<_ACEOF
11313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011314$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011315 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011316int
11317main ()
11318{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011320test_array [0] = 0
11321
11322 ;
11323 return 0;
11324}
11325_ACEOF
11326rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011327if { (ac_try="$ac_compile"
11328case "(($ac_try" in
11329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11330 *) ac_try_echo=$ac_try;;
11331esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011335 grep -v '^ *+' conftest.er1 >conftest.err
11336 rm -f conftest.er1
11337 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339 (exit $ac_status); } && {
11340 test -z "$ac_c_werror_flag" ||
11341 test ! -s conftest.err
11342 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 ac_hi=-1 ac_mid=-1
11344 while :; do
11345 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* confdefs.h. */
11347_ACEOF
11348cat confdefs.h >>conftest.$ac_ext
11349cat >>conftest.$ac_ext <<_ACEOF
11350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011351$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011352 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011353int
11354main ()
11355{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011356static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011357test_array [0] = 0
11358
11359 ;
11360 return 0;
11361}
11362_ACEOF
11363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364if { (ac_try="$ac_compile"
11365case "(($ac_try" in
11366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11367 *) ac_try_echo=$ac_try;;
11368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011372 grep -v '^ *+' conftest.er1 >conftest.err
11373 rm -f conftest.er1
11374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376 (exit $ac_status); } && {
11377 test -z "$ac_c_werror_flag" ||
11378 test ! -s conftest.err
11379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ac_lo=$ac_mid; break
11381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011383sed 's/^/| /' conftest.$ac_ext >&5
11384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385 ac_hi=`expr '(' $ac_mid ')' - 1`
11386 if test $ac_mid -le $ac_hi; then
11387 ac_lo= ac_hi=
11388 break
11389 fi
11390 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392
11393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 done
11395else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011397sed 's/^/| /' conftest.$ac_ext >&5
11398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401
11402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011406# Binary search between lo and hi bounds.
11407while test "x$ac_lo" != "x$ac_hi"; do
11408 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011410/* confdefs.h. */
11411_ACEOF
11412cat confdefs.h >>conftest.$ac_ext
11413cat >>conftest.$ac_ext <<_ACEOF
11414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011415$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011416 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011417int
11418main ()
11419{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011420static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011421test_array [0] = 0
11422
11423 ;
11424 return 0;
11425}
11426_ACEOF
11427rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428if { (ac_try="$ac_compile"
11429case "(($ac_try" in
11430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11431 *) ac_try_echo=$ac_try;;
11432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011436 grep -v '^ *+' conftest.er1 >conftest.err
11437 rm -f conftest.er1
11438 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440 (exit $ac_status); } && {
11441 test -z "$ac_c_werror_flag" ||
11442 test ! -s conftest.err
11443 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 ac_hi=$ac_mid
11445else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011447sed 's/^/| /' conftest.$ac_ext >&5
11448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451
11452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011453done
11454case $ac_lo in
11455?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011457 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011458See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011459echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011460See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011461 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011462 else
11463 ac_cv_sizeof_long_long=0
11464 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011465esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011466else
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011468/* confdefs.h. */
11469_ACEOF
11470cat confdefs.h >>conftest.$ac_ext
11471cat >>conftest.$ac_ext <<_ACEOF
11472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011473$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011474 typedef long long ac__type_sizeof_;
11475static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11476static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011477#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011478#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011479int
11480main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011481{
Martin v. Löwis11437992002-04-12 09:54:03 +000011482
11483 FILE *f = fopen ("conftest.val", "w");
11484 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011486 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011489 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011490 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011491 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 }
11493 else
11494 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011496 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011498 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
11502 ;
11503 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011504}
Martin v. Löwis11437992002-04-12 09:54:03 +000011505_ACEOF
11506rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507if { (ac_try="$ac_link"
11508case "(($ac_try" in
11509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11510 *) ac_try_echo=$ac_try;;
11511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517 { (case "(($ac_try" in
11518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519 *) ac_try_echo=$ac_try;;
11520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 (exit $ac_status); }; }; then
11526 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011528 echo "$as_me: program exited with status $ac_status" >&5
11529echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011530sed 's/^/| /' conftest.$ac_ext >&5
11531
Martin v. Löwis11437992002-04-12 09:54:03 +000011532( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011534 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011535See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011536echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011537See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011538 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539 else
11540 ac_cv_sizeof_long_long=0
11541 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011543rm -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 +000011544fi
11545rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011546fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011547{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11548echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011549
11550
11551
Martin v. Löwis11437992002-04-12 09:54:03 +000011552cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011553#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011554_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011555
Michael W. Hudson54241132001-12-07 15:38:26 +000011556
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011557fi
11558
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011559{ echo "$as_me:$LINENO: checking for long double support" >&5
11560echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011561have_long_double=no
11562cat >conftest.$ac_ext <<_ACEOF
11563/* confdefs.h. */
11564_ACEOF
11565cat confdefs.h >>conftest.$ac_ext
11566cat >>conftest.$ac_ext <<_ACEOF
11567/* end confdefs.h. */
11568
11569int
11570main ()
11571{
11572long double x; x = (long double)0;
11573 ;
11574 return 0;
11575}
11576_ACEOF
11577rm -f conftest.$ac_objext
11578if { (ac_try="$ac_compile"
11579case "(($ac_try" in
11580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11581 *) ac_try_echo=$ac_try;;
11582esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011584 (eval "$ac_compile") 2>conftest.er1
11585 ac_status=$?
11586 grep -v '^ *+' conftest.er1 >conftest.err
11587 rm -f conftest.er1
11588 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011590 (exit $ac_status); } && {
11591 test -z "$ac_c_werror_flag" ||
11592 test ! -s conftest.err
11593 } && test -s conftest.$ac_objext; then
11594
11595
11596cat >>confdefs.h <<\_ACEOF
11597#define HAVE_LONG_DOUBLE 1
11598_ACEOF
11599
11600 have_long_double=yes
11601
11602else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011603 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011604sed 's/^/| /' conftest.$ac_ext >&5
11605
11606
11607fi
11608
11609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011610{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11611echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011612if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011613{ echo "$as_me:$LINENO: checking for long double" >&5
11614echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11615if test "${ac_cv_type_long_double+set}" = set; then
11616 echo $ECHO_N "(cached) $ECHO_C" >&6
11617else
11618 cat >conftest.$ac_ext <<_ACEOF
11619/* confdefs.h. */
11620_ACEOF
11621cat confdefs.h >>conftest.$ac_ext
11622cat >>conftest.$ac_ext <<_ACEOF
11623/* end confdefs.h. */
11624$ac_includes_default
11625typedef long double ac__type_new_;
11626int
11627main ()
11628{
11629if ((ac__type_new_ *) 0)
11630 return 0;
11631if (sizeof (ac__type_new_))
11632 return 0;
11633 ;
11634 return 0;
11635}
11636_ACEOF
11637rm -f conftest.$ac_objext
11638if { (ac_try="$ac_compile"
11639case "(($ac_try" in
11640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11641 *) ac_try_echo=$ac_try;;
11642esac
11643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11644 (eval "$ac_compile") 2>conftest.er1
11645 ac_status=$?
11646 grep -v '^ *+' conftest.er1 >conftest.err
11647 rm -f conftest.er1
11648 cat conftest.err >&5
11649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11650 (exit $ac_status); } && {
11651 test -z "$ac_c_werror_flag" ||
11652 test ! -s conftest.err
11653 } && test -s conftest.$ac_objext; then
11654 ac_cv_type_long_double=yes
11655else
11656 echo "$as_me: failed program was:" >&5
11657sed 's/^/| /' conftest.$ac_ext >&5
11658
11659 ac_cv_type_long_double=no
11660fi
11661
11662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11663fi
11664{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11665echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11666
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011667# The cast to long int works around a bug in the HP C Compiler
11668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11670# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011671{ echo "$as_me:$LINENO: checking size of long double" >&5
11672echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011673if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011674 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011675else
11676 if test "$cross_compiling" = yes; then
11677 # Depending upon the size, compute the lo and hi bounds.
11678cat >conftest.$ac_ext <<_ACEOF
11679/* confdefs.h. */
11680_ACEOF
11681cat confdefs.h >>conftest.$ac_ext
11682cat >>conftest.$ac_ext <<_ACEOF
11683/* end confdefs.h. */
11684$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011685 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011686int
11687main ()
11688{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011690test_array [0] = 0
11691
11692 ;
11693 return 0;
11694}
11695_ACEOF
11696rm -f conftest.$ac_objext
11697if { (ac_try="$ac_compile"
11698case "(($ac_try" in
11699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11700 *) ac_try_echo=$ac_try;;
11701esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011703 (eval "$ac_compile") 2>conftest.er1
11704 ac_status=$?
11705 grep -v '^ *+' conftest.er1 >conftest.err
11706 rm -f conftest.er1
11707 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011709 (exit $ac_status); } && {
11710 test -z "$ac_c_werror_flag" ||
11711 test ! -s conftest.err
11712 } && test -s conftest.$ac_objext; then
11713 ac_lo=0 ac_mid=0
11714 while :; do
11715 cat >conftest.$ac_ext <<_ACEOF
11716/* confdefs.h. */
11717_ACEOF
11718cat confdefs.h >>conftest.$ac_ext
11719cat >>conftest.$ac_ext <<_ACEOF
11720/* end confdefs.h. */
11721$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011722 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011723int
11724main ()
11725{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011727test_array [0] = 0
11728
11729 ;
11730 return 0;
11731}
11732_ACEOF
11733rm -f conftest.$ac_objext
11734if { (ac_try="$ac_compile"
11735case "(($ac_try" in
11736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11737 *) ac_try_echo=$ac_try;;
11738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011740 (eval "$ac_compile") 2>conftest.er1
11741 ac_status=$?
11742 grep -v '^ *+' conftest.er1 >conftest.err
11743 rm -f conftest.er1
11744 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011746 (exit $ac_status); } && {
11747 test -z "$ac_c_werror_flag" ||
11748 test ! -s conftest.err
11749 } && test -s conftest.$ac_objext; then
11750 ac_hi=$ac_mid; break
11751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011752 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011753sed 's/^/| /' conftest.$ac_ext >&5
11754
11755 ac_lo=`expr $ac_mid + 1`
11756 if test $ac_lo -le $ac_mid; then
11757 ac_lo= ac_hi=
11758 break
11759 fi
11760 ac_mid=`expr 2 '*' $ac_mid + 1`
11761fi
11762
11763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11764 done
11765else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011766 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011767sed 's/^/| /' conftest.$ac_ext >&5
11768
11769 cat >conftest.$ac_ext <<_ACEOF
11770/* confdefs.h. */
11771_ACEOF
11772cat confdefs.h >>conftest.$ac_ext
11773cat >>conftest.$ac_ext <<_ACEOF
11774/* end confdefs.h. */
11775$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011776 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011777int
11778main ()
11779{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011781test_array [0] = 0
11782
11783 ;
11784 return 0;
11785}
11786_ACEOF
11787rm -f conftest.$ac_objext
11788if { (ac_try="$ac_compile"
11789case "(($ac_try" in
11790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11791 *) ac_try_echo=$ac_try;;
11792esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011794 (eval "$ac_compile") 2>conftest.er1
11795 ac_status=$?
11796 grep -v '^ *+' conftest.er1 >conftest.err
11797 rm -f conftest.er1
11798 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011800 (exit $ac_status); } && {
11801 test -z "$ac_c_werror_flag" ||
11802 test ! -s conftest.err
11803 } && test -s conftest.$ac_objext; then
11804 ac_hi=-1 ac_mid=-1
11805 while :; do
11806 cat >conftest.$ac_ext <<_ACEOF
11807/* confdefs.h. */
11808_ACEOF
11809cat confdefs.h >>conftest.$ac_ext
11810cat >>conftest.$ac_ext <<_ACEOF
11811/* end confdefs.h. */
11812$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011813 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011814int
11815main ()
11816{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011818test_array [0] = 0
11819
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824rm -f conftest.$ac_objext
11825if { (ac_try="$ac_compile"
11826case "(($ac_try" in
11827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11828 *) ac_try_echo=$ac_try;;
11829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011831 (eval "$ac_compile") 2>conftest.er1
11832 ac_status=$?
11833 grep -v '^ *+' conftest.er1 >conftest.err
11834 rm -f conftest.er1
11835 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011837 (exit $ac_status); } && {
11838 test -z "$ac_c_werror_flag" ||
11839 test ! -s conftest.err
11840 } && test -s conftest.$ac_objext; then
11841 ac_lo=$ac_mid; break
11842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011843 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011844sed 's/^/| /' conftest.$ac_ext >&5
11845
11846 ac_hi=`expr '(' $ac_mid ')' - 1`
11847 if test $ac_mid -le $ac_hi; then
11848 ac_lo= ac_hi=
11849 break
11850 fi
11851 ac_mid=`expr 2 '*' $ac_mid`
11852fi
11853
11854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855 done
11856else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011857 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011858sed 's/^/| /' conftest.$ac_ext >&5
11859
11860 ac_lo= ac_hi=
11861fi
11862
11863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11864fi
11865
11866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11867# Binary search between lo and hi bounds.
11868while test "x$ac_lo" != "x$ac_hi"; do
11869 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11870 cat >conftest.$ac_ext <<_ACEOF
11871/* confdefs.h. */
11872_ACEOF
11873cat confdefs.h >>conftest.$ac_ext
11874cat >>conftest.$ac_ext <<_ACEOF
11875/* end confdefs.h. */
11876$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011877 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011878int
11879main ()
11880{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011882test_array [0] = 0
11883
11884 ;
11885 return 0;
11886}
11887_ACEOF
11888rm -f conftest.$ac_objext
11889if { (ac_try="$ac_compile"
11890case "(($ac_try" in
11891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11892 *) ac_try_echo=$ac_try;;
11893esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011895 (eval "$ac_compile") 2>conftest.er1
11896 ac_status=$?
11897 grep -v '^ *+' conftest.er1 >conftest.err
11898 rm -f conftest.er1
11899 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011901 (exit $ac_status); } && {
11902 test -z "$ac_c_werror_flag" ||
11903 test ! -s conftest.err
11904 } && test -s conftest.$ac_objext; then
11905 ac_hi=$ac_mid
11906else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011907 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011908sed 's/^/| /' conftest.$ac_ext >&5
11909
11910 ac_lo=`expr '(' $ac_mid ')' + 1`
11911fi
11912
11913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11914done
11915case $ac_lo in
11916?*) ac_cv_sizeof_long_double=$ac_lo;;
11917'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011918 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011919See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011920echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011921See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011922 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011923 else
11924 ac_cv_sizeof_long_double=0
11925 fi ;;
11926esac
11927else
11928 cat >conftest.$ac_ext <<_ACEOF
11929/* confdefs.h. */
11930_ACEOF
11931cat confdefs.h >>conftest.$ac_ext
11932cat >>conftest.$ac_ext <<_ACEOF
11933/* end confdefs.h. */
11934$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011935 typedef long double ac__type_sizeof_;
11936static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11937static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011938#include <stdio.h>
11939#include <stdlib.h>
11940int
11941main ()
11942{
11943
11944 FILE *f = fopen ("conftest.val", "w");
11945 if (! f)
11946 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011947 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948 {
11949 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011950 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011951 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011952 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011953 }
11954 else
11955 {
11956 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011957 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011958 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011959 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960 }
11961 return ferror (f) || fclose (f) != 0;
11962
11963 ;
11964 return 0;
11965}
11966_ACEOF
11967rm -f conftest$ac_exeext
11968if { (ac_try="$ac_link"
11969case "(($ac_try" in
11970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11971 *) ac_try_echo=$ac_try;;
11972esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011974 (eval "$ac_link") 2>&5
11975 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011977 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11978 { (case "(($ac_try" in
11979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11980 *) ac_try_echo=$ac_try;;
11981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011983 (eval "$ac_try") 2>&5
11984 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 (exit $ac_status); }; }; then
11987 ac_cv_sizeof_long_double=`cat conftest.val`
11988else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011989 echo "$as_me: program exited with status $ac_status" >&5
11990echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991sed 's/^/| /' conftest.$ac_ext >&5
11992
11993( exit $ac_status )
11994if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011995 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011996See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011997echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011998See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011999 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012000 else
12001 ac_cv_sizeof_long_double=0
12002 fi
12003fi
12004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12005fi
12006rm -f conftest.val
12007fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012008{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12009echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010
12011
12012
12013cat >>confdefs.h <<_ACEOF
12014#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12015_ACEOF
12016
12017
12018fi
12019
12020
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012021{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12022echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012023have_c99_bool=no
12024cat >conftest.$ac_ext <<_ACEOF
12025/* confdefs.h. */
12026_ACEOF
12027cat confdefs.h >>conftest.$ac_ext
12028cat >>conftest.$ac_ext <<_ACEOF
12029/* end confdefs.h. */
12030
12031int
12032main ()
12033{
12034_Bool x; x = (_Bool)0;
12035 ;
12036 return 0;
12037}
12038_ACEOF
12039rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012040if { (ac_try="$ac_compile"
12041case "(($ac_try" in
12042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12043 *) ac_try_echo=$ac_try;;
12044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012047 ac_status=$?
12048 grep -v '^ *+' conftest.er1 >conftest.err
12049 rm -f conftest.er1
12050 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052 (exit $ac_status); } && {
12053 test -z "$ac_c_werror_flag" ||
12054 test ! -s conftest.err
12055 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012056
12057
12058cat >>confdefs.h <<\_ACEOF
12059#define HAVE_C99_BOOL 1
12060_ACEOF
12061
12062 have_c99_bool=yes
12063
12064else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012065 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012066sed 's/^/| /' conftest.$ac_ext >&5
12067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068
Thomas Woutersb2137042007-02-01 18:02:27 +000012069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070
12071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012072{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12073echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012074if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012075{ echo "$as_me:$LINENO: checking for _Bool" >&5
12076echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12077if test "${ac_cv_type__Bool+set}" = set; then
12078 echo $ECHO_N "(cached) $ECHO_C" >&6
12079else
12080 cat >conftest.$ac_ext <<_ACEOF
12081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
12086$ac_includes_default
12087typedef _Bool ac__type_new_;
12088int
12089main ()
12090{
12091if ((ac__type_new_ *) 0)
12092 return 0;
12093if (sizeof (ac__type_new_))
12094 return 0;
12095 ;
12096 return 0;
12097}
12098_ACEOF
12099rm -f conftest.$ac_objext
12100if { (ac_try="$ac_compile"
12101case "(($ac_try" in
12102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12103 *) ac_try_echo=$ac_try;;
12104esac
12105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12106 (eval "$ac_compile") 2>conftest.er1
12107 ac_status=$?
12108 grep -v '^ *+' conftest.er1 >conftest.err
12109 rm -f conftest.er1
12110 cat conftest.err >&5
12111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12112 (exit $ac_status); } && {
12113 test -z "$ac_c_werror_flag" ||
12114 test ! -s conftest.err
12115 } && test -s conftest.$ac_objext; then
12116 ac_cv_type__Bool=yes
12117else
12118 echo "$as_me: failed program was:" >&5
12119sed 's/^/| /' conftest.$ac_ext >&5
12120
12121 ac_cv_type__Bool=no
12122fi
12123
12124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12125fi
12126{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12127echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129# The cast to long int works around a bug in the HP C Compiler
12130# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12131# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12132# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012133{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12134echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012135if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012136 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012137else
12138 if test "$cross_compiling" = yes; then
12139 # Depending upon the size, compute the lo and hi bounds.
12140cat >conftest.$ac_ext <<_ACEOF
12141/* confdefs.h. */
12142_ACEOF
12143cat confdefs.h >>conftest.$ac_ext
12144cat >>conftest.$ac_ext <<_ACEOF
12145/* end confdefs.h. */
12146$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012147 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012148int
12149main ()
12150{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012152test_array [0] = 0
12153
12154 ;
12155 return 0;
12156}
12157_ACEOF
12158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159if { (ac_try="$ac_compile"
12160case "(($ac_try" in
12161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12162 *) ac_try_echo=$ac_try;;
12163esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012166 ac_status=$?
12167 grep -v '^ *+' conftest.er1 >conftest.err
12168 rm -f conftest.er1
12169 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171 (exit $ac_status); } && {
12172 test -z "$ac_c_werror_flag" ||
12173 test ! -s conftest.err
12174 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012175 ac_lo=0 ac_mid=0
12176 while :; do
12177 cat >conftest.$ac_ext <<_ACEOF
12178/* confdefs.h. */
12179_ACEOF
12180cat confdefs.h >>conftest.$ac_ext
12181cat >>conftest.$ac_ext <<_ACEOF
12182/* end confdefs.h. */
12183$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012184 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012185int
12186main ()
12187{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012188static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012189test_array [0] = 0
12190
12191 ;
12192 return 0;
12193}
12194_ACEOF
12195rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196if { (ac_try="$ac_compile"
12197case "(($ac_try" in
12198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12199 *) ac_try_echo=$ac_try;;
12200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012202 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012203 ac_status=$?
12204 grep -v '^ *+' conftest.er1 >conftest.err
12205 rm -f conftest.er1
12206 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208 (exit $ac_status); } && {
12209 test -z "$ac_c_werror_flag" ||
12210 test ! -s conftest.err
12211 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012212 ac_hi=$ac_mid; break
12213else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012214 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012215sed 's/^/| /' conftest.$ac_ext >&5
12216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217 ac_lo=`expr $ac_mid + 1`
12218 if test $ac_lo -le $ac_mid; then
12219 ac_lo= ac_hi=
12220 break
12221 fi
12222 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224
12225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012226 done
12227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012228 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012229sed 's/^/| /' conftest.$ac_ext >&5
12230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012232/* confdefs.h. */
12233_ACEOF
12234cat confdefs.h >>conftest.$ac_ext
12235cat >>conftest.$ac_ext <<_ACEOF
12236/* end confdefs.h. */
12237$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012238 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012239int
12240main ()
12241{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012242static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012243test_array [0] = 0
12244
12245 ;
12246 return 0;
12247}
12248_ACEOF
12249rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012250if { (ac_try="$ac_compile"
12251case "(($ac_try" in
12252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12253 *) ac_try_echo=$ac_try;;
12254esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012257 ac_status=$?
12258 grep -v '^ *+' conftest.er1 >conftest.err
12259 rm -f conftest.er1
12260 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262 (exit $ac_status); } && {
12263 test -z "$ac_c_werror_flag" ||
12264 test ! -s conftest.err
12265 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012266 ac_hi=-1 ac_mid=-1
12267 while :; do
12268 cat >conftest.$ac_ext <<_ACEOF
12269/* confdefs.h. */
12270_ACEOF
12271cat confdefs.h >>conftest.$ac_ext
12272cat >>conftest.$ac_ext <<_ACEOF
12273/* end confdefs.h. */
12274$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012275 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012276int
12277main ()
12278{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012279static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012280test_array [0] = 0
12281
12282 ;
12283 return 0;
12284}
12285_ACEOF
12286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287if { (ac_try="$ac_compile"
12288case "(($ac_try" in
12289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12290 *) ac_try_echo=$ac_try;;
12291esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012294 ac_status=$?
12295 grep -v '^ *+' conftest.er1 >conftest.err
12296 rm -f conftest.er1
12297 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299 (exit $ac_status); } && {
12300 test -z "$ac_c_werror_flag" ||
12301 test ! -s conftest.err
12302 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012303 ac_lo=$ac_mid; break
12304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012305 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012306sed 's/^/| /' conftest.$ac_ext >&5
12307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308 ac_hi=`expr '(' $ac_mid ')' - 1`
12309 if test $ac_mid -le $ac_hi; then
12310 ac_lo= ac_hi=
12311 break
12312 fi
12313 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315
12316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012317 done
12318else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012319 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012320sed 's/^/| /' conftest.$ac_ext >&5
12321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324
12325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327
12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012329# Binary search between lo and hi bounds.
12330while test "x$ac_lo" != "x$ac_hi"; do
12331 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12332 cat >conftest.$ac_ext <<_ACEOF
12333/* confdefs.h. */
12334_ACEOF
12335cat confdefs.h >>conftest.$ac_ext
12336cat >>conftest.$ac_ext <<_ACEOF
12337/* end confdefs.h. */
12338$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012339 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012340int
12341main ()
12342{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012343static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012344test_array [0] = 0
12345
12346 ;
12347 return 0;
12348}
12349_ACEOF
12350rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351if { (ac_try="$ac_compile"
12352case "(($ac_try" in
12353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12354 *) ac_try_echo=$ac_try;;
12355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012358 ac_status=$?
12359 grep -v '^ *+' conftest.er1 >conftest.err
12360 rm -f conftest.er1
12361 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363 (exit $ac_status); } && {
12364 test -z "$ac_c_werror_flag" ||
12365 test ! -s conftest.err
12366 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012367 ac_hi=$ac_mid
12368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012369 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012370sed 's/^/| /' conftest.$ac_ext >&5
12371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374
12375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012376done
12377case $ac_lo in
12378?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012380 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012381See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012382echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012383See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012384 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385 else
12386 ac_cv_sizeof__Bool=0
12387 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012388esac
12389else
12390 cat >conftest.$ac_ext <<_ACEOF
12391/* confdefs.h. */
12392_ACEOF
12393cat confdefs.h >>conftest.$ac_ext
12394cat >>conftest.$ac_ext <<_ACEOF
12395/* end confdefs.h. */
12396$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012397 typedef _Bool ac__type_sizeof_;
12398static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12399static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012400#include <stdio.h>
12401#include <stdlib.h>
12402int
12403main ()
12404{
12405
12406 FILE *f = fopen ("conftest.val", "w");
12407 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012409 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012410 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012412 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012413 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012414 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012415 }
12416 else
12417 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012419 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012421 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012422 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012424
12425 ;
12426 return 0;
12427}
12428_ACEOF
12429rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430if { (ac_try="$ac_link"
12431case "(($ac_try" in
12432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12433 *) ac_try_echo=$ac_try;;
12434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012437 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440 { (case "(($ac_try" in
12441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12442 *) ac_try_echo=$ac_try;;
12443esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012446 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012448 (exit $ac_status); }; }; then
12449 ac_cv_sizeof__Bool=`cat conftest.val`
12450else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012451 echo "$as_me: program exited with status $ac_status" >&5
12452echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012453sed 's/^/| /' conftest.$ac_ext >&5
12454
12455( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012457 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012458See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012459echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012460See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012461 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462 else
12463 ac_cv_sizeof__Bool=0
12464 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466rm -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 +000012467fi
12468rm -f conftest.val
12469fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012470{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12471echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472
12473
12474
Thomas Woutersb2137042007-02-01 18:02:27 +000012475cat >>confdefs.h <<_ACEOF
12476#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12477_ACEOF
12478
12479
12480fi
12481
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012482{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12483echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012484if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012485 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012486else
12487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012488/* confdefs.h. */
12489_ACEOF
12490cat confdefs.h >>conftest.$ac_ext
12491cat >>conftest.$ac_ext <<_ACEOF
12492/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012493#ifdef HAVE_STDINT_H
12494 #include <stdint.h>
12495 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012496
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012497typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012498int
12499main ()
12500{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012501if ((ac__type_new_ *) 0)
12502 return 0;
12503if (sizeof (ac__type_new_))
12504 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 ;
12506 return 0;
12507}
12508_ACEOF
12509rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510if { (ac_try="$ac_compile"
12511case "(($ac_try" in
12512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12513 *) ac_try_echo=$ac_try;;
12514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012518 grep -v '^ *+' conftest.er1 >conftest.err
12519 rm -f conftest.er1
12520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522 (exit $ac_status); } && {
12523 test -z "$ac_c_werror_flag" ||
12524 test ! -s conftest.err
12525 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012526 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012529sed 's/^/| /' conftest.$ac_ext >&5
12530
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012531 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533
12534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012535fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012536{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12537echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12538if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012539
12540cat >>confdefs.h <<_ACEOF
12541#define HAVE_UINTPTR_T 1
12542_ACEOF
12543
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012544{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12545echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12546if test "${ac_cv_type_uintptr_t+set}" = set; then
12547 echo $ECHO_N "(cached) $ECHO_C" >&6
12548else
12549 cat >conftest.$ac_ext <<_ACEOF
12550/* confdefs.h. */
12551_ACEOF
12552cat confdefs.h >>conftest.$ac_ext
12553cat >>conftest.$ac_ext <<_ACEOF
12554/* end confdefs.h. */
12555$ac_includes_default
12556typedef uintptr_t ac__type_new_;
12557int
12558main ()
12559{
12560if ((ac__type_new_ *) 0)
12561 return 0;
12562if (sizeof (ac__type_new_))
12563 return 0;
12564 ;
12565 return 0;
12566}
12567_ACEOF
12568rm -f conftest.$ac_objext
12569if { (ac_try="$ac_compile"
12570case "(($ac_try" in
12571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12572 *) ac_try_echo=$ac_try;;
12573esac
12574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12575 (eval "$ac_compile") 2>conftest.er1
12576 ac_status=$?
12577 grep -v '^ *+' conftest.er1 >conftest.err
12578 rm -f conftest.er1
12579 cat conftest.err >&5
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); } && {
12582 test -z "$ac_c_werror_flag" ||
12583 test ! -s conftest.err
12584 } && test -s conftest.$ac_objext; then
12585 ac_cv_type_uintptr_t=yes
12586else
12587 echo "$as_me: failed program was:" >&5
12588sed 's/^/| /' conftest.$ac_ext >&5
12589
12590 ac_cv_type_uintptr_t=no
12591fi
12592
12593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12594fi
12595{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12596echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598# The cast to long int works around a bug in the HP C Compiler
12599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12601# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012602{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12603echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012604if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012605 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 if test "$cross_compiling" = yes; then
12608 # Depending upon the size, compute the lo and hi bounds.
12609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012610/* confdefs.h. */
12611_ACEOF
12612cat confdefs.h >>conftest.$ac_ext
12613cat >>conftest.$ac_ext <<_ACEOF
12614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012615$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012616 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012617int
12618main ()
12619{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012621test_array [0] = 0
12622
12623 ;
12624 return 0;
12625}
12626_ACEOF
12627rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628if { (ac_try="$ac_compile"
12629case "(($ac_try" in
12630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12631 *) ac_try_echo=$ac_try;;
12632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012636 grep -v '^ *+' conftest.er1 >conftest.err
12637 rm -f conftest.er1
12638 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012640 (exit $ac_status); } && {
12641 test -z "$ac_c_werror_flag" ||
12642 test ! -s conftest.err
12643 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 ac_lo=0 ac_mid=0
12645 while :; do
12646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012647/* confdefs.h. */
12648_ACEOF
12649cat confdefs.h >>conftest.$ac_ext
12650cat >>conftest.$ac_ext <<_ACEOF
12651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012652$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012653 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012654int
12655main ()
12656{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012657static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012658test_array [0] = 0
12659
12660 ;
12661 return 0;
12662}
12663_ACEOF
12664rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665if { (ac_try="$ac_compile"
12666case "(($ac_try" in
12667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12668 *) ac_try_echo=$ac_try;;
12669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012673 grep -v '^ *+' conftest.er1 >conftest.err
12674 rm -f conftest.er1
12675 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677 (exit $ac_status); } && {
12678 test -z "$ac_c_werror_flag" ||
12679 test ! -s conftest.err
12680 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ac_hi=$ac_mid; break
12682else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012684sed 's/^/| /' conftest.$ac_ext >&5
12685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012686 ac_lo=`expr $ac_mid + 1`
12687 if test $ac_lo -le $ac_mid; then
12688 ac_lo= ac_hi=
12689 break
12690 fi
12691 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693
12694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 done
12696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012698sed 's/^/| /' conftest.$ac_ext >&5
12699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012701/* confdefs.h. */
12702_ACEOF
12703cat confdefs.h >>conftest.$ac_ext
12704cat >>conftest.$ac_ext <<_ACEOF
12705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012706$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012707 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012708int
12709main ()
12710{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012712test_array [0] = 0
12713
12714 ;
12715 return 0;
12716}
12717_ACEOF
12718rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719if { (ac_try="$ac_compile"
12720case "(($ac_try" in
12721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12722 *) ac_try_echo=$ac_try;;
12723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012727 grep -v '^ *+' conftest.er1 >conftest.err
12728 rm -f conftest.er1
12729 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731 (exit $ac_status); } && {
12732 test -z "$ac_c_werror_flag" ||
12733 test ! -s conftest.err
12734 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ac_hi=-1 ac_mid=-1
12736 while :; do
12737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* confdefs.h. */
12739_ACEOF
12740cat confdefs.h >>conftest.$ac_ext
12741cat >>conftest.$ac_ext <<_ACEOF
12742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012743$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012744 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012745int
12746main ()
12747{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012749test_array [0] = 0
12750
12751 ;
12752 return 0;
12753}
12754_ACEOF
12755rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756if { (ac_try="$ac_compile"
12757case "(($ac_try" in
12758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12759 *) ac_try_echo=$ac_try;;
12760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012764 grep -v '^ *+' conftest.er1 >conftest.err
12765 rm -f conftest.er1
12766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768 (exit $ac_status); } && {
12769 test -z "$ac_c_werror_flag" ||
12770 test ! -s conftest.err
12771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012772 ac_lo=$ac_mid; break
12773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012775sed 's/^/| /' conftest.$ac_ext >&5
12776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777 ac_hi=`expr '(' $ac_mid ')' - 1`
12778 if test $ac_mid -le $ac_hi; then
12779 ac_lo= ac_hi=
12780 break
12781 fi
12782 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784
12785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 done
12787else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012789sed 's/^/| /' conftest.$ac_ext >&5
12790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793
12794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796
12797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798# Binary search between lo and hi bounds.
12799while test "x$ac_lo" != "x$ac_hi"; do
12800 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012802/* confdefs.h. */
12803_ACEOF
12804cat confdefs.h >>conftest.$ac_ext
12805cat >>conftest.$ac_ext <<_ACEOF
12806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012807$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012808 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012809int
12810main ()
12811{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012812static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012813test_array [0] = 0
12814
12815 ;
12816 return 0;
12817}
12818_ACEOF
12819rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820if { (ac_try="$ac_compile"
12821case "(($ac_try" in
12822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12823 *) ac_try_echo=$ac_try;;
12824esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012828 grep -v '^ *+' conftest.er1 >conftest.err
12829 rm -f conftest.er1
12830 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832 (exit $ac_status); } && {
12833 test -z "$ac_c_werror_flag" ||
12834 test ! -s conftest.err
12835 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 ac_hi=$ac_mid
12837else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012839sed 's/^/| /' conftest.$ac_ext >&5
12840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012841 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843
12844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012845done
12846case $ac_lo in
12847?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012848'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012849 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012850See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012851echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012852See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012853 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854 else
12855 ac_cv_sizeof_uintptr_t=0
12856 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012857esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012858else
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012860/* confdefs.h. */
12861_ACEOF
12862cat confdefs.h >>conftest.$ac_ext
12863cat >>conftest.$ac_ext <<_ACEOF
12864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012865$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012866 typedef uintptr_t ac__type_sizeof_;
12867static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12868static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012869#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012870#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012871int
12872main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012873{
Martin v. Löwis11437992002-04-12 09:54:03 +000012874
12875 FILE *f = fopen ("conftest.val", "w");
12876 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012878 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012881 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012882 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012883 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 }
12885 else
12886 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012888 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012890 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
12894 ;
12895 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012896}
Martin v. Löwis11437992002-04-12 09:54:03 +000012897_ACEOF
12898rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899if { (ac_try="$ac_link"
12900case "(($ac_try" in
12901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12902 *) ac_try_echo=$ac_try;;
12903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909 { (case "(($ac_try" in
12910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12911 *) ac_try_echo=$ac_try;;
12912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 (exit $ac_status); }; }; then
12918 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012919else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012920 echo "$as_me: program exited with status $ac_status" >&5
12921echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012922sed 's/^/| /' conftest.$ac_ext >&5
12923
Martin v. Löwis11437992002-04-12 09:54:03 +000012924( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012926 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012927See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012928echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012929See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012930 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931 else
12932 ac_cv_sizeof_uintptr_t=0
12933 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935rm -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 +000012936fi
12937rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012938fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012939{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12940echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941
12942
12943
Martin v. Löwis11437992002-04-12 09:54:03 +000012944cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012945#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012946_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012947
Michael W. Hudson54241132001-12-07 15:38:26 +000012948
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012949fi
12950
Thomas Wouters89f507f2006-12-13 04:49:30 +000012951
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012952{ echo "$as_me:$LINENO: checking for off_t" >&5
12953echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12954if test "${ac_cv_type_off_t+set}" = set; then
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
12956else
12957 cat >conftest.$ac_ext <<_ACEOF
12958/* confdefs.h. */
12959_ACEOF
12960cat confdefs.h >>conftest.$ac_ext
12961cat >>conftest.$ac_ext <<_ACEOF
12962/* end confdefs.h. */
12963
12964#ifdef HAVE_SYS_TYPES_H
12965#include <sys/types.h>
12966#endif
12967
12968
12969typedef off_t ac__type_new_;
12970int
12971main ()
12972{
12973if ((ac__type_new_ *) 0)
12974 return 0;
12975if (sizeof (ac__type_new_))
12976 return 0;
12977 ;
12978 return 0;
12979}
12980_ACEOF
12981rm -f conftest.$ac_objext
12982if { (ac_try="$ac_compile"
12983case "(($ac_try" in
12984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12985 *) ac_try_echo=$ac_try;;
12986esac
12987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12988 (eval "$ac_compile") 2>conftest.er1
12989 ac_status=$?
12990 grep -v '^ *+' conftest.er1 >conftest.err
12991 rm -f conftest.er1
12992 cat conftest.err >&5
12993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994 (exit $ac_status); } && {
12995 test -z "$ac_c_werror_flag" ||
12996 test ! -s conftest.err
12997 } && test -s conftest.$ac_objext; then
12998 ac_cv_type_off_t=yes
12999else
13000 echo "$as_me: failed program was:" >&5
13001sed 's/^/| /' conftest.$ac_ext >&5
13002
13003 ac_cv_type_off_t=no
13004fi
13005
13006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13007fi
13008{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13009echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013011# The cast to long int works around a bug in the HP C Compiler
13012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13014# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013015{ echo "$as_me:$LINENO: checking size of off_t" >&5
13016echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013017if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013018 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013019else
13020 if test "$cross_compiling" = yes; then
13021 # Depending upon the size, compute the lo and hi bounds.
13022cat >conftest.$ac_ext <<_ACEOF
13023/* confdefs.h. */
13024_ACEOF
13025cat confdefs.h >>conftest.$ac_ext
13026cat >>conftest.$ac_ext <<_ACEOF
13027/* end confdefs.h. */
13028
13029#ifdef HAVE_SYS_TYPES_H
13030#include <sys/types.h>
13031#endif
13032
13033
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013034 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013035int
13036main ()
13037{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013039test_array [0] = 0
13040
13041 ;
13042 return 0;
13043}
13044_ACEOF
13045rm -f conftest.$ac_objext
13046if { (ac_try="$ac_compile"
13047case "(($ac_try" in
13048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13049 *) ac_try_echo=$ac_try;;
13050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013052 (eval "$ac_compile") 2>conftest.er1
13053 ac_status=$?
13054 grep -v '^ *+' conftest.er1 >conftest.err
13055 rm -f conftest.er1
13056 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013058 (exit $ac_status); } && {
13059 test -z "$ac_c_werror_flag" ||
13060 test ! -s conftest.err
13061 } && test -s conftest.$ac_objext; then
13062 ac_lo=0 ac_mid=0
13063 while :; do
13064 cat >conftest.$ac_ext <<_ACEOF
13065/* confdefs.h. */
13066_ACEOF
13067cat confdefs.h >>conftest.$ac_ext
13068cat >>conftest.$ac_ext <<_ACEOF
13069/* end confdefs.h. */
13070
13071#ifdef HAVE_SYS_TYPES_H
13072#include <sys/types.h>
13073#endif
13074
13075
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013076 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013077int
13078main ()
13079{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013080static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013081test_array [0] = 0
13082
13083 ;
13084 return 0;
13085}
13086_ACEOF
13087rm -f conftest.$ac_objext
13088if { (ac_try="$ac_compile"
13089case "(($ac_try" in
13090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13091 *) ac_try_echo=$ac_try;;
13092esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013094 (eval "$ac_compile") 2>conftest.er1
13095 ac_status=$?
13096 grep -v '^ *+' conftest.er1 >conftest.err
13097 rm -f conftest.er1
13098 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013100 (exit $ac_status); } && {
13101 test -z "$ac_c_werror_flag" ||
13102 test ! -s conftest.err
13103 } && test -s conftest.$ac_objext; then
13104 ac_hi=$ac_mid; break
13105else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013106 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013107sed 's/^/| /' conftest.$ac_ext >&5
13108
13109 ac_lo=`expr $ac_mid + 1`
13110 if test $ac_lo -le $ac_mid; then
13111 ac_lo= ac_hi=
13112 break
13113 fi
13114 ac_mid=`expr 2 '*' $ac_mid + 1`
13115fi
13116
13117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13118 done
13119else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013120 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013121sed 's/^/| /' conftest.$ac_ext >&5
13122
13123 cat >conftest.$ac_ext <<_ACEOF
13124/* confdefs.h. */
13125_ACEOF
13126cat confdefs.h >>conftest.$ac_ext
13127cat >>conftest.$ac_ext <<_ACEOF
13128/* end confdefs.h. */
13129
13130#ifdef HAVE_SYS_TYPES_H
13131#include <sys/types.h>
13132#endif
13133
13134
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013135 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013136int
13137main ()
13138{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013139static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013140test_array [0] = 0
13141
13142 ;
13143 return 0;
13144}
13145_ACEOF
13146rm -f conftest.$ac_objext
13147if { (ac_try="$ac_compile"
13148case "(($ac_try" in
13149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13150 *) ac_try_echo=$ac_try;;
13151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013153 (eval "$ac_compile") 2>conftest.er1
13154 ac_status=$?
13155 grep -v '^ *+' conftest.er1 >conftest.err
13156 rm -f conftest.er1
13157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013159 (exit $ac_status); } && {
13160 test -z "$ac_c_werror_flag" ||
13161 test ! -s conftest.err
13162 } && test -s conftest.$ac_objext; then
13163 ac_hi=-1 ac_mid=-1
13164 while :; do
13165 cat >conftest.$ac_ext <<_ACEOF
13166/* confdefs.h. */
13167_ACEOF
13168cat confdefs.h >>conftest.$ac_ext
13169cat >>conftest.$ac_ext <<_ACEOF
13170/* end confdefs.h. */
13171
13172#ifdef HAVE_SYS_TYPES_H
13173#include <sys/types.h>
13174#endif
13175
13176
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013177 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013178int
13179main ()
13180{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013181static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013182test_array [0] = 0
13183
13184 ;
13185 return 0;
13186}
13187_ACEOF
13188rm -f conftest.$ac_objext
13189if { (ac_try="$ac_compile"
13190case "(($ac_try" in
13191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13192 *) ac_try_echo=$ac_try;;
13193esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013195 (eval "$ac_compile") 2>conftest.er1
13196 ac_status=$?
13197 grep -v '^ *+' conftest.er1 >conftest.err
13198 rm -f conftest.er1
13199 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013201 (exit $ac_status); } && {
13202 test -z "$ac_c_werror_flag" ||
13203 test ! -s conftest.err
13204 } && test -s conftest.$ac_objext; then
13205 ac_lo=$ac_mid; break
13206else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013207 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013208sed 's/^/| /' conftest.$ac_ext >&5
13209
13210 ac_hi=`expr '(' $ac_mid ')' - 1`
13211 if test $ac_mid -le $ac_hi; then
13212 ac_lo= ac_hi=
13213 break
13214 fi
13215 ac_mid=`expr 2 '*' $ac_mid`
13216fi
13217
13218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13219 done
13220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013221 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013222sed 's/^/| /' conftest.$ac_ext >&5
13223
13224 ac_lo= ac_hi=
13225fi
13226
13227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13228fi
13229
13230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13231# Binary search between lo and hi bounds.
13232while test "x$ac_lo" != "x$ac_hi"; do
13233 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13234 cat >conftest.$ac_ext <<_ACEOF
13235/* confdefs.h. */
13236_ACEOF
13237cat confdefs.h >>conftest.$ac_ext
13238cat >>conftest.$ac_ext <<_ACEOF
13239/* end confdefs.h. */
13240
13241#ifdef HAVE_SYS_TYPES_H
13242#include <sys/types.h>
13243#endif
13244
13245
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013246 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013247int
13248main ()
13249{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013251test_array [0] = 0
13252
13253 ;
13254 return 0;
13255}
13256_ACEOF
13257rm -f conftest.$ac_objext
13258if { (ac_try="$ac_compile"
13259case "(($ac_try" in
13260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13261 *) ac_try_echo=$ac_try;;
13262esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013264 (eval "$ac_compile") 2>conftest.er1
13265 ac_status=$?
13266 grep -v '^ *+' conftest.er1 >conftest.err
13267 rm -f conftest.er1
13268 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013270 (exit $ac_status); } && {
13271 test -z "$ac_c_werror_flag" ||
13272 test ! -s conftest.err
13273 } && test -s conftest.$ac_objext; then
13274 ac_hi=$ac_mid
13275else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013276 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013277sed 's/^/| /' conftest.$ac_ext >&5
13278
13279 ac_lo=`expr '(' $ac_mid ')' + 1`
13280fi
13281
13282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13283done
13284case $ac_lo in
13285?*) ac_cv_sizeof_off_t=$ac_lo;;
13286'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013287 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013288See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013289echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013290See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013291 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013292 else
13293 ac_cv_sizeof_off_t=0
13294 fi ;;
13295esac
13296else
13297 cat >conftest.$ac_ext <<_ACEOF
13298/* confdefs.h. */
13299_ACEOF
13300cat confdefs.h >>conftest.$ac_ext
13301cat >>conftest.$ac_ext <<_ACEOF
13302/* end confdefs.h. */
13303
13304#ifdef HAVE_SYS_TYPES_H
13305#include <sys/types.h>
13306#endif
13307
13308
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013309 typedef off_t ac__type_sizeof_;
13310static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13311static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013312#include <stdio.h>
13313#include <stdlib.h>
13314int
13315main ()
13316{
13317
13318 FILE *f = fopen ("conftest.val", "w");
13319 if (! f)
13320 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013321 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013322 {
13323 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013324 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013325 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013326 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013327 }
13328 else
13329 {
13330 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013331 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013332 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013333 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334 }
13335 return ferror (f) || fclose (f) != 0;
13336
13337 ;
13338 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013339}
Martin v. Löwis11437992002-04-12 09:54:03 +000013340_ACEOF
13341rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342if { (ac_try="$ac_link"
13343case "(($ac_try" in
13344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13345 *) ac_try_echo=$ac_try;;
13346esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013349 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352 { (case "(($ac_try" in
13353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13354 *) ac_try_echo=$ac_try;;
13355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013361 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013362else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013363 echo "$as_me: program exited with status $ac_status" >&5
13364echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013365sed 's/^/| /' conftest.$ac_ext >&5
13366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013368if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013369 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013370See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013371echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013372See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013373 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013374 else
13375 ac_cv_sizeof_off_t=0
13376 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378rm -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 +000013379fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013380rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013381fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013382{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13383echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013385
13386
Martin v. Löwis11437992002-04-12 09:54:03 +000013387cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013388#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013389_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013390
Michael W. Hudson54241132001-12-07 15:38:26 +000013391
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013392
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013393{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13394echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013395if test "$have_long_long" = yes -a \
13396 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13397 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013398
Martin v. Löwis11437992002-04-12 09:54:03 +000013399cat >>confdefs.h <<\_ACEOF
13400#define HAVE_LARGEFILE_SUPPORT 1
13401_ACEOF
13402
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013403 { echo "$as_me:$LINENO: result: yes" >&5
13404echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013405else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013406 { echo "$as_me:$LINENO: result: no" >&5
13407echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013408fi
13409
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013410{ echo "$as_me:$LINENO: checking for time_t" >&5
13411echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13412if test "${ac_cv_type_time_t+set}" = set; then
13413 echo $ECHO_N "(cached) $ECHO_C" >&6
13414else
13415 cat >conftest.$ac_ext <<_ACEOF
13416/* confdefs.h. */
13417_ACEOF
13418cat confdefs.h >>conftest.$ac_ext
13419cat >>conftest.$ac_ext <<_ACEOF
13420/* end confdefs.h. */
13421
13422#ifdef HAVE_SYS_TYPES_H
13423#include <sys/types.h>
13424#endif
13425#ifdef HAVE_TIME_H
13426#include <time.h>
13427#endif
13428
13429
13430typedef time_t ac__type_new_;
13431int
13432main ()
13433{
13434if ((ac__type_new_ *) 0)
13435 return 0;
13436if (sizeof (ac__type_new_))
13437 return 0;
13438 ;
13439 return 0;
13440}
13441_ACEOF
13442rm -f conftest.$ac_objext
13443if { (ac_try="$ac_compile"
13444case "(($ac_try" in
13445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13446 *) ac_try_echo=$ac_try;;
13447esac
13448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13449 (eval "$ac_compile") 2>conftest.er1
13450 ac_status=$?
13451 grep -v '^ *+' conftest.er1 >conftest.err
13452 rm -f conftest.er1
13453 cat conftest.err >&5
13454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13455 (exit $ac_status); } && {
13456 test -z "$ac_c_werror_flag" ||
13457 test ! -s conftest.err
13458 } && test -s conftest.$ac_objext; then
13459 ac_cv_type_time_t=yes
13460else
13461 echo "$as_me: failed program was:" >&5
13462sed 's/^/| /' conftest.$ac_ext >&5
13463
13464 ac_cv_type_time_t=no
13465fi
13466
13467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13468fi
13469{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13470echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13471
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013472# The cast to long int works around a bug in the HP C Compiler
13473# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13474# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13475# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013476{ echo "$as_me:$LINENO: checking size of time_t" >&5
13477echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013478if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013479 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013480else
13481 if test "$cross_compiling" = yes; then
13482 # Depending upon the size, compute the lo and hi bounds.
13483cat >conftest.$ac_ext <<_ACEOF
13484/* confdefs.h. */
13485_ACEOF
13486cat confdefs.h >>conftest.$ac_ext
13487cat >>conftest.$ac_ext <<_ACEOF
13488/* end confdefs.h. */
13489
13490#ifdef HAVE_SYS_TYPES_H
13491#include <sys/types.h>
13492#endif
13493#ifdef HAVE_TIME_H
13494#include <time.h>
13495#endif
13496
13497
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013498 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013499int
13500main ()
13501{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013502static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013503test_array [0] = 0
13504
13505 ;
13506 return 0;
13507}
13508_ACEOF
13509rm -f conftest.$ac_objext
13510if { (ac_try="$ac_compile"
13511case "(($ac_try" in
13512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13513 *) ac_try_echo=$ac_try;;
13514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013516 (eval "$ac_compile") 2>conftest.er1
13517 ac_status=$?
13518 grep -v '^ *+' conftest.er1 >conftest.err
13519 rm -f conftest.er1
13520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013522 (exit $ac_status); } && {
13523 test -z "$ac_c_werror_flag" ||
13524 test ! -s conftest.err
13525 } && test -s conftest.$ac_objext; then
13526 ac_lo=0 ac_mid=0
13527 while :; do
13528 cat >conftest.$ac_ext <<_ACEOF
13529/* confdefs.h. */
13530_ACEOF
13531cat confdefs.h >>conftest.$ac_ext
13532cat >>conftest.$ac_ext <<_ACEOF
13533/* end confdefs.h. */
13534
13535#ifdef HAVE_SYS_TYPES_H
13536#include <sys/types.h>
13537#endif
13538#ifdef HAVE_TIME_H
13539#include <time.h>
13540#endif
13541
13542
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013543 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013544int
13545main ()
13546{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013547static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013548test_array [0] = 0
13549
13550 ;
13551 return 0;
13552}
13553_ACEOF
13554rm -f conftest.$ac_objext
13555if { (ac_try="$ac_compile"
13556case "(($ac_try" in
13557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13558 *) ac_try_echo=$ac_try;;
13559esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013561 (eval "$ac_compile") 2>conftest.er1
13562 ac_status=$?
13563 grep -v '^ *+' conftest.er1 >conftest.err
13564 rm -f conftest.er1
13565 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013567 (exit $ac_status); } && {
13568 test -z "$ac_c_werror_flag" ||
13569 test ! -s conftest.err
13570 } && test -s conftest.$ac_objext; then
13571 ac_hi=$ac_mid; break
13572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013573 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013574sed 's/^/| /' conftest.$ac_ext >&5
13575
13576 ac_lo=`expr $ac_mid + 1`
13577 if test $ac_lo -le $ac_mid; then
13578 ac_lo= ac_hi=
13579 break
13580 fi
13581 ac_mid=`expr 2 '*' $ac_mid + 1`
13582fi
13583
13584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13585 done
13586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013587 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013588sed 's/^/| /' conftest.$ac_ext >&5
13589
13590 cat >conftest.$ac_ext <<_ACEOF
13591/* confdefs.h. */
13592_ACEOF
13593cat confdefs.h >>conftest.$ac_ext
13594cat >>conftest.$ac_ext <<_ACEOF
13595/* end confdefs.h. */
13596
13597#ifdef HAVE_SYS_TYPES_H
13598#include <sys/types.h>
13599#endif
13600#ifdef HAVE_TIME_H
13601#include <time.h>
13602#endif
13603
13604
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013605 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013606int
13607main ()
13608{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013609static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013610test_array [0] = 0
13611
13612 ;
13613 return 0;
13614}
13615_ACEOF
13616rm -f conftest.$ac_objext
13617if { (ac_try="$ac_compile"
13618case "(($ac_try" in
13619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13620 *) ac_try_echo=$ac_try;;
13621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013623 (eval "$ac_compile") 2>conftest.er1
13624 ac_status=$?
13625 grep -v '^ *+' conftest.er1 >conftest.err
13626 rm -f conftest.er1
13627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013629 (exit $ac_status); } && {
13630 test -z "$ac_c_werror_flag" ||
13631 test ! -s conftest.err
13632 } && test -s conftest.$ac_objext; then
13633 ac_hi=-1 ac_mid=-1
13634 while :; do
13635 cat >conftest.$ac_ext <<_ACEOF
13636/* confdefs.h. */
13637_ACEOF
13638cat confdefs.h >>conftest.$ac_ext
13639cat >>conftest.$ac_ext <<_ACEOF
13640/* end confdefs.h. */
13641
13642#ifdef HAVE_SYS_TYPES_H
13643#include <sys/types.h>
13644#endif
13645#ifdef HAVE_TIME_H
13646#include <time.h>
13647#endif
13648
13649
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013650 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651int
13652main ()
13653{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013654static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655test_array [0] = 0
13656
13657 ;
13658 return 0;
13659}
13660_ACEOF
13661rm -f conftest.$ac_objext
13662if { (ac_try="$ac_compile"
13663case "(($ac_try" in
13664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13665 *) ac_try_echo=$ac_try;;
13666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013668 (eval "$ac_compile") 2>conftest.er1
13669 ac_status=$?
13670 grep -v '^ *+' conftest.er1 >conftest.err
13671 rm -f conftest.er1
13672 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013674 (exit $ac_status); } && {
13675 test -z "$ac_c_werror_flag" ||
13676 test ! -s conftest.err
13677 } && test -s conftest.$ac_objext; then
13678 ac_lo=$ac_mid; break
13679else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013680 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013681sed 's/^/| /' conftest.$ac_ext >&5
13682
13683 ac_hi=`expr '(' $ac_mid ')' - 1`
13684 if test $ac_mid -le $ac_hi; then
13685 ac_lo= ac_hi=
13686 break
13687 fi
13688 ac_mid=`expr 2 '*' $ac_mid`
13689fi
13690
13691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13692 done
13693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013694 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013695sed 's/^/| /' conftest.$ac_ext >&5
13696
13697 ac_lo= ac_hi=
13698fi
13699
13700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13701fi
13702
13703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13704# Binary search between lo and hi bounds.
13705while test "x$ac_lo" != "x$ac_hi"; do
13706 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13707 cat >conftest.$ac_ext <<_ACEOF
13708/* confdefs.h. */
13709_ACEOF
13710cat confdefs.h >>conftest.$ac_ext
13711cat >>conftest.$ac_ext <<_ACEOF
13712/* end confdefs.h. */
13713
13714#ifdef HAVE_SYS_TYPES_H
13715#include <sys/types.h>
13716#endif
13717#ifdef HAVE_TIME_H
13718#include <time.h>
13719#endif
13720
13721
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013722 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013723int
13724main ()
13725{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013727test_array [0] = 0
13728
13729 ;
13730 return 0;
13731}
13732_ACEOF
13733rm -f conftest.$ac_objext
13734if { (ac_try="$ac_compile"
13735case "(($ac_try" in
13736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13737 *) ac_try_echo=$ac_try;;
13738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013740 (eval "$ac_compile") 2>conftest.er1
13741 ac_status=$?
13742 grep -v '^ *+' conftest.er1 >conftest.err
13743 rm -f conftest.er1
13744 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013746 (exit $ac_status); } && {
13747 test -z "$ac_c_werror_flag" ||
13748 test ! -s conftest.err
13749 } && test -s conftest.$ac_objext; then
13750 ac_hi=$ac_mid
13751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013752 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013753sed 's/^/| /' conftest.$ac_ext >&5
13754
13755 ac_lo=`expr '(' $ac_mid ')' + 1`
13756fi
13757
13758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13759done
13760case $ac_lo in
13761?*) ac_cv_sizeof_time_t=$ac_lo;;
13762'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013763 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013764See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013765echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013766See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013767 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013768 else
13769 ac_cv_sizeof_time_t=0
13770 fi ;;
13771esac
13772else
13773 cat >conftest.$ac_ext <<_ACEOF
13774/* confdefs.h. */
13775_ACEOF
13776cat confdefs.h >>conftest.$ac_ext
13777cat >>conftest.$ac_ext <<_ACEOF
13778/* end confdefs.h. */
13779
13780#ifdef HAVE_SYS_TYPES_H
13781#include <sys/types.h>
13782#endif
13783#ifdef HAVE_TIME_H
13784#include <time.h>
13785#endif
13786
13787
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013788 typedef time_t ac__type_sizeof_;
13789static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13790static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013791#include <stdio.h>
13792#include <stdlib.h>
13793int
13794main ()
13795{
13796
13797 FILE *f = fopen ("conftest.val", "w");
13798 if (! f)
13799 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013800 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013801 {
13802 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013803 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013804 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013805 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013806 }
13807 else
13808 {
13809 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013810 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013811 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013812 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013813 }
13814 return ferror (f) || fclose (f) != 0;
13815
13816 ;
13817 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013818}
Martin v. Löwis11437992002-04-12 09:54:03 +000013819_ACEOF
13820rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821if { (ac_try="$ac_link"
13822case "(($ac_try" in
13823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13824 *) ac_try_echo=$ac_try;;
13825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831 { (case "(($ac_try" in
13832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13833 *) ac_try_echo=$ac_try;;
13834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013840 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013841else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013842 echo "$as_me: program exited with status $ac_status" >&5
13843echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013844sed 's/^/| /' conftest.$ac_ext >&5
13845
Martin v. Löwis11437992002-04-12 09:54:03 +000013846( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013847if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013848 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013849See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013850echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013851See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013852 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013853 else
13854 ac_cv_sizeof_time_t=0
13855 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013857rm -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 +000013858fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013859rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013860fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013861{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13862echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013863
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013864
13865
Martin v. Löwis11437992002-04-12 09:54:03 +000013866cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013867#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013868_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013869
Michael W. Hudson54241132001-12-07 15:38:26 +000013870
13871
Trent Mick635f6fb2000-08-23 21:33:05 +000013872# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013873ac_save_cc="$CC"
13874if test "$ac_cv_kpthread" = "yes"
13875then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013876elif test "$ac_cv_kthread" = "yes"
13877then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013878elif test "$ac_cv_pthread" = "yes"
13879then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013880fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013881
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013882{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13883echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013884have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013885cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013886/* confdefs.h. */
13887_ACEOF
13888cat confdefs.h >>conftest.$ac_ext
13889cat >>conftest.$ac_ext <<_ACEOF
13890/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013891#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013892int
13893main ()
13894{
Guido van Rossum12580492000-09-24 16:47:19 +000013895pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 ;
13897 return 0;
13898}
13899_ACEOF
13900rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901if { (ac_try="$ac_compile"
13902case "(($ac_try" in
13903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13904 *) ac_try_echo=$ac_try;;
13905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013909 grep -v '^ *+' conftest.er1 >conftest.err
13910 rm -f conftest.er1
13911 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913 (exit $ac_status); } && {
13914 test -z "$ac_c_werror_flag" ||
13915 test ! -s conftest.err
13916 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013917 have_pthread_t=yes
13918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013920sed 's/^/| /' conftest.$ac_ext >&5
13921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922
Trent Mick635f6fb2000-08-23 21:33:05 +000013923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924
13925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013926{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13927echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013928if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013929 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13930echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13931if test "${ac_cv_type_pthread_t+set}" = set; then
13932 echo $ECHO_N "(cached) $ECHO_C" >&6
13933else
13934 cat >conftest.$ac_ext <<_ACEOF
13935/* confdefs.h. */
13936_ACEOF
13937cat confdefs.h >>conftest.$ac_ext
13938cat >>conftest.$ac_ext <<_ACEOF
13939/* end confdefs.h. */
13940
13941#ifdef HAVE_PTHREAD_H
13942#include <pthread.h>
13943#endif
13944
13945
13946typedef pthread_t ac__type_new_;
13947int
13948main ()
13949{
13950if ((ac__type_new_ *) 0)
13951 return 0;
13952if (sizeof (ac__type_new_))
13953 return 0;
13954 ;
13955 return 0;
13956}
13957_ACEOF
13958rm -f conftest.$ac_objext
13959if { (ac_try="$ac_compile"
13960case "(($ac_try" in
13961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13962 *) ac_try_echo=$ac_try;;
13963esac
13964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13965 (eval "$ac_compile") 2>conftest.er1
13966 ac_status=$?
13967 grep -v '^ *+' conftest.er1 >conftest.err
13968 rm -f conftest.er1
13969 cat conftest.err >&5
13970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13971 (exit $ac_status); } && {
13972 test -z "$ac_c_werror_flag" ||
13973 test ! -s conftest.err
13974 } && test -s conftest.$ac_objext; then
13975 ac_cv_type_pthread_t=yes
13976else
13977 echo "$as_me: failed program was:" >&5
13978sed 's/^/| /' conftest.$ac_ext >&5
13979
13980 ac_cv_type_pthread_t=no
13981fi
13982
13983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13984fi
13985{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13986echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13987
13988# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13991# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013992{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
13993echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013994if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013995 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013996else
13997 if test "$cross_compiling" = yes; then
13998 # Depending upon the size, compute the lo and hi bounds.
13999cat >conftest.$ac_ext <<_ACEOF
14000/* confdefs.h. */
14001_ACEOF
14002cat confdefs.h >>conftest.$ac_ext
14003cat >>conftest.$ac_ext <<_ACEOF
14004/* end confdefs.h. */
14005
14006#ifdef HAVE_PTHREAD_H
14007#include <pthread.h>
14008#endif
14009
14010
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014011 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014012int
14013main ()
14014{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014015static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014016test_array [0] = 0
14017
14018 ;
14019 return 0;
14020}
14021_ACEOF
14022rm -f conftest.$ac_objext
14023if { (ac_try="$ac_compile"
14024case "(($ac_try" in
14025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14026 *) ac_try_echo=$ac_try;;
14027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014029 (eval "$ac_compile") 2>conftest.er1
14030 ac_status=$?
14031 grep -v '^ *+' conftest.er1 >conftest.err
14032 rm -f conftest.er1
14033 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014035 (exit $ac_status); } && {
14036 test -z "$ac_c_werror_flag" ||
14037 test ! -s conftest.err
14038 } && test -s conftest.$ac_objext; then
14039 ac_lo=0 ac_mid=0
14040 while :; do
14041 cat >conftest.$ac_ext <<_ACEOF
14042/* confdefs.h. */
14043_ACEOF
14044cat confdefs.h >>conftest.$ac_ext
14045cat >>conftest.$ac_ext <<_ACEOF
14046/* end confdefs.h. */
14047
14048#ifdef HAVE_PTHREAD_H
14049#include <pthread.h>
14050#endif
14051
14052
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014053 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014054int
14055main ()
14056{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014057static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014058test_array [0] = 0
14059
14060 ;
14061 return 0;
14062}
14063_ACEOF
14064rm -f conftest.$ac_objext
14065if { (ac_try="$ac_compile"
14066case "(($ac_try" in
14067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14068 *) ac_try_echo=$ac_try;;
14069esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014071 (eval "$ac_compile") 2>conftest.er1
14072 ac_status=$?
14073 grep -v '^ *+' conftest.er1 >conftest.err
14074 rm -f conftest.er1
14075 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014077 (exit $ac_status); } && {
14078 test -z "$ac_c_werror_flag" ||
14079 test ! -s conftest.err
14080 } && test -s conftest.$ac_objext; then
14081 ac_hi=$ac_mid; break
14082else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014083 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014084sed 's/^/| /' conftest.$ac_ext >&5
14085
14086 ac_lo=`expr $ac_mid + 1`
14087 if test $ac_lo -le $ac_mid; then
14088 ac_lo= ac_hi=
14089 break
14090 fi
14091 ac_mid=`expr 2 '*' $ac_mid + 1`
14092fi
14093
14094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14095 done
14096else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014097 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014098sed 's/^/| /' conftest.$ac_ext >&5
14099
14100 cat >conftest.$ac_ext <<_ACEOF
14101/* confdefs.h. */
14102_ACEOF
14103cat confdefs.h >>conftest.$ac_ext
14104cat >>conftest.$ac_ext <<_ACEOF
14105/* end confdefs.h. */
14106
14107#ifdef HAVE_PTHREAD_H
14108#include <pthread.h>
14109#endif
14110
14111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014112 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014113int
14114main ()
14115{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014116static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014117test_array [0] = 0
14118
14119 ;
14120 return 0;
14121}
14122_ACEOF
14123rm -f conftest.$ac_objext
14124if { (ac_try="$ac_compile"
14125case "(($ac_try" in
14126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14127 *) ac_try_echo=$ac_try;;
14128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014130 (eval "$ac_compile") 2>conftest.er1
14131 ac_status=$?
14132 grep -v '^ *+' conftest.er1 >conftest.err
14133 rm -f conftest.er1
14134 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014136 (exit $ac_status); } && {
14137 test -z "$ac_c_werror_flag" ||
14138 test ! -s conftest.err
14139 } && test -s conftest.$ac_objext; then
14140 ac_hi=-1 ac_mid=-1
14141 while :; do
14142 cat >conftest.$ac_ext <<_ACEOF
14143/* confdefs.h. */
14144_ACEOF
14145cat confdefs.h >>conftest.$ac_ext
14146cat >>conftest.$ac_ext <<_ACEOF
14147/* end confdefs.h. */
14148
14149#ifdef HAVE_PTHREAD_H
14150#include <pthread.h>
14151#endif
14152
14153
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014154 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014155int
14156main ()
14157{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014159test_array [0] = 0
14160
14161 ;
14162 return 0;
14163}
14164_ACEOF
14165rm -f conftest.$ac_objext
14166if { (ac_try="$ac_compile"
14167case "(($ac_try" in
14168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14169 *) ac_try_echo=$ac_try;;
14170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014172 (eval "$ac_compile") 2>conftest.er1
14173 ac_status=$?
14174 grep -v '^ *+' conftest.er1 >conftest.err
14175 rm -f conftest.er1
14176 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178 (exit $ac_status); } && {
14179 test -z "$ac_c_werror_flag" ||
14180 test ! -s conftest.err
14181 } && test -s conftest.$ac_objext; then
14182 ac_lo=$ac_mid; break
14183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014184 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014185sed 's/^/| /' conftest.$ac_ext >&5
14186
14187 ac_hi=`expr '(' $ac_mid ')' - 1`
14188 if test $ac_mid -le $ac_hi; then
14189 ac_lo= ac_hi=
14190 break
14191 fi
14192 ac_mid=`expr 2 '*' $ac_mid`
14193fi
14194
14195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14196 done
14197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014198 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014199sed 's/^/| /' conftest.$ac_ext >&5
14200
14201 ac_lo= ac_hi=
14202fi
14203
14204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205fi
14206
14207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14208# Binary search between lo and hi bounds.
14209while test "x$ac_lo" != "x$ac_hi"; do
14210 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14211 cat >conftest.$ac_ext <<_ACEOF
14212/* confdefs.h. */
14213_ACEOF
14214cat confdefs.h >>conftest.$ac_ext
14215cat >>conftest.$ac_ext <<_ACEOF
14216/* end confdefs.h. */
14217
14218#ifdef HAVE_PTHREAD_H
14219#include <pthread.h>
14220#endif
14221
14222
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014223 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014224int
14225main ()
14226{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014227static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014228test_array [0] = 0
14229
14230 ;
14231 return 0;
14232}
14233_ACEOF
14234rm -f conftest.$ac_objext
14235if { (ac_try="$ac_compile"
14236case "(($ac_try" in
14237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14238 *) ac_try_echo=$ac_try;;
14239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014241 (eval "$ac_compile") 2>conftest.er1
14242 ac_status=$?
14243 grep -v '^ *+' conftest.er1 >conftest.err
14244 rm -f conftest.er1
14245 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247 (exit $ac_status); } && {
14248 test -z "$ac_c_werror_flag" ||
14249 test ! -s conftest.err
14250 } && test -s conftest.$ac_objext; then
14251 ac_hi=$ac_mid
14252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014253 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014254sed 's/^/| /' conftest.$ac_ext >&5
14255
14256 ac_lo=`expr '(' $ac_mid ')' + 1`
14257fi
14258
14259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14260done
14261case $ac_lo in
14262?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14263'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014264 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014265See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014266echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014267See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014268 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014269 else
14270 ac_cv_sizeof_pthread_t=0
14271 fi ;;
14272esac
14273else
14274 cat >conftest.$ac_ext <<_ACEOF
14275/* confdefs.h. */
14276_ACEOF
14277cat confdefs.h >>conftest.$ac_ext
14278cat >>conftest.$ac_ext <<_ACEOF
14279/* end confdefs.h. */
14280
14281#ifdef HAVE_PTHREAD_H
14282#include <pthread.h>
14283#endif
14284
14285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014286 typedef pthread_t ac__type_sizeof_;
14287static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14288static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014289#include <stdio.h>
14290#include <stdlib.h>
14291int
14292main ()
14293{
14294
14295 FILE *f = fopen ("conftest.val", "w");
14296 if (! f)
14297 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014298 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014299 {
14300 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014301 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014302 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014303 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014304 }
14305 else
14306 {
14307 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014308 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014309 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014310 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014311 }
14312 return ferror (f) || fclose (f) != 0;
14313
14314 ;
14315 return 0;
14316}
Martin v. Löwis11437992002-04-12 09:54:03 +000014317_ACEOF
14318rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014319if { (ac_try="$ac_link"
14320case "(($ac_try" in
14321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14322 *) ac_try_echo=$ac_try;;
14323esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014326 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014328 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329 { (case "(($ac_try" in
14330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14331 *) ac_try_echo=$ac_try;;
14332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014337 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014338 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014339else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014340 echo "$as_me: program exited with status $ac_status" >&5
14341echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014342sed 's/^/| /' conftest.$ac_ext >&5
14343
Martin v. Löwis11437992002-04-12 09:54:03 +000014344( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014345if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014346 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014347See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014348echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014349See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014350 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014351 else
14352 ac_cv_sizeof_pthread_t=0
14353 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355rm -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 +000014356fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014357rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014358fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014359{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14360echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014362
14363
Martin v. Löwis11437992002-04-12 09:54:03 +000014364cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014365#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014366_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014368
Trent Mick635f6fb2000-08-23 21:33:05 +000014369fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014370CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014371
Michael W. Hudson54241132001-12-07 15:38:26 +000014372
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014373case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014374 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014375 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14376 ;;
14377 Darwin/*)
14378 OTHER_LIBTOOL_OPT=""
14379 ;;
14380esac
14381
14382
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014383ARCH_RUN_32BIT=""
14384
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014385case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014386 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014387 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14388 if test "${enable_universalsdk}"; then
14389 :
14390 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014391 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014392 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014393 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014394 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014395 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014396 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14397 if test ${gcc_version} '<' 4.0
14398 then
14399 LIBTOOL_CRUFT="-lcc_dynamic"
14400 else
14401 LIBTOOL_CRUFT=""
14402 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014403 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014404 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014405else
14406 cat >conftest.$ac_ext <<_ACEOF
14407/* confdefs.h. */
14408_ACEOF
14409cat confdefs.h >>conftest.$ac_ext
14410cat >>conftest.$ac_ext <<_ACEOF
14411/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014412
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014413 #include <unistd.h>
14414 int main(int argc, char*argv[])
14415 {
14416 if (sizeof(long) == 4) {
14417 return 0;
14418 } else {
14419 return 1;
14420 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014421 }
14422
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014423_ACEOF
14424rm -f conftest$ac_exeext
14425if { (ac_try="$ac_link"
14426case "(($ac_try" in
14427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14428 *) ac_try_echo=$ac_try;;
14429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014431 (eval "$ac_link") 2>&5
14432 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14435 { (case "(($ac_try" in
14436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14437 *) ac_try_echo=$ac_try;;
14438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014440 (eval "$ac_try") 2>&5
14441 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014443 (exit $ac_status); }; }; then
14444 ac_osx_32bit=yes
14445else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014446 echo "$as_me: program exited with status $ac_status" >&5
14447echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014448sed 's/^/| /' conftest.$ac_ext >&5
14449
14450( exit $ac_status )
14451ac_osx_32bit=no
14452fi
14453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14454fi
14455
14456
14457
14458 if test "${ac_osx_32bit}" = "yes"; then
14459 case `arch` in
14460 i386)
14461 MACOSX_DEFAULT_ARCH="i386"
14462 ;;
14463 ppc)
14464 MACOSX_DEFAULT_ARCH="ppc"
14465 ;;
14466 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014467 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14468echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014469 { (exit 1); exit 1; }; }
14470 ;;
14471 esac
14472 else
14473 case `arch` in
14474 i386)
14475 MACOSX_DEFAULT_ARCH="x86_64"
14476 ;;
14477 ppc)
14478 MACOSX_DEFAULT_ARCH="ppc64"
14479 ;;
14480 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014481 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14482echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014483 { (exit 1); exit 1; }; }
14484 ;;
14485 esac
14486
14487 #ARCH_RUN_32BIT="true"
14488 fi
14489
14490 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014491 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014492 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014493esac
14494
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014495{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14496echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014497if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014498then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014499 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014501 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014502
Martin v. Löwis11437992002-04-12 09:54:03 +000014503cat >>confdefs.h <<\_ACEOF
14504#define WITH_NEXT_FRAMEWORK 1
14505_ACEOF
14506
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014507 { echo "$as_me:$LINENO: result: yes" >&5
14508echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014509 if test $enable_shared = "yes"
14510 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014511 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14512echo "$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 +000014513 { (exit 1); exit 1; }; }
14514 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014516 { echo "$as_me:$LINENO: result: no" >&5
14517echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014518fi
14519
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014520{ echo "$as_me:$LINENO: checking for dyld" >&5
14521echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014522case $ac_sys_system/$ac_sys_release in
14523 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014524
Martin v. Löwis11437992002-04-12 09:54:03 +000014525cat >>confdefs.h <<\_ACEOF
14526#define WITH_DYLD 1
14527_ACEOF
14528
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014529 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14530echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014531 ;;
14532 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014533 { echo "$as_me:$LINENO: result: no" >&5
14534echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014535 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014536esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014537
Guido van Rossum0a516c91994-09-12 10:58:40 +000014538# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014539
Michael W. Hudson54241132001-12-07 15:38:26 +000014540
14541
14542
14543
Guido van Rossum0a516c91994-09-12 10:58:40 +000014544# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014545# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014546{ echo "$as_me:$LINENO: checking SO" >&5
14547echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014548if test -z "$SO"
14549then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014550 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014551 hp*|HP*)
14552 case `uname -m` in
14553 ia64) SO=.so;;
14554 *) SO=.sl;;
14555 esac
14556 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014557 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014558 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014559 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014560else
14561 # this might also be a termcap variable, see #610332
14562 echo
14563 echo '====================================================================='
14564 echo '+ +'
14565 echo '+ WARNING: You have set SO in your environment. +'
14566 echo '+ Do you really mean to change the extension for shared libraries? +'
14567 echo '+ Continuing in 10 seconds to let you to ponder. +'
14568 echo '+ +'
14569 echo '====================================================================='
14570 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014571fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014572{ echo "$as_me:$LINENO: result: $SO" >&5
14573echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014574
Georg Brandlb1441c72009-01-03 22:33:39 +000014575
Thomas Wouters477c8d52006-05-27 19:21:47 +000014576cat >>confdefs.h <<_ACEOF
14577#define SHLIB_EXT "$SO"
14578_ACEOF
14579
Guido van Rossum0a516c91994-09-12 10:58:40 +000014580# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014581# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014582# (Shared libraries in this instance are shared modules to be loaded into
14583# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014584{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14585echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014586if test -z "$LDSHARED"
14587then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014588 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014589 AIX*)
14590 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014591 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014592 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014593 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014594 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014595 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014596 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014597 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014598 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014599 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014600 hp*|HP*)
14601 if test "$GCC" = "yes"
14602 then LDSHARED='$(CC) -shared'
14603 else LDSHARED='ld -b';
14604 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014605 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014606 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014607 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14608 if test "$enable_framework" ; then
14609 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014610 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14611 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014612 else
14613 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014614 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014615 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014616 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014617 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14618 if test "$enable_framework" ; then
14619 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014620 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14621 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014622 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014623 # No framework, use the Python app as bundle-loader
14624 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014625 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014626 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014627 Darwin/*)
14628 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14629 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014630
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014631 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014632 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014633 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014634 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014635 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014636 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14637 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014638 else
14639 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14640 if test "$enable_framework" ; then
14641 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014642 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14643 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014644 else
14645 # No framework, use the Python app as bundle-loader
14646 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14647 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14648 fi
14649 fi
14650 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014651 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014652 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014653 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014654 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014655 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014656 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014657 else
14658 LDSHARED="ld -Bshareable ${LDFLAGS}"
14659 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014660 OpenBSD*)
14661 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14662 then
14663 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14664 else
14665 case `uname -r` in
14666 [01].* | 2.[0-7] | 2.[0-7].*)
14667 LDSHARED="ld -Bshareable ${LDFLAGS}"
14668 ;;
14669 *)
14670 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14671 ;;
14672 esac
14673 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014674 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014675 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014676 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014677 then LDSHARED='$(CC) -shared'
14678 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014679 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014680 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014681 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014682 *) LDSHARED="ld";;
14683 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014684fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014685{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14686echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014687BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014688# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014689# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014690{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14691echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014692if test -z "$CCSHARED"
14693then
Guido van Rossum07397971997-04-29 21:49:50 +000014694 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014695 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014696 then CCSHARED="-fPIC";
14697 elif test `uname -p` = sparc;
14698 then CCSHARED="-xcode=pic32";
14699 else CCSHARED="-Kpic";
14700 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014701 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014702 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014703 else CCSHARED="+z";
14704 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014705 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014706 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014707 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014708 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014709 if test "$GCC" = "yes"
14710 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014711 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014712 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014713 SCO_SV*)
14714 if test "$GCC" = "yes"
14715 then CCSHARED="-fPIC"
14716 else CCSHARED="-Kpic -belf"
14717 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014718 IRIX*/6*) case $CC in
14719 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014720 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014721 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014722 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014723fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014724{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14725echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014726# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014727# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014728{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14729echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014730if test -z "$LINKFORSHARED"
14731then
Guido van Rossum07397971997-04-29 21:49:50 +000014732 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014733 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014734 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014735 LINKFORSHARED="-Wl,-E -Wl,+s";;
14736# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014737 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014738 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014739 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014741 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014742 if test "$enable_framework"
14743 then
Jack Jansenda49e192005-01-07 13:08:22 +000014744 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014745 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014746 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014747 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014748 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014749 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014750 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014751 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14752 then
14753 LINKFORSHARED="-Wl,--export-dynamic"
14754 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014755 SunOS/5*) case $CC in
14756 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014757 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014758 then
14759 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014760 fi;;
14761 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014762 CYGWIN*)
14763 if test $enable_shared = "no"
14764 then
14765 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14766 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014767 QNX*)
14768 # -Wl,-E causes the symbols to be added to the dynamic
14769 # symbol table so that they can be found when a module
14770 # is loaded. -N 2048K causes the stack size to be set
14771 # to 2048 kilobytes so that the stack doesn't overflow
14772 # when running test_compile.py.
14773 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014774 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014775fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014776{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14777echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014778
Michael W. Hudson54241132001-12-07 15:38:26 +000014779
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014780
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014781{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14782echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014783if test ! "$LIBRARY" = "$LDLIBRARY"
14784then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014785 case $ac_sys_system in
14786 CYGWIN*)
14787 # Cygwin needs CCSHARED when building extension DLLs
14788 # but not when building the interpreter DLL.
14789 CFLAGSFORSHARED='';;
14790 *)
14791 CFLAGSFORSHARED='$(CCSHARED)'
14792 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014793fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014794{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14795echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014796
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014797# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14798# library (with --enable-shared).
14799# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014800# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14801# if it is not required, since it creates a dependency of the shared library
14802# to LIBS. This, in turn, means that applications linking the shared libpython
14803# don't need to link LIBS explicitly. The default should be only changed
14804# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014805
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014806{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14807echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014808case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014809 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014810 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014812{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14813echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014814
14815
Guido van Rossum627b2d71993-12-24 10:39:16 +000014816# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014817
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014818{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14819echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014820if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014822else
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014824LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014825cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014826/* confdefs.h. */
14827_ACEOF
14828cat confdefs.h >>conftest.$ac_ext
14829cat >>conftest.$ac_ext <<_ACEOF
14830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832/* Override any GCC internal prototype to avoid an error.
14833 Use char because int might match the return type of a GCC
14834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014835#ifdef __cplusplus
14836extern "C"
14837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014838char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014839int
14840main ()
14841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014842return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 ;
14844 return 0;
14845}
14846_ACEOF
14847rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848if { (ac_try="$ac_link"
14849case "(($ac_try" in
14850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14851 *) ac_try_echo=$ac_try;;
14852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014856 grep -v '^ *+' conftest.er1 >conftest.err
14857 rm -f conftest.er1
14858 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860 (exit $ac_status); } && {
14861 test -z "$ac_c_werror_flag" ||
14862 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014863 } && test -s conftest$ac_exeext &&
14864 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014866else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014868sed 's/^/| /' conftest.$ac_ext >&5
14869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872
14873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014874 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014875LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014876fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014877{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14878echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14879if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 cat >>confdefs.h <<_ACEOF
14881#define HAVE_LIBDL 1
14882_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014883
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014884 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014885
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014886fi
14887 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014888
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014889{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14890echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014891if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014892 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014893else
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014895LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014897/* confdefs.h. */
14898_ACEOF
14899cat confdefs.h >>conftest.$ac_ext
14900cat >>conftest.$ac_ext <<_ACEOF
14901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903/* Override any GCC internal prototype to avoid an error.
14904 Use char because int might match the return type of a GCC
14905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014906#ifdef __cplusplus
14907extern "C"
14908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014909char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014910int
14911main ()
14912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 ;
14915 return 0;
14916}
14917_ACEOF
14918rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919if { (ac_try="$ac_link"
14920case "(($ac_try" in
14921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14922 *) ac_try_echo=$ac_try;;
14923esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014927 grep -v '^ *+' conftest.er1 >conftest.err
14928 rm -f conftest.er1
14929 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 (exit $ac_status); } && {
14932 test -z "$ac_c_werror_flag" ||
14933 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014934 } && test -s conftest$ac_exeext &&
14935 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014939sed 's/^/| /' conftest.$ac_ext >&5
14940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943
14944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014946LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014947fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014948{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14949echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14950if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 cat >>confdefs.h <<_ACEOF
14952#define HAVE_LIBDLD 1
14953_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014954
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014955 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014957fi
14958 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014959
Georg Brandlb1441c72009-01-03 22:33:39 +000014960# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014961if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014962 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14963echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014964if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014965 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014966else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014967 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014969/* confdefs.h. */
14970_ACEOF
14971cat confdefs.h >>conftest.$ac_ext
14972cat >>conftest.$ac_ext <<_ACEOF
14973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975/* Override any GCC internal prototype to avoid an error.
14976 Use char because int might match the return type of a GCC
14977 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014978#ifdef __cplusplus
14979extern "C"
14980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014981char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014982int
14983main ()
14984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 ;
14987 return 0;
14988}
14989_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014990for ac_lib in '' pthread rt posix4; do
14991 if test -z "$ac_lib"; then
14992 ac_res="none required"
14993 else
14994 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014995 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996 fi
14997 rm -f conftest.$ac_objext conftest$ac_exeext
14998if { (ac_try="$ac_link"
14999case "(($ac_try" in
15000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15001 *) ac_try_echo=$ac_try;;
15002esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015005 ac_status=$?
15006 grep -v '^ *+' conftest.er1 >conftest.err
15007 rm -f conftest.er1
15008 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 (exit $ac_status); } && {
15011 test -z "$ac_c_werror_flag" ||
15012 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015013 } && test -s conftest$ac_exeext &&
15014 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015017 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015018sed 's/^/| /' conftest.$ac_ext >&5
15019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020
Thomas Wouters477c8d52006-05-27 19:21:47 +000015021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022
15023rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15024 conftest$ac_exeext
15025 if test "${ac_cv_search_sem_init+set}" = set; then
15026 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028done
15029if test "${ac_cv_search_sem_init+set}" = set; then
15030 :
15031else
15032 ac_cv_search_sem_init=no
15033fi
15034rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015035LIBS=$ac_func_search_save_LIBS
15036fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015037{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15038echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039ac_res=$ac_cv_search_sem_init
15040if test "$ac_res" != no; then
15041 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015042
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015043fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015044 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015045 # posix4 on Solaris 2.6
15046 # pthread (first!) on Linux
15047fi
15048
Martin v. Löwis19d17342003-06-14 21:03:05 +000015049# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015050{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15051echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015052if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015053 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015054else
15055 ac_check_lib_save_LIBS=$LIBS
15056LIBS="-lintl $LIBS"
15057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015058/* confdefs.h. */
15059_ACEOF
15060cat confdefs.h >>conftest.$ac_ext
15061cat >>conftest.$ac_ext <<_ACEOF
15062/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064/* Override any GCC internal prototype to avoid an error.
15065 Use char because int might match the return type of a GCC
15066 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015067#ifdef __cplusplus
15068extern "C"
15069#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015070char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015071int
15072main ()
15073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015075 ;
15076 return 0;
15077}
15078_ACEOF
15079rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080if { (ac_try="$ac_link"
15081case "(($ac_try" in
15082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15083 *) ac_try_echo=$ac_try;;
15084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015088 grep -v '^ *+' conftest.er1 >conftest.err
15089 rm -f conftest.er1
15090 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 (exit $ac_status); } && {
15093 test -z "$ac_c_werror_flag" ||
15094 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015095 } && test -s conftest$ac_exeext &&
15096 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015097 ac_cv_lib_intl_textdomain=yes
15098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015100sed 's/^/| /' conftest.$ac_ext >&5
15101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015102 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104
15105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015107LIBS=$ac_check_lib_save_LIBS
15108fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015109{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15110echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15111if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015112
15113cat >>confdefs.h <<\_ACEOF
15114#define WITH_LIBINTL 1
15115_ACEOF
15116
Brett Cannonc6d936e2009-06-07 20:09:53 +000015117 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015118fi
15119
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015120
15121# checks for system dependent C++ extensions support
15122case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015123 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15124echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015126/* confdefs.h. */
15127_ACEOF
15128cat confdefs.h >>conftest.$ac_ext
15129cat >>conftest.$ac_ext <<_ACEOF
15130/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015131#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015132int
15133main ()
15134{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015135loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 ;
15137 return 0;
15138}
15139_ACEOF
15140rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141if { (ac_try="$ac_link"
15142case "(($ac_try" in
15143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15144 *) ac_try_echo=$ac_try;;
15145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015149 grep -v '^ *+' conftest.er1 >conftest.err
15150 rm -f conftest.er1
15151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153 (exit $ac_status); } && {
15154 test -z "$ac_c_werror_flag" ||
15155 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015156 } && test -s conftest$ac_exeext &&
15157 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015158
Martin v. Löwis11437992002-04-12 09:54:03 +000015159cat >>confdefs.h <<\_ACEOF
15160#define AIX_GENUINE_CPLUSPLUS 1
15161_ACEOF
15162
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015163 { echo "$as_me:$LINENO: result: yes" >&5
15164echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015167sed 's/^/| /' conftest.$ac_ext >&5
15168
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015169 { echo "$as_me:$LINENO: result: no" >&5
15170echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172
15173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015174 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015175 *) ;;
15176esac
15177
Guido van Rossum70c7f481998-03-26 18:44:10 +000015178# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015179{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15180echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015181if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015182 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015183else
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015185LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015187/* confdefs.h. */
15188_ACEOF
15189cat confdefs.h >>conftest.$ac_ext
15190cat >>conftest.$ac_ext <<_ACEOF
15191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193/* Override any GCC internal prototype to avoid an error.
15194 Use char because int might match the return type of a GCC
15195 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015196#ifdef __cplusplus
15197extern "C"
15198#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015199char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015200int
15201main ()
15202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 ;
15205 return 0;
15206}
15207_ACEOF
15208rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209if { (ac_try="$ac_link"
15210case "(($ac_try" in
15211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15212 *) ac_try_echo=$ac_try;;
15213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015217 grep -v '^ *+' conftest.er1 >conftest.err
15218 rm -f conftest.er1
15219 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221 (exit $ac_status); } && {
15222 test -z "$ac_c_werror_flag" ||
15223 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015224 } && test -s conftest$ac_exeext &&
15225 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015229sed 's/^/| /' conftest.$ac_ext >&5
15230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233
15234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015236LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015237fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015238{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15239echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15240if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015241 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015242fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015243 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015244{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15245echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015246if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015247 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015248else
Martin v. Löwis11437992002-04-12 09:54:03 +000015249 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015250LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015251cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015252/* confdefs.h. */
15253_ACEOF
15254cat confdefs.h >>conftest.$ac_ext
15255cat >>conftest.$ac_ext <<_ACEOF
15256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258/* Override any GCC internal prototype to avoid an error.
15259 Use char because int might match the return type of a GCC
15260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015261#ifdef __cplusplus
15262extern "C"
15263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015264char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015265int
15266main ()
15267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 ;
15270 return 0;
15271}
15272_ACEOF
15273rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274if { (ac_try="$ac_link"
15275case "(($ac_try" in
15276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15277 *) ac_try_echo=$ac_try;;
15278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015282 grep -v '^ *+' conftest.er1 >conftest.err
15283 rm -f conftest.er1
15284 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286 (exit $ac_status); } && {
15287 test -z "$ac_c_werror_flag" ||
15288 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015289 } && test -s conftest$ac_exeext &&
15290 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015294sed 's/^/| /' conftest.$ac_ext >&5
15295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298
15299rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015300 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015301LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015302fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015303{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15304echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15305if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015306 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015307fi
15308 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015310{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15311echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015313# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015314if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015316{ echo "$as_me:$LINENO: result: $withval" >&5
15317echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015318LIBS="$withval $LIBS"
15319
15320else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015321 { echo "$as_me:$LINENO: result: no" >&5
15322echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323fi
15324
Guido van Rossum7f43da71994-08-01 12:15:30 +000015325
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015326# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015327{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15328echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015331if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332 withval=$with_system_ffi;
15333fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015334
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015335
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015336{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15337echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015338
Matthias Klose55708cc2009-04-30 08:06:49 +000015339# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015340{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15341echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015342
15343# Check whether --with-dbmliborder was given.
15344if test "${with_dbmliborder+set}" = set; then
15345 withval=$with_dbmliborder;
15346if test x$with_dbmliborder = xyes
15347then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015348{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15349echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015350 { (exit 1); exit 1; }; }
15351else
15352 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15353 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15354 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015355 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15356echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015357 { (exit 1); exit 1; }; }
15358 fi
15359 done
15360fi
15361fi
15362
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015363{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15364echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015365
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015366# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015367
15368
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015369{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15370echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015373if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015374 withval=$with_signal_module;
15375fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015376
15377
15378if test -z "$with_signal_module"
15379then with_signal_module="yes"
15380fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015381{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15382echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015383
15384if test "${with_signal_module}" = "yes"; then
15385 USE_SIGNAL_MODULE=""
15386 SIGNAL_OBJS=""
15387else
15388 USE_SIGNAL_MODULE="#"
15389 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15390fi
15391
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015392# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015393
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015394USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015395
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015396{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15397echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015398
Guido van Rossumec2f0731997-01-22 20:54:01 +000015399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015401if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015403{ echo "$as_me:$LINENO: result: $withval" >&5
15404echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015405LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015406if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015407 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015408fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015409else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015410 { echo "$as_me:$LINENO: result: no" >&5
15411echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015412fi
15413
Martin v. Löwis11437992002-04-12 09:54:03 +000015414
15415# Templates for things AC_DEFINEd more than once.
15416# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015417
15418
Martin v. Löwis11437992002-04-12 09:54:03 +000015419
15420
15421
15422
15423
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015424{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15425echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015428if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015429 withval=$with_threads;
15430fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015431
15432
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015433# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015436if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437 withval=$with_thread; with_threads=$with_thread
15438fi
15439
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015440
15441if test -z "$with_threads"
15442then with_threads="yes"
15443fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015444{ echo "$as_me:$LINENO: result: $with_threads" >&5
15445echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015446
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015447
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015448if test "$with_threads" = "no"
15449then
15450 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015451elif test "$ac_cv_pthread_is_default" = yes
15452then
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015454#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015455_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015456
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015457 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015458 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015459#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015460_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015461
15462 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015463 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015464elif test "$ac_cv_kpthread" = "yes"
15465then
15466 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015467 if test "$ac_cv_cxx_thread" = "yes"; then
15468 CXX="$CXX -Kpthread"
15469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015471#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015473
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015474 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015475 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015476elif test "$ac_cv_kthread" = "yes"
15477then
15478 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015479 if test "$ac_cv_cxx_thread" = "yes"; then
15480 CXX="$CXX -Kthread"
15481 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015482 cat >>confdefs.h <<\_ACEOF
15483#define WITH_THREAD 1
15484_ACEOF
15485
15486 posix_threads=yes
15487 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015488elif test "$ac_cv_pthread" = "yes"
15489then
15490 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015491 if test "$ac_cv_cxx_thread" = "yes"; then
15492 CXX="$CXX -pthread"
15493 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015494 cat >>confdefs.h <<\_ACEOF
15495#define WITH_THREAD 1
15496_ACEOF
15497
15498 posix_threads=yes
15499 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015500else
15501 if test ! -z "$with_threads" -a -d "$with_threads"
15502 then LDFLAGS="$LDFLAGS -L$with_threads"
15503 fi
15504 if test ! -z "$withval" -a -d "$withval"
15505 then LDFLAGS="$LDFLAGS -L$withval"
15506 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015507
15508 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015509 # define _POSIX_THREADS in unistd.h. Some apparently don't
15510 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015511 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15512echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015514/* confdefs.h. */
15515_ACEOF
15516cat confdefs.h >>conftest.$ac_ext
15517cat >>conftest.$ac_ext <<_ACEOF
15518/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015519
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015520#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015521#ifdef _POSIX_THREADS
15522yes
15523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015524
15525_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015527 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015528 unistd_defines_pthreads=yes
15529else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015530 unistd_defines_pthreads=no
15531fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000015532rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015533
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015534 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15535echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015536
Martin v. Löwis11437992002-04-12 09:54:03 +000015537 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015538#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015539_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015540
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015542 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15543echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015544if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015545 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015546fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015547{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15548echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015549else
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015551{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15552echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015553cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015554/* confdefs.h. */
15555_ACEOF
15556cat confdefs.h >>conftest.$ac_ext
15557cat >>conftest.$ac_ext <<_ACEOF
15558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015559$ac_includes_default
15560#include <cthreads.h>
15561_ACEOF
15562rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563if { (ac_try="$ac_compile"
15564case "(($ac_try" in
15565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15566 *) ac_try_echo=$ac_try;;
15567esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015571 grep -v '^ *+' conftest.er1 >conftest.err
15572 rm -f conftest.er1
15573 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575 (exit $ac_status); } && {
15576 test -z "$ac_c_werror_flag" ||
15577 test ! -s conftest.err
15578 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015579 ac_header_compiler=yes
15580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015582sed 's/^/| /' conftest.$ac_ext >&5
15583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586
15587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015588{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15589echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015590
15591# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015592{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15593echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015595/* confdefs.h. */
15596_ACEOF
15597cat confdefs.h >>conftest.$ac_ext
15598cat >>conftest.$ac_ext <<_ACEOF
15599/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015600#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015601_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602if { (ac_try="$ac_cpp conftest.$ac_ext"
15603case "(($ac_try" in
15604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15605 *) ac_try_echo=$ac_try;;
15606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015608 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015610 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015611 rm -f conftest.er1
15612 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614 (exit $ac_status); } >/dev/null && {
15615 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15616 test ! -s conftest.err
15617 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 ac_header_preproc=yes
15619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015621sed 's/^/| /' conftest.$ac_ext >&5
15622
Martin v. Löwis11437992002-04-12 09:54:03 +000015623 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625
Martin v. Löwis11437992002-04-12 09:54:03 +000015626rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015627{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15628echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
15630# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015631case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15632 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015633 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15634echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15635 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15636echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015637 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015638 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015639 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015640 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15641echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15642 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15643echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15644 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15645echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15646 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15647echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15648 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15649echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15650 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15651echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015653## -------------------------------------- ##
15654## Report this to http://bugs.python.org/ ##
15655## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015656_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015658 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015659esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015660{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15661echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015662if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015664else
15665 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015666fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015667{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15668echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015669
15670fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015671if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015673#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015674_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015675
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015677#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015678_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015679
Martin v. Löwis11437992002-04-12 09:54:03 +000015680
15681cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015682#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015683_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015684
15685 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015686 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015687else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015688
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015690 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15691echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015692if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015693 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015694fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015695{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15696echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015697else
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015699{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15700echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015702/* confdefs.h. */
15703_ACEOF
15704cat confdefs.h >>conftest.$ac_ext
15705cat >>conftest.$ac_ext <<_ACEOF
15706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015707$ac_includes_default
15708#include <mach/cthreads.h>
15709_ACEOF
15710rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711if { (ac_try="$ac_compile"
15712case "(($ac_try" in
15713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15714 *) ac_try_echo=$ac_try;;
15715esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015719 grep -v '^ *+' conftest.er1 >conftest.err
15720 rm -f conftest.er1
15721 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723 (exit $ac_status); } && {
15724 test -z "$ac_c_werror_flag" ||
15725 test ! -s conftest.err
15726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015727 ac_header_compiler=yes
15728else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015730sed 's/^/| /' conftest.$ac_ext >&5
15731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015732 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734
15735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015736{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15737echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015738
15739# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015740{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15741echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015743/* confdefs.h. */
15744_ACEOF
15745cat confdefs.h >>conftest.$ac_ext
15746cat >>conftest.$ac_ext <<_ACEOF
15747/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015748#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015749_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750if { (ac_try="$ac_cpp conftest.$ac_ext"
15751case "(($ac_try" in
15752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15753 *) ac_try_echo=$ac_try;;
15754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015758 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 rm -f conftest.er1
15760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762 (exit $ac_status); } >/dev/null && {
15763 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15764 test ! -s conftest.err
15765 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ac_header_preproc=yes
15767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015769sed 's/^/| /' conftest.$ac_ext >&5
15770
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773
Martin v. Löwis11437992002-04-12 09:54:03 +000015774rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015775{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15776echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015777
15778# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015779case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15780 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015781 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15782echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15783 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15784echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015785 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015786 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015787 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015788 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15789echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15790 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15791echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15792 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15793echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15794 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15795echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15796 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15797echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15798 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15799echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015801## -------------------------------------- ##
15802## Report this to http://bugs.python.org/ ##
15803## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015804_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015805 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015806 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015807esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015808{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15809echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015810if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015811 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015812else
15813 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015814fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015815{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15816echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
15818fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015819if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015821#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015822_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015823
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015825#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015826_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828
15829cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015830#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015831_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015832
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015833 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015834else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015835
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015836 # Just looking for pthread_create in libpthread is not enough:
15837 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15838 # So we really have to include pthread.h, and then link.
15839 _libs=$LIBS
15840 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015841 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15842echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015844/* confdefs.h. */
15845_ACEOF
15846cat confdefs.h >>conftest.$ac_ext
15847cat >>conftest.$ac_ext <<_ACEOF
15848/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015849#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015850
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015851void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015852int
15853main ()
15854{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015855
15856pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 ;
15858 return 0;
15859}
15860_ACEOF
15861rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862if { (ac_try="$ac_link"
15863case "(($ac_try" in
15864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15865 *) ac_try_echo=$ac_try;;
15866esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015870 grep -v '^ *+' conftest.er1 >conftest.err
15871 rm -f conftest.er1
15872 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015874 (exit $ac_status); } && {
15875 test -z "$ac_c_werror_flag" ||
15876 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015877 } && test -s conftest$ac_exeext &&
15878 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015880 { echo "$as_me:$LINENO: result: yes" >&5
15881echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015883#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015884_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015885
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015886 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015887 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015888else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015890sed 's/^/| /' conftest.$ac_ext >&5
15891
Martin v. Löwis11437992002-04-12 09:54:03 +000015892
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015893 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015894 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15895echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015896if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015898else
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015900/* confdefs.h. */
15901_ACEOF
15902cat confdefs.h >>conftest.$ac_ext
15903cat >>conftest.$ac_ext <<_ACEOF
15904/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015905/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15906 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15907#define pthread_detach innocuous_pthread_detach
15908
Guido van Rossumad678af1998-10-02 14:42:15 +000015909/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015910 which can conflict with char pthread_detach (); below.
15911 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015912 <limits.h> exists even on freestanding compilers. */
15913
15914#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015915# include <limits.h>
15916#else
15917# include <assert.h>
15918#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015919
15920#undef pthread_detach
15921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015922/* Override any GCC internal prototype to avoid an error.
15923 Use char because int might match the return type of a GCC
15924 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015925#ifdef __cplusplus
15926extern "C"
15927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015928char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015929/* The GNU C library defines this for functions which it implements
15930 to always fail with ENOSYS. Some functions are actually named
15931 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015933choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015934#endif
15935
Skip Montanaro6dead952003-09-25 14:50:04 +000015936int
15937main ()
15938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 ;
15941 return 0;
15942}
15943_ACEOF
15944rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015945if { (ac_try="$ac_link"
15946case "(($ac_try" in
15947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15948 *) ac_try_echo=$ac_try;;
15949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015953 grep -v '^ *+' conftest.er1 >conftest.err
15954 rm -f conftest.er1
15955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957 (exit $ac_status); } && {
15958 test -z "$ac_c_werror_flag" ||
15959 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015960 } && test -s conftest$ac_exeext &&
15961 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015963else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015965sed 's/^/| /' conftest.$ac_ext >&5
15966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015969
15970rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015971 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015972fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015973{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15974echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
15975if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015977#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015978_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015979
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015980 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015981 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015982else
Guido van Rossumad678af1998-10-02 14:42:15 +000015983
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015984 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15985echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015986if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015988else
Martin v. Löwis11437992002-04-12 09:54:03 +000015989 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015990LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015992/* confdefs.h. */
15993_ACEOF
15994cat confdefs.h >>conftest.$ac_ext
15995cat >>conftest.$ac_ext <<_ACEOF
15996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015998/* Override any GCC internal prototype to avoid an error.
15999 Use char because int might match the return type of a GCC
16000 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016001#ifdef __cplusplus
16002extern "C"
16003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016004char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016005int
16006main ()
16007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016009 ;
16010 return 0;
16011}
16012_ACEOF
16013rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014if { (ac_try="$ac_link"
16015case "(($ac_try" in
16016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16017 *) ac_try_echo=$ac_try;;
16018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016022 grep -v '^ *+' conftest.er1 >conftest.err
16023 rm -f conftest.er1
16024 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026 (exit $ac_status); } && {
16027 test -z "$ac_c_werror_flag" ||
16028 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016029 } && test -s conftest$ac_exeext &&
16030 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016031 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016032else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016034sed 's/^/| /' conftest.$ac_ext >&5
16035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016036 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016038
16039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016041LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016042fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016043{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16044echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16045if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016047#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016048_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016049
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016050 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016051 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016052 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016053else
Greg Steinadf63d62000-07-05 10:38:09 +000016054
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016055 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16056echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016057if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016058 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016059else
Martin v. Löwis11437992002-04-12 09:54:03 +000016060 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016061LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016062cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016063/* confdefs.h. */
16064_ACEOF
16065cat confdefs.h >>conftest.$ac_ext
16066cat >>conftest.$ac_ext <<_ACEOF
16067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016069/* Override any GCC internal prototype to avoid an error.
16070 Use char because int might match the return type of a GCC
16071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016072#ifdef __cplusplus
16073extern "C"
16074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016075char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016076int
16077main ()
16078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016079return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 ;
16081 return 0;
16082}
16083_ACEOF
16084rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016085if { (ac_try="$ac_link"
16086case "(($ac_try" in
16087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16088 *) ac_try_echo=$ac_try;;
16089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016093 grep -v '^ *+' conftest.er1 >conftest.err
16094 rm -f conftest.er1
16095 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097 (exit $ac_status); } && {
16098 test -z "$ac_c_werror_flag" ||
16099 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016100 } && test -s conftest$ac_exeext &&
16101 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016102 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016103else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016105sed 's/^/| /' conftest.$ac_ext >&5
16106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016109
16110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016112LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016113fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016114{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16115echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16116if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016118#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016119_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016120
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016121 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016122 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016123 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016124else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016125
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016126 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16127echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016128if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016129 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016130else
Martin v. Löwis11437992002-04-12 09:54:03 +000016131 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016132LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016134/* confdefs.h. */
16135_ACEOF
16136cat confdefs.h >>conftest.$ac_ext
16137cat >>conftest.$ac_ext <<_ACEOF
16138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140/* Override any GCC internal prototype to avoid an error.
16141 Use char because int might match the return type of a GCC
16142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016143#ifdef __cplusplus
16144extern "C"
16145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016146char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016147int
16148main ()
16149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016150return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016151 ;
16152 return 0;
16153}
16154_ACEOF
16155rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156if { (ac_try="$ac_link"
16157case "(($ac_try" in
16158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16159 *) ac_try_echo=$ac_try;;
16160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016164 grep -v '^ *+' conftest.er1 >conftest.err
16165 rm -f conftest.er1
16166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168 (exit $ac_status); } && {
16169 test -z "$ac_c_werror_flag" ||
16170 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016171 } && test -s conftest$ac_exeext &&
16172 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016174else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016176sed 's/^/| /' conftest.$ac_ext >&5
16177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180
16181rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016182 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016183LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016184fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016185{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16186echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16187if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016189#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016190_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016192 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016193 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016194 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016195else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016196
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016197 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16198echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016199if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016200 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016201else
Martin v. Löwis11437992002-04-12 09:54:03 +000016202 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016203LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016205/* confdefs.h. */
16206_ACEOF
16207cat confdefs.h >>conftest.$ac_ext
16208cat >>conftest.$ac_ext <<_ACEOF
16209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211/* Override any GCC internal prototype to avoid an error.
16212 Use char because int might match the return type of a GCC
16213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016214#ifdef __cplusplus
16215extern "C"
16216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016217char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016218int
16219main ()
16220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 ;
16223 return 0;
16224}
16225_ACEOF
16226rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227if { (ac_try="$ac_link"
16228case "(($ac_try" in
16229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16230 *) ac_try_echo=$ac_try;;
16231esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016235 grep -v '^ *+' conftest.er1 >conftest.err
16236 rm -f conftest.er1
16237 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239 (exit $ac_status); } && {
16240 test -z "$ac_c_werror_flag" ||
16241 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016242 } && test -s conftest$ac_exeext &&
16243 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016245else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016247sed 's/^/| /' conftest.$ac_ext >&5
16248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251
16252rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016254LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016255fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016256{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16257echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16258if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016260#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016261_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016262
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016263 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016264 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016265 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016266else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016267
Martin v. Löwis130fb172001-07-19 11:00:41 +000016268 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016269fi
16270
Guido van Rossum627b2d71993-12-24 10:39:16 +000016271
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016272fi
16273
Guido van Rossum0be3e491997-05-22 20:33:33 +000016274fi
16275
Guido van Rossum49545951997-12-02 19:28:29 +000016276fi
16277
Guido van Rossumb93a8621998-05-07 13:27:32 +000016278fi
16279
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281
16282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016283 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284fi
16285
Martin v. Löwis11437992002-04-12 09:54:03 +000016286
16287fi
16288
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016289
Michael W. Hudson54241132001-12-07 15:38:26 +000016290
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016291 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16292echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016293if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016294 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016295else
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016297LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016298cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016299/* confdefs.h. */
16300_ACEOF
16301cat confdefs.h >>conftest.$ac_ext
16302cat >>conftest.$ac_ext <<_ACEOF
16303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305/* Override any GCC internal prototype to avoid an error.
16306 Use char because int might match the return type of a GCC
16307 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016308#ifdef __cplusplus
16309extern "C"
16310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016311char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016312int
16313main ()
16314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 ;
16317 return 0;
16318}
16319_ACEOF
16320rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321if { (ac_try="$ac_link"
16322case "(($ac_try" in
16323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16324 *) ac_try_echo=$ac_try;;
16325esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016329 grep -v '^ *+' conftest.er1 >conftest.err
16330 rm -f conftest.er1
16331 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333 (exit $ac_status); } && {
16334 test -z "$ac_c_werror_flag" ||
16335 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016336 } && test -s conftest$ac_exeext &&
16337 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016339else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016341sed 's/^/| /' conftest.$ac_ext >&5
16342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016345
16346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016347 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016348LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016349fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016350{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16351echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16352if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016353 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016354#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016355_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016356
Martin v. Löwis130fb172001-07-19 11:00:41 +000016357 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016358 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016359 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016360fi
16361
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016362
Neal Norwitza978ab02002-11-02 16:58:05 +000016363 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016364 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16365echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016366if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016368else
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016370LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016372/* confdefs.h. */
16373_ACEOF
16374cat confdefs.h >>conftest.$ac_ext
16375cat >>conftest.$ac_ext <<_ACEOF
16376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378/* Override any GCC internal prototype to avoid an error.
16379 Use char because int might match the return type of a GCC
16380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016381#ifdef __cplusplus
16382extern "C"
16383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016384char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016385int
16386main ()
16387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 ;
16390 return 0;
16391}
16392_ACEOF
16393rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016394if { (ac_try="$ac_link"
16395case "(($ac_try" in
16396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16397 *) ac_try_echo=$ac_try;;
16398esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016402 grep -v '^ *+' conftest.er1 >conftest.err
16403 rm -f conftest.er1
16404 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406 (exit $ac_status); } && {
16407 test -z "$ac_c_werror_flag" ||
16408 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016409 } && test -s conftest$ac_exeext &&
16410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016411 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016412else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016414sed 's/^/| /' conftest.$ac_ext >&5
16415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016418
16419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016421LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016422fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016423{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16424echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16425if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016427#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016428_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016429
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016430 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016431 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016432 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016433fi
16434
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016435 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016436
Martin v. Löwis130fb172001-07-19 11:00:41 +000016437 if test "$USE_THREAD_MODULE" != "#"
16438 then
16439 # If the above checks didn't disable threads, (at least) OSF1
16440 # needs this '-threads' argument during linking.
16441 case $ac_sys_system in
16442 OSF1) LDLAST=-threads;;
16443 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016444 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016445fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016446
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016447if test "$posix_threads" = "yes"; then
16448 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016449
16450cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016451#define _POSIX_THREADS 1
16452_ACEOF
16453
16454 fi
16455
16456 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16457 case $ac_sys_system/$ac_sys_release in
16458 SunOS/5.6)
16459cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016460#define HAVE_PTHREAD_DESTRUCTOR 1
16461_ACEOF
16462
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016463 ;;
16464 SunOS/5.8)
16465cat >>confdefs.h <<\_ACEOF
16466#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16467_ACEOF
16468
16469 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016470 AIX/5)
16471cat >>confdefs.h <<\_ACEOF
16472#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16473_ACEOF
16474
16475 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016476 esac
16477
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016478 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16479echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016480 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016482else
16483 if test "$cross_compiling" = yes; then
16484 ac_cv_pthread_system_supported=no
16485else
16486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016487/* confdefs.h. */
16488_ACEOF
16489cat confdefs.h >>conftest.$ac_ext
16490cat >>conftest.$ac_ext <<_ACEOF
16491/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016492#include <pthread.h>
16493 void *foo(void *parm) {
16494 return NULL;
16495 }
16496 main() {
16497 pthread_attr_t attr;
16498 pthread_t id;
16499 if (pthread_attr_init(&attr)) exit(-1);
16500 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16501 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16502 exit(0);
16503 }
16504_ACEOF
16505rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506if { (ac_try="$ac_link"
16507case "(($ac_try" in
16508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16509 *) ac_try_echo=$ac_try;;
16510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016512 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016513 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516 { (case "(($ac_try" in
16517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16518 *) ac_try_echo=$ac_try;;
16519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016522 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016524 (exit $ac_status); }; }; then
16525 ac_cv_pthread_system_supported=yes
16526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016527 echo "$as_me: program exited with status $ac_status" >&5
16528echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016529sed 's/^/| /' conftest.$ac_ext >&5
16530
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016531( exit $ac_status )
16532ac_cv_pthread_system_supported=no
16533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534rm -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 +000016535fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537
16538
Guido van Rossum627b2d71993-12-24 10:39:16 +000016539fi
16540
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016541 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16542echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016543 if test "$ac_cv_pthread_system_supported" = "yes"; then
16544
16545cat >>confdefs.h <<\_ACEOF
16546#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16547_ACEOF
16548
16549 fi
16550
16551for ac_func in pthread_sigmask
16552do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016553as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16554{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16555echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016558else
16559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016560/* confdefs.h. */
16561_ACEOF
16562cat confdefs.h >>conftest.$ac_ext
16563cat >>conftest.$ac_ext <<_ACEOF
16564/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016565/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16566 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16567#define $ac_func innocuous_$ac_func
16568
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016569/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016570 which can conflict with char $ac_func (); below.
16571 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016572 <limits.h> exists even on freestanding compilers. */
16573
16574#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016575# include <limits.h>
16576#else
16577# include <assert.h>
16578#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016579
16580#undef $ac_func
16581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016582/* Override any GCC internal prototype to avoid an error.
16583 Use char because int might match the return type of a GCC
16584 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016585#ifdef __cplusplus
16586extern "C"
16587#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016588char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016589/* The GNU C library defines this for functions which it implements
16590 to always fail with ENOSYS. Some functions are actually named
16591 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016593choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016594#endif
16595
Skip Montanaro6dead952003-09-25 14:50:04 +000016596int
16597main ()
16598{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016600 ;
16601 return 0;
16602}
16603_ACEOF
16604rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605if { (ac_try="$ac_link"
16606case "(($ac_try" in
16607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16608 *) ac_try_echo=$ac_try;;
16609esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016613 grep -v '^ *+' conftest.er1 >conftest.err
16614 rm -f conftest.er1
16615 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016617 (exit $ac_status); } && {
16618 test -z "$ac_c_werror_flag" ||
16619 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016620 } && test -s conftest$ac_exeext &&
16621 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016622 eval "$as_ac_var=yes"
16623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016625sed 's/^/| /' conftest.$ac_ext >&5
16626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629
16630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016632fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016633ac_res=`eval echo '${'$as_ac_var'}'`
16634 { echo "$as_me:$LINENO: result: $ac_res" >&5
16635echo "${ECHO_T}$ac_res" >&6; }
16636if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016637 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016639_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016640 case $ac_sys_system in
16641 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016642
Jason Tishlerfac083d2003-07-22 15:20:49 +000016643cat >>confdefs.h <<\_ACEOF
16644#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16645_ACEOF
16646
16647 ;;
16648 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016649fi
16650done
16651
16652fi
16653
16654
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016655# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016656
16657
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016658{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16659echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016661if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016663 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016664 { echo "$as_me:$LINENO: result: no" >&5
16665echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016666 ipv6=no
16667 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016668 *) { echo "$as_me:$LINENO: result: yes" >&5
16669echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016670 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016671#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016672_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016673
16674 ipv6=yes
16675 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016676 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016677else
Martin v. Löwis11437992002-04-12 09:54:03 +000016678
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016679 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016680 { echo "$as_me:$LINENO: result: no" >&5
16681echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016682 ipv6=no
16683
16684else
Martin v. Löwis11437992002-04-12 09:54:03 +000016685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016686/* confdefs.h. */
16687_ACEOF
16688cat confdefs.h >>conftest.$ac_ext
16689cat >>conftest.$ac_ext <<_ACEOF
16690/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016691 /* AF_INET6 available check */
16692#include <sys/types.h>
16693#include <sys/socket.h>
16694main()
16695{
16696 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16697 exit(1);
16698 else
16699 exit(0);
16700}
16701
Martin v. Löwis11437992002-04-12 09:54:03 +000016702_ACEOF
16703rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704if { (ac_try="$ac_link"
16705case "(($ac_try" in
16706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16707 *) ac_try_echo=$ac_try;;
16708esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016711 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016713 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714 { (case "(($ac_try" in
16715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16716 *) ac_try_echo=$ac_try;;
16717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016722 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016723 { echo "$as_me:$LINENO: result: yes" >&5
16724echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016725 ipv6=yes
16726else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016727 echo "$as_me: program exited with status $ac_status" >&5
16728echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016729sed 's/^/| /' conftest.$ac_ext >&5
16730
Martin v. Löwis11437992002-04-12 09:54:03 +000016731( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016732{ echo "$as_me:$LINENO: result: no" >&5
16733echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016734 ipv6=no
16735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736rm -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 +000016737fi
16738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739
16740
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016741if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016742 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16743echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016745/* confdefs.h. */
16746_ACEOF
16747cat confdefs.h >>conftest.$ac_ext
16748cat >>conftest.$ac_ext <<_ACEOF
16749/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016750#include <sys/types.h>
16751#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016752int
16753main ()
16754{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016755struct sockaddr_in6 x;
16756x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016757 ;
16758 return 0;
16759}
16760_ACEOF
16761rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762if { (ac_try="$ac_compile"
16763case "(($ac_try" in
16764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16765 *) ac_try_echo=$ac_try;;
16766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016770 grep -v '^ *+' conftest.er1 >conftest.err
16771 rm -f conftest.er1
16772 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016774 (exit $ac_status); } && {
16775 test -z "$ac_c_werror_flag" ||
16776 test ! -s conftest.err
16777 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016778 { echo "$as_me:$LINENO: result: yes" >&5
16779echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016780 ipv6=yes
16781else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016783sed 's/^/| /' conftest.$ac_ext >&5
16784
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016785 { echo "$as_me:$LINENO: result: no" >&5
16786echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016787 ipv6=no
16788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789
16790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016791fi
16792
16793if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016795#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016796_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016797
16798fi
16799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016800fi
16801
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016802
16803ipv6type=unknown
16804ipv6lib=none
16805ipv6trylibc=no
16806
16807if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016808 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16809echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016810 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16811 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016812 case $i in
16813 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016815/* confdefs.h. */
16816_ACEOF
16817cat confdefs.h >>conftest.$ac_ext
16818cat >>conftest.$ac_ext <<_ACEOF
16819/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016820
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016821#include <netinet/in.h>
16822#ifdef IPV6_INRIA_VERSION
16823yes
16824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016825_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016827 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016828 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016829fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016830rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016831
16832 ;;
16833 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016835/* confdefs.h. */
16836_ACEOF
16837cat confdefs.h >>conftest.$ac_ext
16838cat >>conftest.$ac_ext <<_ACEOF
16839/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016841#include <netinet/in.h>
16842#ifdef __KAME__
16843yes
16844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016847 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016848 ipv6type=$i;
16849 ipv6lib=inet6
16850 ipv6libdir=/usr/local/v6/lib
16851 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016852fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016853rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016854
16855 ;;
16856 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016864#include <features.h>
16865#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16866yes
16867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016868_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016870 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016871 ipv6type=$i;
16872 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016873fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016874rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016875
16876 ;;
16877 linux-inet6)
16878 if test -d /usr/inet6; then
16879 ipv6type=$i
16880 ipv6lib=inet6
16881 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016882 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016883 fi
16884 ;;
16885 solaris)
16886 if test -f /etc/netconfig; then
16887 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16888 ipv6type=$i
16889 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016890 fi
16891 fi
16892 ;;
16893 toshiba)
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öwisa5f73f92001-10-15 08:06:29 +000016900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016901#include <sys/param.h>
16902#ifdef _TOSHIBA_INET6
16903yes
16904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016907 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016908 ipv6type=$i;
16909 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016910 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016911fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016913
16914 ;;
16915 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016917/* confdefs.h. */
16918_ACEOF
16919cat confdefs.h >>conftest.$ac_ext
16920cat >>conftest.$ac_ext <<_ACEOF
16921/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016923#include </usr/local/v6/include/sys/v6config.h>
16924#ifdef __V6D__
16925yes
16926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016927_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016929 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016930 ipv6type=$i;
16931 ipv6lib=v6;
16932 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016933 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016934fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016935rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016936
16937 ;;
16938 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016940/* confdefs.h. */
16941_ACEOF
16942cat confdefs.h >>conftest.$ac_ext
16943cat >>conftest.$ac_ext <<_ACEOF
16944/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016946#include <sys/param.h>
16947#ifdef _ZETA_MINAMI_INET6
16948yes
16949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016950_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016952 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016953 ipv6type=$i;
16954 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016955 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016956fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016957rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016958
16959 ;;
16960 esac
16961 if test "$ipv6type" != "unknown"; then
16962 break
16963 fi
16964 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016965 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16966echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016967fi
16968
16969if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16970 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16971 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16972 echo "using lib$ipv6lib"
16973 else
16974 if test $ipv6trylibc = "yes"; then
16975 echo "using libc"
16976 else
16977 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16978 echo "You need to fetch lib$ipv6lib.a from appropriate"
16979 echo 'ipv6 kit and compile beforehand.'
16980 exit 1
16981 fi
16982 fi
16983fi
16984
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016985{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16986echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016987cat >conftest.$ac_ext <<_ACEOF
16988/* confdefs.h. */
16989_ACEOF
16990cat confdefs.h >>conftest.$ac_ext
16991cat >>conftest.$ac_ext <<_ACEOF
16992/* end confdefs.h. */
16993#include <Carbon/Carbon.h>
16994int
16995main ()
16996{
16997FSIORefNum fRef = 0
16998 ;
16999 return 0;
17000}
17001_ACEOF
17002rm -f conftest.$ac_objext
17003if { (ac_try="$ac_compile"
17004case "(($ac_try" in
17005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17006 *) ac_try_echo=$ac_try;;
17007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017009 (eval "$ac_compile") 2>conftest.er1
17010 ac_status=$?
17011 grep -v '^ *+' conftest.er1 >conftest.err
17012 rm -f conftest.er1
17013 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017015 (exit $ac_status); } && {
17016 test -z "$ac_c_werror_flag" ||
17017 test ! -s conftest.err
17018 } && test -s conftest.$ac_objext; then
17019
17020cat >>confdefs.h <<\_ACEOF
17021#define HAVE_OSX105_SDK 1
17022_ACEOF
17023
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017024 { echo "$as_me:$LINENO: result: yes" >&5
17025echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017027 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017028sed 's/^/| /' conftest.$ac_ext >&5
17029
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017030 { echo "$as_me:$LINENO: result: no" >&5
17031echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017032
17033fi
17034
17035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17036
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017037# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017038{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17039echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017041# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017042if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043 withval=$with_doc_strings;
17044fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017045
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017046
17047if test -z "$with_doc_strings"
17048then with_doc_strings="yes"
17049fi
17050if test "$with_doc_strings" != "no"
17051then
17052
17053cat >>confdefs.h <<\_ACEOF
17054#define WITH_DOC_STRINGS 1
17055_ACEOF
17056
17057fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017058{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17059echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017060
Neil Schemenauera35c6882001-02-27 04:45:05 +000017061# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017062{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17063echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017066if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017068if test "$withval" != no
17069then
17070
17071cat >>confdefs.h <<\_ACEOF
17072#define WITH_TSC 1
17073_ACEOF
17074
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017075 { echo "$as_me:$LINENO: result: yes" >&5
17076echo "${ECHO_T}yes" >&6; }
17077else { echo "$as_me:$LINENO: result: no" >&5
17078echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017079fi
17080else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017081 { echo "$as_me:$LINENO: result: no" >&5
17082echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017083fi
17084
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017085
17086# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017087{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17088echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017091if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092 withval=$with_pymalloc;
17093fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017094
Neil Schemenauera35c6882001-02-27 04:45:05 +000017095
Neil Schemenauer16c22972002-03-22 15:34:49 +000017096if test -z "$with_pymalloc"
17097then with_pymalloc="yes"
17098fi
17099if test "$with_pymalloc" != "no"
17100then
Martin v. Löwis11437992002-04-12 09:54:03 +000017101
17102cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017103#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017104_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017105
17106fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017107{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17108echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017109
Barry Warsawef82cd72000-06-30 16:21:01 +000017110# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017111{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17112echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017114# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017115if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017116 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017117if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017118then
17119
17120cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017121#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017122_ACEOF
17123
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017124 { echo "$as_me:$LINENO: result: yes" >&5
17125echo "${ECHO_T}yes" >&6; }
17126else { echo "$as_me:$LINENO: result: no" >&5
17127echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017128fi
17129else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017130 { echo "$as_me:$LINENO: result: no" >&5
17131echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132fi
17133
Barry Warsawef82cd72000-06-30 16:21:01 +000017134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017135# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017136
Guido van Rossum98935bf2001-09-05 19:13:16 +000017137DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017138
Guido van Rossume97ee181999-12-20 21:27:22 +000017139# the dlopen() function means we might want to use dynload_shlib.o. some
17140# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017141
Thomas Wouters3a584202000-08-05 23:28:51 +000017142for ac_func in dlopen
17143do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017144as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17145{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17146echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017147if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017148 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017149else
Martin v. Löwis11437992002-04-12 09:54:03 +000017150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017151/* confdefs.h. */
17152_ACEOF
17153cat confdefs.h >>conftest.$ac_ext
17154cat >>conftest.$ac_ext <<_ACEOF
17155/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017156/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17157 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17158#define $ac_func innocuous_$ac_func
17159
Guido van Rossume97ee181999-12-20 21:27:22 +000017160/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017161 which can conflict with char $ac_func (); below.
17162 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017163 <limits.h> exists even on freestanding compilers. */
17164
17165#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017166# include <limits.h>
17167#else
17168# include <assert.h>
17169#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017170
17171#undef $ac_func
17172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173/* Override any GCC internal prototype to avoid an error.
17174 Use char because int might match the return type of a GCC
17175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017176#ifdef __cplusplus
17177extern "C"
17178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017179char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017180/* The GNU C library defines this for functions which it implements
17181 to always fail with ENOSYS. Some functions are actually named
17182 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017184choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017185#endif
17186
Skip Montanaro6dead952003-09-25 14:50:04 +000017187int
17188main ()
17189{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017191 ;
17192 return 0;
17193}
17194_ACEOF
17195rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196if { (ac_try="$ac_link"
17197case "(($ac_try" in
17198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17199 *) ac_try_echo=$ac_try;;
17200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017202 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017204 grep -v '^ *+' conftest.er1 >conftest.err
17205 rm -f conftest.er1
17206 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017208 (exit $ac_status); } && {
17209 test -z "$ac_c_werror_flag" ||
17210 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017211 } && test -s conftest$ac_exeext &&
17212 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017213 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017214else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017216sed 's/^/| /' conftest.$ac_ext >&5
17217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220
17221rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017222 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017223fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017224ac_res=`eval echo '${'$as_ac_var'}'`
17225 { echo "$as_me:$LINENO: result: $ac_res" >&5
17226echo "${ECHO_T}$ac_res" >&6; }
17227if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017228 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017229#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017230_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017231
Guido van Rossume97ee181999-12-20 21:27:22 +000017232fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017233done
Guido van Rossume97ee181999-12-20 21:27:22 +000017234
Michael W. Hudson54241132001-12-07 15:38:26 +000017235
Guido van Rossume97ee181999-12-20 21:27:22 +000017236# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17237# loading of modules.
17238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017239{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17240echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017241if test -z "$DYNLOADFILE"
17242then
17243 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017244 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17245 if test "$ac_cv_func_dlopen" = yes
17246 then DYNLOADFILE="dynload_shlib.o"
17247 else DYNLOADFILE="dynload_aix.o"
17248 fi
17249 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017250 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017251 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17252 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017253 *)
17254 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17255 # out any dynamic loading
17256 if test "$ac_cv_func_dlopen" = yes
17257 then DYNLOADFILE="dynload_shlib.o"
17258 else DYNLOADFILE="dynload_stub.o"
17259 fi
17260 ;;
17261 esac
17262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017263{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17264echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017265if test "$DYNLOADFILE" != "dynload_stub.o"
17266then
Martin v. Löwis11437992002-04-12 09:54:03 +000017267
17268cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017269#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017270_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017271
17272fi
17273
Neil Schemenauer4e425612001-06-19 15:44:15 +000017274# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17275
Michael W. Hudson54241132001-12-07 15:38:26 +000017276
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017277{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17278echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017279if test -z "$MACHDEP_OBJS"
17280then
Jack Jansene578a632001-08-15 01:27:14 +000017281 MACHDEP_OBJS=$extra_machdep_objs
17282else
17283 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017284fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017285{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17286echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017287
Guido van Rossum627b2d71993-12-24 10:39:16 +000017288# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
Martin v. Löwisd6320502004-08-12 13:45:08 +000017360
Martin v. Löwisc3001752005-01-23 09:27:24 +000017361
17362
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017363
17364
Thomas Wouterscf297e42007-02-23 15:07:44 +000017365
17366
Gregory P. Smith25523d22007-09-03 16:44:55 +000017367
Christian Heimes4e30a842007-11-30 22:12:06 +000017368
Martin v. Löwis92fab752008-03-08 10:40:41 +000017369
Martin v. Löwis823725e2008-03-24 13:39:54 +000017370
17371
Benjamin Peterson965ce872009-04-05 21:24:58 +000017372
17373
17374
17375
Martin v. Löwis011e8422009-05-05 04:43:17 +000017376
Martin v. Löwis113a0852009-05-29 17:25:39 +000017377
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017378
17379
17380
17381
Martin v. Löwis823725e2008-03-24 13:39:54 +000017382for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17383 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017384 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017385 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000017386 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017387 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017388 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017389 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17390 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017391 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17392 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017393 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017394 truncate uname unsetenv utimes waitpid wait3 wait4 \
17395 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017396do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017397as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17398{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17399echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017401 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017402else
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017404/* confdefs.h. */
17405_ACEOF
17406cat confdefs.h >>conftest.$ac_ext
17407cat >>conftest.$ac_ext <<_ACEOF
17408/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017409/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17410 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17411#define $ac_func innocuous_$ac_func
17412
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017413/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017414 which can conflict with char $ac_func (); below.
17415 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017416 <limits.h> exists even on freestanding compilers. */
17417
17418#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017419# include <limits.h>
17420#else
17421# include <assert.h>
17422#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017423
17424#undef $ac_func
17425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426/* Override any GCC internal prototype to avoid an error.
17427 Use char because int might match the return type of a GCC
17428 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017429#ifdef __cplusplus
17430extern "C"
17431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017432char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017433/* The GNU C library defines this for functions which it implements
17434 to always fail with ENOSYS. Some functions are actually named
17435 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017436#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017437choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017438#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017439
Skip Montanaro6dead952003-09-25 14:50:04 +000017440int
17441main ()
17442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017443return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017444 ;
17445 return 0;
17446}
17447_ACEOF
17448rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449if { (ac_try="$ac_link"
17450case "(($ac_try" in
17451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17452 *) ac_try_echo=$ac_try;;
17453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017457 grep -v '^ *+' conftest.er1 >conftest.err
17458 rm -f conftest.er1
17459 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461 (exit $ac_status); } && {
17462 test -z "$ac_c_werror_flag" ||
17463 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017464 } && test -s conftest$ac_exeext &&
17465 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017466 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017469sed 's/^/| /' conftest.$ac_ext >&5
17470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017473
17474rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017475 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017476fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017477ac_res=`eval echo '${'$as_ac_var'}'`
17478 { echo "$as_me:$LINENO: result: $ac_res" >&5
17479echo "${ECHO_T}$ac_res" >&6; }
17480if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017481 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017482#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017483_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017484
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017485fi
17486done
17487
Michael W. Hudson54241132001-12-07 15:38:26 +000017488
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017489# For some functions, having a definition is not sufficient, since
17490# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017491{ echo "$as_me:$LINENO: checking for chroot" >&5
17492echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017493cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017494/* confdefs.h. */
17495_ACEOF
17496cat confdefs.h >>conftest.$ac_ext
17497cat >>conftest.$ac_ext <<_ACEOF
17498/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017499#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017500int
17501main ()
17502{
17503void *x=chroot
17504 ;
17505 return 0;
17506}
17507_ACEOF
17508rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509if { (ac_try="$ac_compile"
17510case "(($ac_try" in
17511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17512 *) ac_try_echo=$ac_try;;
17513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017517 grep -v '^ *+' conftest.er1 >conftest.err
17518 rm -f conftest.er1
17519 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521 (exit $ac_status); } && {
17522 test -z "$ac_c_werror_flag" ||
17523 test ! -s conftest.err
17524 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017525
17526cat >>confdefs.h <<\_ACEOF
17527#define HAVE_CHROOT 1
17528_ACEOF
17529
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017530 { echo "$as_me:$LINENO: result: yes" >&5
17531echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017532else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017534sed 's/^/| /' conftest.$ac_ext >&5
17535
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017536 { echo "$as_me:$LINENO: result: no" >&5
17537echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017538
17539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540
17541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017542{ echo "$as_me:$LINENO: checking for link" >&5
17543echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017544cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017545/* confdefs.h. */
17546_ACEOF
17547cat confdefs.h >>conftest.$ac_ext
17548cat >>conftest.$ac_ext <<_ACEOF
17549/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017550#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017551int
17552main ()
17553{
17554void *x=link
17555 ;
17556 return 0;
17557}
17558_ACEOF
17559rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560if { (ac_try="$ac_compile"
17561case "(($ac_try" in
17562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17563 *) ac_try_echo=$ac_try;;
17564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017568 grep -v '^ *+' conftest.er1 >conftest.err
17569 rm -f conftest.er1
17570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572 (exit $ac_status); } && {
17573 test -z "$ac_c_werror_flag" ||
17574 test ! -s conftest.err
17575 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017576
17577cat >>confdefs.h <<\_ACEOF
17578#define HAVE_LINK 1
17579_ACEOF
17580
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017581 { echo "$as_me:$LINENO: result: yes" >&5
17582echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017583else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017585sed 's/^/| /' conftest.$ac_ext >&5
17586
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017587 { echo "$as_me:$LINENO: result: no" >&5
17588echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017589
17590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591
17592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017593{ echo "$as_me:$LINENO: checking for symlink" >&5
17594echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017596/* confdefs.h. */
17597_ACEOF
17598cat confdefs.h >>conftest.$ac_ext
17599cat >>conftest.$ac_ext <<_ACEOF
17600/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017601#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017602int
17603main ()
17604{
17605void *x=symlink
17606 ;
17607 return 0;
17608}
17609_ACEOF
17610rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017611if { (ac_try="$ac_compile"
17612case "(($ac_try" in
17613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17614 *) ac_try_echo=$ac_try;;
17615esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017619 grep -v '^ *+' conftest.er1 >conftest.err
17620 rm -f conftest.er1
17621 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623 (exit $ac_status); } && {
17624 test -z "$ac_c_werror_flag" ||
17625 test ! -s conftest.err
17626 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017627
17628cat >>confdefs.h <<\_ACEOF
17629#define HAVE_SYMLINK 1
17630_ACEOF
17631
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017632 { echo "$as_me:$LINENO: result: yes" >&5
17633echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017634else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017636sed 's/^/| /' conftest.$ac_ext >&5
17637
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017638 { echo "$as_me:$LINENO: result: no" >&5
17639echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017640
17641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642
17643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017644{ echo "$as_me:$LINENO: checking for fchdir" >&5
17645echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017646cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017647/* confdefs.h. */
17648_ACEOF
17649cat confdefs.h >>conftest.$ac_ext
17650cat >>conftest.$ac_ext <<_ACEOF
17651/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017652#include <unistd.h>
17653int
17654main ()
17655{
17656void *x=fchdir
17657 ;
17658 return 0;
17659}
17660_ACEOF
17661rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662if { (ac_try="$ac_compile"
17663case "(($ac_try" in
17664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17665 *) ac_try_echo=$ac_try;;
17666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017670 grep -v '^ *+' conftest.er1 >conftest.err
17671 rm -f conftest.er1
17672 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674 (exit $ac_status); } && {
17675 test -z "$ac_c_werror_flag" ||
17676 test ! -s conftest.err
17677 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017678
17679cat >>confdefs.h <<\_ACEOF
17680#define HAVE_FCHDIR 1
17681_ACEOF
17682
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017683 { echo "$as_me:$LINENO: result: yes" >&5
17684echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017685else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017687sed 's/^/| /' conftest.$ac_ext >&5
17688
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017689 { echo "$as_me:$LINENO: result: no" >&5
17690echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017691
17692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693
17694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017695{ echo "$as_me:$LINENO: checking for fsync" >&5
17696echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017697cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017698/* confdefs.h. */
17699_ACEOF
17700cat confdefs.h >>conftest.$ac_ext
17701cat >>conftest.$ac_ext <<_ACEOF
17702/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017703#include <unistd.h>
17704int
17705main ()
17706{
17707void *x=fsync
17708 ;
17709 return 0;
17710}
17711_ACEOF
17712rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713if { (ac_try="$ac_compile"
17714case "(($ac_try" in
17715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17716 *) ac_try_echo=$ac_try;;
17717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017721 grep -v '^ *+' conftest.er1 >conftest.err
17722 rm -f conftest.er1
17723 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725 (exit $ac_status); } && {
17726 test -z "$ac_c_werror_flag" ||
17727 test ! -s conftest.err
17728 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017729
17730cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017731#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017732_ACEOF
17733
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017734 { echo "$as_me:$LINENO: result: yes" >&5
17735echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017736else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017738sed 's/^/| /' conftest.$ac_ext >&5
17739
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017740 { echo "$as_me:$LINENO: result: no" >&5
17741echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017742
17743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744
17745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017746{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17747echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017748cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017749/* confdefs.h. */
17750_ACEOF
17751cat confdefs.h >>conftest.$ac_ext
17752cat >>conftest.$ac_ext <<_ACEOF
17753/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017754#include <unistd.h>
17755int
17756main ()
17757{
17758void *x=fdatasync
17759 ;
17760 return 0;
17761}
17762_ACEOF
17763rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764if { (ac_try="$ac_compile"
17765case "(($ac_try" in
17766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17767 *) ac_try_echo=$ac_try;;
17768esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017772 grep -v '^ *+' conftest.er1 >conftest.err
17773 rm -f conftest.er1
17774 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776 (exit $ac_status); } && {
17777 test -z "$ac_c_werror_flag" ||
17778 test ! -s conftest.err
17779 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017780
17781cat >>confdefs.h <<\_ACEOF
17782#define HAVE_FDATASYNC 1
17783_ACEOF
17784
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017785 { echo "$as_me:$LINENO: result: yes" >&5
17786echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017787else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017789sed 's/^/| /' conftest.$ac_ext >&5
17790
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017791 { echo "$as_me:$LINENO: result: no" >&5
17792echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017793
17794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795
17796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017797{ echo "$as_me:$LINENO: checking for epoll" >&5
17798echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017799cat >conftest.$ac_ext <<_ACEOF
17800/* confdefs.h. */
17801_ACEOF
17802cat confdefs.h >>conftest.$ac_ext
17803cat >>conftest.$ac_ext <<_ACEOF
17804/* end confdefs.h. */
17805#include <sys/epoll.h>
17806int
17807main ()
17808{
17809void *x=epoll_create
17810 ;
17811 return 0;
17812}
17813_ACEOF
17814rm -f conftest.$ac_objext
17815if { (ac_try="$ac_compile"
17816case "(($ac_try" in
17817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17818 *) ac_try_echo=$ac_try;;
17819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017821 (eval "$ac_compile") 2>conftest.er1
17822 ac_status=$?
17823 grep -v '^ *+' conftest.er1 >conftest.err
17824 rm -f conftest.er1
17825 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017827 (exit $ac_status); } && {
17828 test -z "$ac_c_werror_flag" ||
17829 test ! -s conftest.err
17830 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017831
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017832cat >>confdefs.h <<\_ACEOF
17833#define HAVE_EPOLL 1
17834_ACEOF
17835
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017836 { echo "$as_me:$LINENO: result: yes" >&5
17837echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017839 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017840sed 's/^/| /' conftest.$ac_ext >&5
17841
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017842 { echo "$as_me:$LINENO: result: no" >&5
17843echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017844
17845fi
17846
17847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017848{ echo "$as_me:$LINENO: checking for kqueue" >&5
17849echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017850cat >conftest.$ac_ext <<_ACEOF
17851/* confdefs.h. */
17852_ACEOF
17853cat confdefs.h >>conftest.$ac_ext
17854cat >>conftest.$ac_ext <<_ACEOF
17855/* end confdefs.h. */
17856
17857#include <sys/types.h>
17858#include <sys/event.h>
17859
17860int
17861main ()
17862{
17863int x=kqueue()
17864 ;
17865 return 0;
17866}
17867_ACEOF
17868rm -f conftest.$ac_objext
17869if { (ac_try="$ac_compile"
17870case "(($ac_try" in
17871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17872 *) ac_try_echo=$ac_try;;
17873esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017875 (eval "$ac_compile") 2>conftest.er1
17876 ac_status=$?
17877 grep -v '^ *+' conftest.er1 >conftest.err
17878 rm -f conftest.er1
17879 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017881 (exit $ac_status); } && {
17882 test -z "$ac_c_werror_flag" ||
17883 test ! -s conftest.err
17884 } && test -s conftest.$ac_objext; then
17885
17886cat >>confdefs.h <<\_ACEOF
17887#define HAVE_KQUEUE 1
17888_ACEOF
17889
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017890 { echo "$as_me:$LINENO: result: yes" >&5
17891echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017892else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017893 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017894sed 's/^/| /' conftest.$ac_ext >&5
17895
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017896 { echo "$as_me:$LINENO: result: no" >&5
17897echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017898
17899fi
17900
17901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017902# On some systems (eg. FreeBSD 5), we would find a definition of the
17903# functions ctermid_r, setgroups in the library, but no prototype
17904# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17905# address to avoid compiler warnings and potential miscompilations
17906# because of the missing prototypes.
17907
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017908{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17909echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017910cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017911/* confdefs.h. */
17912_ACEOF
17913cat confdefs.h >>conftest.$ac_ext
17914cat >>conftest.$ac_ext <<_ACEOF
17915/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017916
17917#include "confdefs.h"
17918#include <stdio.h>
17919
Martin v. Löwisd5843682002-11-21 20:41:28 +000017920int
17921main ()
17922{
17923void* p = ctermid_r
17924 ;
17925 return 0;
17926}
17927_ACEOF
17928rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929if { (ac_try="$ac_compile"
17930case "(($ac_try" in
17931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17932 *) ac_try_echo=$ac_try;;
17933esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017937 grep -v '^ *+' conftest.er1 >conftest.err
17938 rm -f conftest.er1
17939 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941 (exit $ac_status); } && {
17942 test -z "$ac_c_werror_flag" ||
17943 test ! -s conftest.err
17944 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017945
17946cat >>confdefs.h <<\_ACEOF
17947#define HAVE_CTERMID_R 1
17948_ACEOF
17949
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017950 { echo "$as_me:$LINENO: result: yes" >&5
17951echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017952else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017954sed 's/^/| /' conftest.$ac_ext >&5
17955
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017956 { echo "$as_me:$LINENO: result: no" >&5
17957echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017958
17959fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17962
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017963{ echo "$as_me:$LINENO: checking for flock" >&5
17964echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017966/* confdefs.h. */
17967_ACEOF
17968cat confdefs.h >>conftest.$ac_ext
17969cat >>conftest.$ac_ext <<_ACEOF
17970/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017971
17972#include "confdefs.h"
17973#include <sys/file.h>
17974
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017975int
17976main ()
17977{
17978void* p = flock
17979 ;
17980 return 0;
17981}
17982_ACEOF
17983rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984if { (ac_try="$ac_compile"
17985case "(($ac_try" in
17986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17987 *) ac_try_echo=$ac_try;;
17988esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017992 grep -v '^ *+' conftest.er1 >conftest.err
17993 rm -f conftest.er1
17994 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017996 (exit $ac_status); } && {
17997 test -z "$ac_c_werror_flag" ||
17998 test ! -s conftest.err
17999 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018000
18001cat >>confdefs.h <<\_ACEOF
18002#define HAVE_FLOCK 1
18003_ACEOF
18004
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018005 { echo "$as_me:$LINENO: result: yes" >&5
18006echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018009sed 's/^/| /' conftest.$ac_ext >&5
18010
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018011 { echo "$as_me:$LINENO: result: no" >&5
18012echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018013
18014fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18017
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018018{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18019echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018021/* confdefs.h. */
18022_ACEOF
18023cat confdefs.h >>conftest.$ac_ext
18024cat >>conftest.$ac_ext <<_ACEOF
18025/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018026
18027#include "confdefs.h"
18028#include <unistd.h>
18029
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018030int
18031main ()
18032{
18033void* p = getpagesize
18034 ;
18035 return 0;
18036}
18037_ACEOF
18038rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039if { (ac_try="$ac_compile"
18040case "(($ac_try" in
18041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18042 *) ac_try_echo=$ac_try;;
18043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018047 grep -v '^ *+' conftest.er1 >conftest.err
18048 rm -f conftest.er1
18049 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051 (exit $ac_status); } && {
18052 test -z "$ac_c_werror_flag" ||
18053 test ! -s conftest.err
18054 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018055
18056cat >>confdefs.h <<\_ACEOF
18057#define HAVE_GETPAGESIZE 1
18058_ACEOF
18059
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018060 { echo "$as_me:$LINENO: result: yes" >&5
18061echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018062else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018064sed 's/^/| /' conftest.$ac_ext >&5
18065
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018066 { echo "$as_me:$LINENO: result: no" >&5
18067echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018068
18069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018070
18071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018072
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018073for ac_prog in true
18074do
18075 # Extract the first word of "$ac_prog", so it can be a program name with args.
18076set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018077{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18078echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018079if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018080 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018081else
18082 if test -n "$TRUE"; then
18083 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18084else
18085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18086for as_dir in $PATH
18087do
18088 IFS=$as_save_IFS
18089 test -z "$as_dir" && as_dir=.
18090 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091 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 +000018092 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018093 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018094 break 2
18095 fi
18096done
18097done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018099
18100fi
18101fi
18102TRUE=$ac_cv_prog_TRUE
18103if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018104 { echo "$as_me:$LINENO: result: $TRUE" >&5
18105echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018106else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018107 { echo "$as_me:$LINENO: result: no" >&5
18108echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018109fi
18110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018111
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018112 test -n "$TRUE" && break
18113done
18114test -n "$TRUE" || TRUE="/bin/true"
18115
18116
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018117{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18118echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018119if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018120 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018121else
18122 ac_check_lib_save_LIBS=$LIBS
18123LIBS="-lc $LIBS"
18124cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018125/* confdefs.h. */
18126_ACEOF
18127cat confdefs.h >>conftest.$ac_ext
18128cat >>conftest.$ac_ext <<_ACEOF
18129/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131/* Override any GCC internal prototype to avoid an error.
18132 Use char because int might match the return type of a GCC
18133 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018134#ifdef __cplusplus
18135extern "C"
18136#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018137char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018138int
18139main ()
18140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018142 ;
18143 return 0;
18144}
18145_ACEOF
18146rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147if { (ac_try="$ac_link"
18148case "(($ac_try" in
18149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18150 *) ac_try_echo=$ac_try;;
18151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018153 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018155 grep -v '^ *+' conftest.er1 >conftest.err
18156 rm -f conftest.er1
18157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018159 (exit $ac_status); } && {
18160 test -z "$ac_c_werror_flag" ||
18161 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018162 } && test -s conftest$ac_exeext &&
18163 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018164 ac_cv_lib_c_inet_aton=yes
18165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018167sed 's/^/| /' conftest.$ac_ext >&5
18168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018169 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171
18172rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018174LIBS=$ac_check_lib_save_LIBS
18175fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018176{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18177echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18178if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018179 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018180else
18181
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018182{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18183echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018184if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018185 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018186else
18187 ac_check_lib_save_LIBS=$LIBS
18188LIBS="-lresolv $LIBS"
18189cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018190/* confdefs.h. */
18191_ACEOF
18192cat confdefs.h >>conftest.$ac_ext
18193cat >>conftest.$ac_ext <<_ACEOF
18194/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018196/* Override any GCC internal prototype to avoid an error.
18197 Use char because int might match the return type of a GCC
18198 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018199#ifdef __cplusplus
18200extern "C"
18201#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018202char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018203int
18204main ()
18205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018206return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018207 ;
18208 return 0;
18209}
18210_ACEOF
18211rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018212if { (ac_try="$ac_link"
18213case "(($ac_try" in
18214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18215 *) ac_try_echo=$ac_try;;
18216esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018218 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018220 grep -v '^ *+' conftest.er1 >conftest.err
18221 rm -f conftest.er1
18222 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224 (exit $ac_status); } && {
18225 test -z "$ac_c_werror_flag" ||
18226 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018227 } && test -s conftest$ac_exeext &&
18228 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018229 ac_cv_lib_resolv_inet_aton=yes
18230else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018232sed 's/^/| /' conftest.$ac_ext >&5
18233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018234 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018236
18237rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018239LIBS=$ac_check_lib_save_LIBS
18240fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018241{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18242echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18243if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018244 cat >>confdefs.h <<_ACEOF
18245#define HAVE_LIBRESOLV 1
18246_ACEOF
18247
18248 LIBS="-lresolv $LIBS"
18249
18250fi
18251
18252
18253fi
18254
18255
Christian Heimesd0764e22007-12-04 15:00:33 +000018256# On Tru64, chflags seems to be present, but calling it will
18257# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018258{ echo "$as_me:$LINENO: checking for chflags" >&5
18259echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018260if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018261 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018262else
18263 if test "$cross_compiling" = yes; then
18264 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018265else
18266 cat >conftest.$ac_ext <<_ACEOF
18267/* confdefs.h. */
18268_ACEOF
18269cat confdefs.h >>conftest.$ac_ext
18270cat >>conftest.$ac_ext <<_ACEOF
18271/* end confdefs.h. */
18272
18273#include <sys/stat.h>
18274#include <unistd.h>
18275int main(int argc, char*argv[])
18276{
18277 if(chflags(argv[0], 0) != 0)
18278 return 1;
18279 return 0;
18280}
18281
18282_ACEOF
18283rm -f conftest$ac_exeext
18284if { (ac_try="$ac_link"
18285case "(($ac_try" in
18286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18287 *) ac_try_echo=$ac_try;;
18288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018290 (eval "$ac_link") 2>&5
18291 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018293 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18294 { (case "(($ac_try" in
18295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18296 *) ac_try_echo=$ac_try;;
18297esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018299 (eval "$ac_try") 2>&5
18300 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018302 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018303 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018305 echo "$as_me: program exited with status $ac_status" >&5
18306echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018307sed 's/^/| /' conftest.$ac_ext >&5
18308
18309( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018310ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018311fi
18312rm -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 +000018313fi
18314
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018315
18316
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018317fi
18318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018319{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18320echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018321if test $ac_cv_have_chflags = yes
18322then
18323
18324cat >>confdefs.h <<\_ACEOF
18325#define HAVE_CHFLAGS 1
18326_ACEOF
18327
18328fi
18329
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018330{ echo "$as_me:$LINENO: checking for lchflags" >&5
18331echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018332if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018333 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018334else
18335 if test "$cross_compiling" = yes; then
18336 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018337else
18338 cat >conftest.$ac_ext <<_ACEOF
18339/* confdefs.h. */
18340_ACEOF
18341cat confdefs.h >>conftest.$ac_ext
18342cat >>conftest.$ac_ext <<_ACEOF
18343/* end confdefs.h. */
18344
18345#include <sys/stat.h>
18346#include <unistd.h>
18347int main(int argc, char*argv[])
18348{
18349 if(lchflags(argv[0], 0) != 0)
18350 return 1;
18351 return 0;
18352}
18353
18354_ACEOF
18355rm -f conftest$ac_exeext
18356if { (ac_try="$ac_link"
18357case "(($ac_try" in
18358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18359 *) ac_try_echo=$ac_try;;
18360esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018362 (eval "$ac_link") 2>&5
18363 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018365 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18366 { (case "(($ac_try" in
18367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18368 *) ac_try_echo=$ac_try;;
18369esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018371 (eval "$ac_try") 2>&5
18372 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018374 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018375 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018376else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018377 echo "$as_me: program exited with status $ac_status" >&5
18378echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018379sed 's/^/| /' conftest.$ac_ext >&5
18380
18381( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018382ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018383fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18385fi
18386
18387
Christian Heimesd0764e22007-12-04 15:00:33 +000018388
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018389fi
18390
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018391{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18392echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018393if test $ac_cv_have_lchflags = yes
18394then
18395
18396cat >>confdefs.h <<\_ACEOF
18397#define HAVE_LCHFLAGS 1
18398_ACEOF
18399
18400fi
18401
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018402case $ac_sys_system/$ac_sys_release in
18403Darwin/*)
18404 _CUR_CFLAGS="${CFLAGS}"
18405 _CUR_LDFLAGS="${LDFLAGS}"
18406 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18407 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18408 ;;
18409esac
18410
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018411{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18412echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018413if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018414 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018415else
18416 ac_check_lib_save_LIBS=$LIBS
18417LIBS="-lz $LIBS"
18418cat >conftest.$ac_ext <<_ACEOF
18419/* confdefs.h. */
18420_ACEOF
18421cat confdefs.h >>conftest.$ac_ext
18422cat >>conftest.$ac_ext <<_ACEOF
18423/* end confdefs.h. */
18424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018425/* Override any GCC internal prototype to avoid an error.
18426 Use char because int might match the return type of a GCC
18427 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018428#ifdef __cplusplus
18429extern "C"
18430#endif
18431char inflateCopy ();
18432int
18433main ()
18434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018436 ;
18437 return 0;
18438}
18439_ACEOF
18440rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441if { (ac_try="$ac_link"
18442case "(($ac_try" in
18443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18444 *) ac_try_echo=$ac_try;;
18445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018448 ac_status=$?
18449 grep -v '^ *+' conftest.er1 >conftest.err
18450 rm -f conftest.er1
18451 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018453 (exit $ac_status); } && {
18454 test -z "$ac_c_werror_flag" ||
18455 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018456 } && test -s conftest$ac_exeext &&
18457 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018458 ac_cv_lib_z_inflateCopy=yes
18459else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018460 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018461sed 's/^/| /' conftest.$ac_ext >&5
18462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018463 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018465
18466rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018467 conftest$ac_exeext conftest.$ac_ext
18468LIBS=$ac_check_lib_save_LIBS
18469fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018470{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18471echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18472if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018473
18474cat >>confdefs.h <<\_ACEOF
18475#define HAVE_ZLIB_COPY 1
18476_ACEOF
18477
18478fi
18479
18480
18481case $ac_sys_system/$ac_sys_release in
18482Darwin/*)
18483 CFLAGS="${_CUR_CFLAGS}"
18484 LDFLAGS="${_CUR_LDFLAGS}"
18485 ;;
18486esac
18487
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018488{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18489echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018491/* confdefs.h. */
18492_ACEOF
18493cat confdefs.h >>conftest.$ac_ext
18494cat >>conftest.$ac_ext <<_ACEOF
18495/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018496
18497#include "confdefs.h"
18498#include <netdb.h>
18499
Martin v. Löwise9416172003-05-03 10:12:45 +000018500int
18501main ()
18502{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018503void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018504 ;
18505 return 0;
18506}
18507_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018508rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018509if { (ac_try="$ac_link"
18510case "(($ac_try" in
18511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18512 *) ac_try_echo=$ac_try;;
18513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018517 grep -v '^ *+' conftest.er1 >conftest.err
18518 rm -f conftest.er1
18519 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018521 (exit $ac_status); } && {
18522 test -z "$ac_c_werror_flag" ||
18523 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018524 } && test -s conftest$ac_exeext &&
18525 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018526
18527cat >>confdefs.h <<\_ACEOF
18528#define HAVE_HSTRERROR 1
18529_ACEOF
18530
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018531 { echo "$as_me:$LINENO: result: yes" >&5
18532echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018533else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018535sed 's/^/| /' conftest.$ac_ext >&5
18536
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018537 { echo "$as_me:$LINENO: result: no" >&5
18538echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018539
18540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018541
18542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018543 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018545{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18546echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018547cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018548/* confdefs.h. */
18549_ACEOF
18550cat confdefs.h >>conftest.$ac_ext
18551cat >>conftest.$ac_ext <<_ACEOF
18552/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018553
18554#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018555#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018556#include <sys/socket.h>
18557#include <netinet/in.h>
18558#include <arpa/inet.h>
18559
Martin v. Löwise9416172003-05-03 10:12:45 +000018560int
18561main ()
18562{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018563void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018564 ;
18565 return 0;
18566}
18567_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018568rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018569if { (ac_try="$ac_link"
18570case "(($ac_try" in
18571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18572 *) ac_try_echo=$ac_try;;
18573esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018577 grep -v '^ *+' conftest.er1 >conftest.err
18578 rm -f conftest.er1
18579 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018581 (exit $ac_status); } && {
18582 test -z "$ac_c_werror_flag" ||
18583 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018584 } && test -s conftest$ac_exeext &&
18585 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018586
18587cat >>confdefs.h <<\_ACEOF
18588#define HAVE_INET_ATON 1
18589_ACEOF
18590
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018591 { echo "$as_me:$LINENO: result: yes" >&5
18592echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018593else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018595sed 's/^/| /' conftest.$ac_ext >&5
18596
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018597 { echo "$as_me:$LINENO: result: no" >&5
18598echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018599
18600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018601
18602rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018603 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018604
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018605{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18606echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018608/* confdefs.h. */
18609_ACEOF
18610cat confdefs.h >>conftest.$ac_ext
18611cat >>conftest.$ac_ext <<_ACEOF
18612/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018613
18614#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018615#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018616#include <sys/socket.h>
18617#include <netinet/in.h>
18618#include <arpa/inet.h>
18619
Martin v. Löwise9416172003-05-03 10:12:45 +000018620int
18621main ()
18622{
18623void* p = inet_pton
18624 ;
18625 return 0;
18626}
18627_ACEOF
18628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018629if { (ac_try="$ac_compile"
18630case "(($ac_try" in
18631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18632 *) ac_try_echo=$ac_try;;
18633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018637 grep -v '^ *+' conftest.er1 >conftest.err
18638 rm -f conftest.er1
18639 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018641 (exit $ac_status); } && {
18642 test -z "$ac_c_werror_flag" ||
18643 test ! -s conftest.err
18644 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018645
18646cat >>confdefs.h <<\_ACEOF
18647#define HAVE_INET_PTON 1
18648_ACEOF
18649
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018650 { echo "$as_me:$LINENO: result: yes" >&5
18651echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018652else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018654sed 's/^/| /' conftest.$ac_ext >&5
18655
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018656 { echo "$as_me:$LINENO: result: no" >&5
18657echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018658
18659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018660
18661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018662
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018663# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018664{ echo "$as_me:$LINENO: checking for setgroups" >&5
18665echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018666cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018667/* confdefs.h. */
18668_ACEOF
18669cat confdefs.h >>conftest.$ac_ext
18670cat >>conftest.$ac_ext <<_ACEOF
18671/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018672
18673#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018674#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018675#ifdef HAVE_GRP_H
18676#include <grp.h>
18677#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018678
Martin v. Löwisd5843682002-11-21 20:41:28 +000018679int
18680main ()
18681{
18682void* p = setgroups
18683 ;
18684 return 0;
18685}
18686_ACEOF
18687rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018688if { (ac_try="$ac_compile"
18689case "(($ac_try" in
18690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18691 *) ac_try_echo=$ac_try;;
18692esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018696 grep -v '^ *+' conftest.er1 >conftest.err
18697 rm -f conftest.er1
18698 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018700 (exit $ac_status); } && {
18701 test -z "$ac_c_werror_flag" ||
18702 test ! -s conftest.err
18703 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018704
18705cat >>confdefs.h <<\_ACEOF
18706#define HAVE_SETGROUPS 1
18707_ACEOF
18708
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018709 { echo "$as_me:$LINENO: result: yes" >&5
18710echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018711else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018713sed 's/^/| /' conftest.$ac_ext >&5
18714
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018715 { echo "$as_me:$LINENO: result: no" >&5
18716echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018717
18718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018719
18720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018721
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018722# check for openpty and forkpty
18723
Martin v. Löwis11437992002-04-12 09:54:03 +000018724
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018725for ac_func in openpty
18726do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018727as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18728{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18729echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018730if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018731 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018732else
Martin v. Löwis11437992002-04-12 09:54:03 +000018733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018734/* confdefs.h. */
18735_ACEOF
18736cat confdefs.h >>conftest.$ac_ext
18737cat >>conftest.$ac_ext <<_ACEOF
18738/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018739/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18740 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18741#define $ac_func innocuous_$ac_func
18742
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018743/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018744 which can conflict with char $ac_func (); below.
18745 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018746 <limits.h> exists even on freestanding compilers. */
18747
18748#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018749# include <limits.h>
18750#else
18751# include <assert.h>
18752#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018753
18754#undef $ac_func
18755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018756/* Override any GCC internal prototype to avoid an error.
18757 Use char because int might match the return type of a GCC
18758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018759#ifdef __cplusplus
18760extern "C"
18761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018762char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018763/* The GNU C library defines this for functions which it implements
18764 to always fail with ENOSYS. Some functions are actually named
18765 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018766#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018767choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018768#endif
18769
Skip Montanaro6dead952003-09-25 14:50:04 +000018770int
18771main ()
18772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018773return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018774 ;
18775 return 0;
18776}
18777_ACEOF
18778rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018779if { (ac_try="$ac_link"
18780case "(($ac_try" in
18781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18782 *) ac_try_echo=$ac_try;;
18783esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018785 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018787 grep -v '^ *+' conftest.er1 >conftest.err
18788 rm -f conftest.er1
18789 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018791 (exit $ac_status); } && {
18792 test -z "$ac_c_werror_flag" ||
18793 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018794 } && test -s conftest$ac_exeext &&
18795 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018796 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018797else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018799sed 's/^/| /' conftest.$ac_ext >&5
18800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018801 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018803
18804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018805 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018806fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018807ac_res=`eval echo '${'$as_ac_var'}'`
18808 { echo "$as_me:$LINENO: result: $ac_res" >&5
18809echo "${ECHO_T}$ac_res" >&6; }
18810if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018811 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018812#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018813_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018814
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018815else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018816 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18817echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018818if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018819 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018820else
Martin v. Löwis11437992002-04-12 09:54:03 +000018821 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018822LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018823cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018824/* confdefs.h. */
18825_ACEOF
18826cat confdefs.h >>conftest.$ac_ext
18827cat >>conftest.$ac_ext <<_ACEOF
18828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018830/* Override any GCC internal prototype to avoid an error.
18831 Use char because int might match the return type of a GCC
18832 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018833#ifdef __cplusplus
18834extern "C"
18835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018836char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018837int
18838main ()
18839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018840return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018841 ;
18842 return 0;
18843}
18844_ACEOF
18845rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018846if { (ac_try="$ac_link"
18847case "(($ac_try" in
18848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18849 *) ac_try_echo=$ac_try;;
18850esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018852 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018854 grep -v '^ *+' conftest.er1 >conftest.err
18855 rm -f conftest.er1
18856 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018858 (exit $ac_status); } && {
18859 test -z "$ac_c_werror_flag" ||
18860 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018861 } && test -s conftest$ac_exeext &&
18862 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018863 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018864else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018866sed 's/^/| /' conftest.$ac_ext >&5
18867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018868 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018870
18871rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018872 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018873LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018874fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018875{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18876echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18877if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018878 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018879#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018880_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018881 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018882else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018883 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18884echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018885if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018886 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018887else
18888 ac_check_lib_save_LIBS=$LIBS
18889LIBS="-lbsd $LIBS"
18890cat >conftest.$ac_ext <<_ACEOF
18891/* confdefs.h. */
18892_ACEOF
18893cat confdefs.h >>conftest.$ac_ext
18894cat >>conftest.$ac_ext <<_ACEOF
18895/* end confdefs.h. */
18896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018897/* Override any GCC internal prototype to avoid an error.
18898 Use char because int might match the return type of a GCC
18899 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018900#ifdef __cplusplus
18901extern "C"
18902#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018903char openpty ();
18904int
18905main ()
18906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018907return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018908 ;
18909 return 0;
18910}
18911_ACEOF
18912rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018913if { (ac_try="$ac_link"
18914case "(($ac_try" in
18915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18916 *) ac_try_echo=$ac_try;;
18917esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018919 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018920 ac_status=$?
18921 grep -v '^ *+' conftest.er1 >conftest.err
18922 rm -f conftest.er1
18923 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018925 (exit $ac_status); } && {
18926 test -z "$ac_c_werror_flag" ||
18927 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018928 } && test -s conftest$ac_exeext &&
18929 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018930 ac_cv_lib_bsd_openpty=yes
18931else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018932 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018933sed 's/^/| /' conftest.$ac_ext >&5
18934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018935 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018937
18938rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018939 conftest$ac_exeext conftest.$ac_ext
18940LIBS=$ac_check_lib_save_LIBS
18941fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018942{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18943echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18944if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018945 cat >>confdefs.h <<\_ACEOF
18946#define HAVE_OPENPTY 1
18947_ACEOF
18948 LIBS="$LIBS -lbsd"
18949fi
18950
18951
18952fi
18953
Fred Drake8cef4cf2000-06-28 16:40:38 +000018954
18955fi
18956done
18957
Martin v. Löwis11437992002-04-12 09:54:03 +000018958
Fred Drake8cef4cf2000-06-28 16:40:38 +000018959for ac_func in forkpty
18960do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018961as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18962{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18963echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018964if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018965 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018966else
Martin v. Löwis11437992002-04-12 09:54:03 +000018967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018968/* confdefs.h. */
18969_ACEOF
18970cat confdefs.h >>conftest.$ac_ext
18971cat >>conftest.$ac_ext <<_ACEOF
18972/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018973/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18974 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18975#define $ac_func innocuous_$ac_func
18976
Fred Drake8cef4cf2000-06-28 16:40:38 +000018977/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018978 which can conflict with char $ac_func (); below.
18979 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018980 <limits.h> exists even on freestanding compilers. */
18981
18982#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018983# include <limits.h>
18984#else
18985# include <assert.h>
18986#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018987
18988#undef $ac_func
18989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018990/* Override any GCC internal prototype to avoid an error.
18991 Use char because int might match the return type of a GCC
18992 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018993#ifdef __cplusplus
18994extern "C"
18995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018996char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018997/* The GNU C library defines this for functions which it implements
18998 to always fail with ENOSYS. Some functions are actually named
18999 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019000#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019001choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019002#endif
19003
Skip Montanaro6dead952003-09-25 14:50:04 +000019004int
19005main ()
19006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019007return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019008 ;
19009 return 0;
19010}
19011_ACEOF
19012rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019013if { (ac_try="$ac_link"
19014case "(($ac_try" in
19015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19016 *) ac_try_echo=$ac_try;;
19017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019019 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019021 grep -v '^ *+' conftest.er1 >conftest.err
19022 rm -f conftest.er1
19023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019025 (exit $ac_status); } && {
19026 test -z "$ac_c_werror_flag" ||
19027 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019028 } && test -s conftest$ac_exeext &&
19029 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019030 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019031else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019033sed 's/^/| /' conftest.$ac_ext >&5
19034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019035 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019037
19038rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019039 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019040fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019041ac_res=`eval echo '${'$as_ac_var'}'`
19042 { echo "$as_me:$LINENO: result: $ac_res" >&5
19043echo "${ECHO_T}$ac_res" >&6; }
19044if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019045 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019046#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019047_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019048
Fred Drake8cef4cf2000-06-28 16:40:38 +000019049else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019050 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19051echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019052if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019053 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019054else
Martin v. Löwis11437992002-04-12 09:54:03 +000019055 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019056LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019058/* confdefs.h. */
19059_ACEOF
19060cat confdefs.h >>conftest.$ac_ext
19061cat >>conftest.$ac_ext <<_ACEOF
19062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019064/* Override any GCC internal prototype to avoid an error.
19065 Use char because int might match the return type of a GCC
19066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019067#ifdef __cplusplus
19068extern "C"
19069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019070char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019071int
19072main ()
19073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019074return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019075 ;
19076 return 0;
19077}
19078_ACEOF
19079rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019080if { (ac_try="$ac_link"
19081case "(($ac_try" in
19082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19083 *) ac_try_echo=$ac_try;;
19084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019086 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019088 grep -v '^ *+' conftest.er1 >conftest.err
19089 rm -f conftest.er1
19090 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019092 (exit $ac_status); } && {
19093 test -z "$ac_c_werror_flag" ||
19094 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019095 } && test -s conftest$ac_exeext &&
19096 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019097 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019100sed 's/^/| /' conftest.$ac_ext >&5
19101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019102 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019104
19105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019107LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019108fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019109{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19110echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19111if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019112 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019113#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019114_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019115 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019116else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019117 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19118echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019119if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019120 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019121else
19122 ac_check_lib_save_LIBS=$LIBS
19123LIBS="-lbsd $LIBS"
19124cat >conftest.$ac_ext <<_ACEOF
19125/* confdefs.h. */
19126_ACEOF
19127cat confdefs.h >>conftest.$ac_ext
19128cat >>conftest.$ac_ext <<_ACEOF
19129/* end confdefs.h. */
19130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019131/* Override any GCC internal prototype to avoid an error.
19132 Use char because int might match the return type of a GCC
19133 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019134#ifdef __cplusplus
19135extern "C"
19136#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019137char forkpty ();
19138int
19139main ()
19140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019141return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019142 ;
19143 return 0;
19144}
19145_ACEOF
19146rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019147if { (ac_try="$ac_link"
19148case "(($ac_try" in
19149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19150 *) ac_try_echo=$ac_try;;
19151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019153 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019154 ac_status=$?
19155 grep -v '^ *+' conftest.er1 >conftest.err
19156 rm -f conftest.er1
19157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019159 (exit $ac_status); } && {
19160 test -z "$ac_c_werror_flag" ||
19161 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019162 } && test -s conftest$ac_exeext &&
19163 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019164 ac_cv_lib_bsd_forkpty=yes
19165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019166 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019167sed 's/^/| /' conftest.$ac_ext >&5
19168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019169 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019171
19172rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019173 conftest$ac_exeext conftest.$ac_ext
19174LIBS=$ac_check_lib_save_LIBS
19175fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019176{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19177echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19178if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019179 cat >>confdefs.h <<\_ACEOF
19180#define HAVE_FORKPTY 1
19181_ACEOF
19182 LIBS="$LIBS -lbsd"
19183fi
19184
19185
19186fi
19187
Fred Drake8cef4cf2000-06-28 16:40:38 +000019188
19189fi
19190done
19191
Jack Jansendd19cf82001-12-06 22:36:17 +000019192
Christian Heimesb186d002008-03-18 15:15:01 +000019193# Stuff for expat.
19194
19195for ac_func in memmove
19196do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019197as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19198{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19199echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019200if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019201 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019202else
19203 cat >conftest.$ac_ext <<_ACEOF
19204/* confdefs.h. */
19205_ACEOF
19206cat confdefs.h >>conftest.$ac_ext
19207cat >>conftest.$ac_ext <<_ACEOF
19208/* end confdefs.h. */
19209/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19210 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19211#define $ac_func innocuous_$ac_func
19212
19213/* System header to define __stub macros and hopefully few prototypes,
19214 which can conflict with char $ac_func (); below.
19215 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19216 <limits.h> exists even on freestanding compilers. */
19217
19218#ifdef __STDC__
19219# include <limits.h>
19220#else
19221# include <assert.h>
19222#endif
19223
19224#undef $ac_func
19225
19226/* Override any GCC internal prototype to avoid an error.
19227 Use char because int might match the return type of a GCC
19228 builtin and then its argument prototype would still apply. */
19229#ifdef __cplusplus
19230extern "C"
19231#endif
19232char $ac_func ();
19233/* The GNU C library defines this for functions which it implements
19234 to always fail with ENOSYS. Some functions are actually named
19235 something starting with __ and the normal name is an alias. */
19236#if defined __stub_$ac_func || defined __stub___$ac_func
19237choke me
19238#endif
19239
19240int
19241main ()
19242{
19243return $ac_func ();
19244 ;
19245 return 0;
19246}
19247_ACEOF
19248rm -f conftest.$ac_objext conftest$ac_exeext
19249if { (ac_try="$ac_link"
19250case "(($ac_try" in
19251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19252 *) ac_try_echo=$ac_try;;
19253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019255 (eval "$ac_link") 2>conftest.er1
19256 ac_status=$?
19257 grep -v '^ *+' conftest.er1 >conftest.err
19258 rm -f conftest.er1
19259 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019261 (exit $ac_status); } && {
19262 test -z "$ac_c_werror_flag" ||
19263 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019264 } && test -s conftest$ac_exeext &&
19265 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019266 eval "$as_ac_var=yes"
19267else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019268 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019269sed 's/^/| /' conftest.$ac_ext >&5
19270
19271 eval "$as_ac_var=no"
19272fi
19273
19274rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19275 conftest$ac_exeext conftest.$ac_ext
19276fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019277ac_res=`eval echo '${'$as_ac_var'}'`
19278 { echo "$as_me:$LINENO: result: $ac_res" >&5
19279echo "${ECHO_T}$ac_res" >&6; }
19280if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019281 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019282#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019283_ACEOF
19284
19285fi
19286done
19287
19288
Michael W. Hudson54241132001-12-07 15:38:26 +000019289# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019290
19291
19292
19293
19294
19295
Fred Drake8cef4cf2000-06-28 16:40:38 +000019296for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19297do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019298as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19299{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19300echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019301if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019303else
Martin v. Löwis11437992002-04-12 09:54:03 +000019304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019305/* confdefs.h. */
19306_ACEOF
19307cat confdefs.h >>conftest.$ac_ext
19308cat >>conftest.$ac_ext <<_ACEOF
19309/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019310/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19311 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19312#define $ac_func innocuous_$ac_func
19313
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019314/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019315 which can conflict with char $ac_func (); below.
19316 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019317 <limits.h> exists even on freestanding compilers. */
19318
19319#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019320# include <limits.h>
19321#else
19322# include <assert.h>
19323#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019324
19325#undef $ac_func
19326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019327/* Override any GCC internal prototype to avoid an error.
19328 Use char because int might match the return type of a GCC
19329 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019330#ifdef __cplusplus
19331extern "C"
19332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019333char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019334/* The GNU C library defines this for functions which it implements
19335 to always fail with ENOSYS. Some functions are actually named
19336 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019337#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019338choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019339#endif
19340
Skip Montanaro6dead952003-09-25 14:50:04 +000019341int
19342main ()
19343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019344return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019345 ;
19346 return 0;
19347}
19348_ACEOF
19349rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019350if { (ac_try="$ac_link"
19351case "(($ac_try" in
19352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19353 *) ac_try_echo=$ac_try;;
19354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019356 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019358 grep -v '^ *+' conftest.er1 >conftest.err
19359 rm -f conftest.er1
19360 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019362 (exit $ac_status); } && {
19363 test -z "$ac_c_werror_flag" ||
19364 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019365 } && test -s conftest$ac_exeext &&
19366 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019367 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019370sed 's/^/| /' conftest.$ac_ext >&5
19371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019372 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019374
19375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019376 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019377fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019378ac_res=`eval echo '${'$as_ac_var'}'`
19379 { echo "$as_me:$LINENO: result: $ac_res" >&5
19380echo "${ECHO_T}$ac_res" >&6; }
19381if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019382 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019383#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019384_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019385
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019386fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019387done
19388
Michael W. Hudson54241132001-12-07 15:38:26 +000019389
Martin v. Löwis11437992002-04-12 09:54:03 +000019390
19391
19392
Christian Heimesb186d002008-03-18 15:15:01 +000019393for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019394do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019395as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19396{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19397echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019398if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019399 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019400else
Martin v. Löwis11437992002-04-12 09:54:03 +000019401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019402/* confdefs.h. */
19403_ACEOF
19404cat confdefs.h >>conftest.$ac_ext
19405cat >>conftest.$ac_ext <<_ACEOF
19406/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019407/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19408 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19409#define $ac_func innocuous_$ac_func
19410
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019411/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019412 which can conflict with char $ac_func (); below.
19413 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019414 <limits.h> exists even on freestanding compilers. */
19415
19416#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019417# include <limits.h>
19418#else
19419# include <assert.h>
19420#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019421
19422#undef $ac_func
19423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019424/* Override any GCC internal prototype to avoid an error.
19425 Use char because int might match the return type of a GCC
19426 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019427#ifdef __cplusplus
19428extern "C"
19429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019430char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019431/* The GNU C library defines this for functions which it implements
19432 to always fail with ENOSYS. Some functions are actually named
19433 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019434#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019435choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019436#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019437
Skip Montanaro6dead952003-09-25 14:50:04 +000019438int
19439main ()
19440{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019441return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019442 ;
19443 return 0;
19444}
19445_ACEOF
19446rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019447if { (ac_try="$ac_link"
19448case "(($ac_try" in
19449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19450 *) ac_try_echo=$ac_try;;
19451esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019453 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019455 grep -v '^ *+' conftest.er1 >conftest.err
19456 rm -f conftest.er1
19457 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019459 (exit $ac_status); } && {
19460 test -z "$ac_c_werror_flag" ||
19461 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019462 } && test -s conftest$ac_exeext &&
19463 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019464 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019467sed 's/^/| /' conftest.$ac_ext >&5
19468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019469 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019471
19472rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019473 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019474fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019475ac_res=`eval echo '${'$as_ac_var'}'`
19476 { echo "$as_me:$LINENO: result: $ac_res" >&5
19477echo "${ECHO_T}$ac_res" >&6; }
19478if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019479 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019480#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019481_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019482
Martin v. Löwis1142de32002-03-29 16:28:31 +000019483else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019484 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019485 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019486 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19487 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019488esac
19489
Martin v. Löwis1142de32002-03-29 16:28:31 +000019490fi
19491done
19492
19493
Martin v. Löwis11437992002-04-12 09:54:03 +000019494
Martin v. Löwis1142de32002-03-29 16:28:31 +000019495for ac_func in getpgrp
19496do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019497as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19498{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19499echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019500if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019501 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019502else
Martin v. Löwis11437992002-04-12 09:54:03 +000019503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019504/* confdefs.h. */
19505_ACEOF
19506cat confdefs.h >>conftest.$ac_ext
19507cat >>conftest.$ac_ext <<_ACEOF
19508/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019509/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19510 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19511#define $ac_func innocuous_$ac_func
19512
Martin v. Löwis1142de32002-03-29 16:28:31 +000019513/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019514 which can conflict with char $ac_func (); below.
19515 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019516 <limits.h> exists even on freestanding compilers. */
19517
19518#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019519# include <limits.h>
19520#else
19521# include <assert.h>
19522#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019523
19524#undef $ac_func
19525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019526/* Override any GCC internal prototype to avoid an error.
19527 Use char because int might match the return type of a GCC
19528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019529#ifdef __cplusplus
19530extern "C"
19531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019532char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019533/* The GNU C library defines this for functions which it implements
19534 to always fail with ENOSYS. Some functions are actually named
19535 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019536#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019537choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019538#endif
19539
Skip Montanaro6dead952003-09-25 14:50:04 +000019540int
19541main ()
19542{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019543return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019544 ;
19545 return 0;
19546}
19547_ACEOF
19548rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019549if { (ac_try="$ac_link"
19550case "(($ac_try" in
19551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19552 *) ac_try_echo=$ac_try;;
19553esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019555 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019557 grep -v '^ *+' conftest.er1 >conftest.err
19558 rm -f conftest.er1
19559 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019561 (exit $ac_status); } && {
19562 test -z "$ac_c_werror_flag" ||
19563 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019564 } && test -s conftest$ac_exeext &&
19565 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019566 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019567else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019569sed 's/^/| /' conftest.$ac_ext >&5
19570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019571 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019573
19574rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019575 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019576fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019577ac_res=`eval echo '${'$as_ac_var'}'`
19578 { echo "$as_me:$LINENO: result: $ac_res" >&5
19579echo "${ECHO_T}$ac_res" >&6; }
19580if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019581 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019582#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019583_ACEOF
19584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019585/* confdefs.h. */
19586_ACEOF
19587cat confdefs.h >>conftest.$ac_ext
19588cat >>conftest.$ac_ext <<_ACEOF
19589/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019590#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019591int
19592main ()
19593{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019594getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019595 ;
19596 return 0;
19597}
19598_ACEOF
19599rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019600if { (ac_try="$ac_compile"
19601case "(($ac_try" in
19602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19603 *) ac_try_echo=$ac_try;;
19604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019606 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019608 grep -v '^ *+' conftest.er1 >conftest.err
19609 rm -f conftest.er1
19610 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019612 (exit $ac_status); } && {
19613 test -z "$ac_c_werror_flag" ||
19614 test ! -s conftest.err
19615 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019616
19617cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019618#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019619_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019620
Martin v. Löwis11437992002-04-12 09:54:03 +000019621
Guido van Rossumf78abae1997-01-21 22:02:36 +000019622else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019624sed 's/^/| /' conftest.$ac_ext >&5
19625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019626
Guido van Rossum627b2d71993-12-24 10:39:16 +000019627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019628
19629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019630
Guido van Rossum627b2d71993-12-24 10:39:16 +000019631fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019632done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019633
Jack Jansen150753c2003-03-29 22:07:47 +000019634
19635for ac_func in setpgrp
19636do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019637as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19638{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19639echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019640if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019642else
Martin v. Löwis11437992002-04-12 09:54:03 +000019643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019644/* confdefs.h. */
19645_ACEOF
19646cat confdefs.h >>conftest.$ac_ext
19647cat >>conftest.$ac_ext <<_ACEOF
19648/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019649/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19650 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19651#define $ac_func innocuous_$ac_func
19652
Jack Jansen150753c2003-03-29 22:07:47 +000019653/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019654 which can conflict with char $ac_func (); below.
19655 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019656 <limits.h> exists even on freestanding compilers. */
19657
19658#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019659# include <limits.h>
19660#else
19661# include <assert.h>
19662#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019663
19664#undef $ac_func
19665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019666/* Override any GCC internal prototype to avoid an error.
19667 Use char because int might match the return type of a GCC
19668 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019669#ifdef __cplusplus
19670extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019671#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019672char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019673/* The GNU C library defines this for functions which it implements
19674 to always fail with ENOSYS. Some functions are actually named
19675 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019676#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019677choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019678#endif
19679
Skip Montanaro6dead952003-09-25 14:50:04 +000019680int
19681main ()
19682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019683return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019684 ;
19685 return 0;
19686}
19687_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019688rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019689if { (ac_try="$ac_link"
19690case "(($ac_try" in
19691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19692 *) ac_try_echo=$ac_try;;
19693esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019695 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019697 grep -v '^ *+' conftest.er1 >conftest.err
19698 rm -f conftest.er1
19699 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019701 (exit $ac_status); } && {
19702 test -z "$ac_c_werror_flag" ||
19703 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019704 } && test -s conftest$ac_exeext &&
19705 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019706 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019707else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019709sed 's/^/| /' conftest.$ac_ext >&5
19710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019711 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019713
19714rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019715 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019716fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019717ac_res=`eval echo '${'$as_ac_var'}'`
19718 { echo "$as_me:$LINENO: result: $ac_res" >&5
19719echo "${ECHO_T}$ac_res" >&6; }
19720if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019721 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019722#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019723_ACEOF
19724 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019725/* confdefs.h. */
19726_ACEOF
19727cat confdefs.h >>conftest.$ac_ext
19728cat >>conftest.$ac_ext <<_ACEOF
19729/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019730#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019731int
19732main ()
19733{
19734setpgrp(0,0);
19735 ;
19736 return 0;
19737}
19738_ACEOF
19739rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019740if { (ac_try="$ac_compile"
19741case "(($ac_try" in
19742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19743 *) ac_try_echo=$ac_try;;
19744esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019746 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019748 grep -v '^ *+' conftest.er1 >conftest.err
19749 rm -f conftest.er1
19750 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019752 (exit $ac_status); } && {
19753 test -z "$ac_c_werror_flag" ||
19754 test ! -s conftest.err
19755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019756
19757cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019758#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019759_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019760
Jack Jansen150753c2003-03-29 22:07:47 +000019761
19762else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019764sed 's/^/| /' conftest.$ac_ext >&5
19765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019766
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019768
19769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019770
19771fi
19772done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019773
Martin v. Löwis11437992002-04-12 09:54:03 +000019774
Thomas Wouters3a584202000-08-05 23:28:51 +000019775for ac_func in gettimeofday
19776do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019777as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19778{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19779echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019780if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019782else
Martin v. Löwis11437992002-04-12 09:54:03 +000019783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019784/* confdefs.h. */
19785_ACEOF
19786cat confdefs.h >>conftest.$ac_ext
19787cat >>conftest.$ac_ext <<_ACEOF
19788/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019789/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19790 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19791#define $ac_func innocuous_$ac_func
19792
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019793/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019794 which can conflict with char $ac_func (); below.
19795 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019796 <limits.h> exists even on freestanding compilers. */
19797
19798#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019799# include <limits.h>
19800#else
19801# include <assert.h>
19802#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019803
19804#undef $ac_func
19805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019806/* Override any GCC internal prototype to avoid an error.
19807 Use char because int might match the return type of a GCC
19808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019809#ifdef __cplusplus
19810extern "C"
19811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019812char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019813/* The GNU C library defines this for functions which it implements
19814 to always fail with ENOSYS. Some functions are actually named
19815 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019816#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019817choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019818#endif
19819
Skip Montanaro6dead952003-09-25 14:50:04 +000019820int
19821main ()
19822{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019823return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019824 ;
19825 return 0;
19826}
19827_ACEOF
19828rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019829if { (ac_try="$ac_link"
19830case "(($ac_try" in
19831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19832 *) ac_try_echo=$ac_try;;
19833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019835 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019837 grep -v '^ *+' conftest.er1 >conftest.err
19838 rm -f conftest.er1
19839 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019841 (exit $ac_status); } && {
19842 test -z "$ac_c_werror_flag" ||
19843 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019844 } && test -s conftest$ac_exeext &&
19845 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019846 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019849sed 's/^/| /' conftest.$ac_ext >&5
19850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019851 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019853
19854rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019855 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019856fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019857ac_res=`eval echo '${'$as_ac_var'}'`
19858 { echo "$as_me:$LINENO: result: $ac_res" >&5
19859echo "${ECHO_T}$ac_res" >&6; }
19860if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019861 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019862#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019863_ACEOF
19864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019865/* confdefs.h. */
19866_ACEOF
19867cat confdefs.h >>conftest.$ac_ext
19868cat >>conftest.$ac_ext <<_ACEOF
19869/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019870#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019871int
19872main ()
19873{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019874gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019875 ;
19876 return 0;
19877}
19878_ACEOF
19879rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019880if { (ac_try="$ac_compile"
19881case "(($ac_try" in
19882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19883 *) ac_try_echo=$ac_try;;
19884esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019888 grep -v '^ *+' conftest.er1 >conftest.err
19889 rm -f conftest.er1
19890 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019892 (exit $ac_status); } && {
19893 test -z "$ac_c_werror_flag" ||
19894 test ! -s conftest.err
19895 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019896 :
19897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019899sed 's/^/| /' conftest.$ac_ext >&5
19900
Martin v. Löwis11437992002-04-12 09:54:03 +000019901
19902cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019903#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019904_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019905
Martin v. Löwis11437992002-04-12 09:54:03 +000019906
Guido van Rossum627b2d71993-12-24 10:39:16 +000019907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019908
19909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019910
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019911fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019912done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019913
Michael W. Hudson54241132001-12-07 15:38:26 +000019914
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019915{ echo "$as_me:$LINENO: checking for major" >&5
19916echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019918/* confdefs.h. */
19919_ACEOF
19920cat confdefs.h >>conftest.$ac_ext
19921cat >>conftest.$ac_ext <<_ACEOF
19922/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019923
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019924#if defined(MAJOR_IN_MKDEV)
19925#include <sys/mkdev.h>
19926#elif defined(MAJOR_IN_SYSMACROS)
19927#include <sys/sysmacros.h>
19928#else
19929#include <sys/types.h>
19930#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019931
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019932int
19933main ()
19934{
19935
19936 makedev(major(0),minor(0));
19937
19938 ;
19939 return 0;
19940}
19941_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019942rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019943if { (ac_try="$ac_link"
19944case "(($ac_try" in
19945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19946 *) ac_try_echo=$ac_try;;
19947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019949 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019951 grep -v '^ *+' conftest.er1 >conftest.err
19952 rm -f conftest.er1
19953 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019955 (exit $ac_status); } && {
19956 test -z "$ac_c_werror_flag" ||
19957 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019958 } && test -s conftest$ac_exeext &&
19959 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019960
19961
19962cat >>confdefs.h <<\_ACEOF
19963#define HAVE_DEVICE_MACROS 1
19964_ACEOF
19965
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019966 { echo "$as_me:$LINENO: result: yes" >&5
19967echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019968
19969else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019971sed 's/^/| /' conftest.$ac_ext >&5
19972
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019973
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019974 { echo "$as_me:$LINENO: result: no" >&5
19975echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019976
19977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019978
19979rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019980 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019981
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019982# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019983# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019984{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19985echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019986cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019987/* confdefs.h. */
19988_ACEOF
19989cat confdefs.h >>conftest.$ac_ext
19990cat >>conftest.$ac_ext <<_ACEOF
19991/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019992
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019993#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019994#include <sys/socket.h>
19995#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019996#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019997
Martin v. Löwis11437992002-04-12 09:54:03 +000019998int
19999main ()
20000{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020001getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020002 ;
20003 return 0;
20004}
20005_ACEOF
20006rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020007if { (ac_try="$ac_link"
20008case "(($ac_try" in
20009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20010 *) ac_try_echo=$ac_try;;
20011esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020013 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020015 grep -v '^ *+' conftest.er1 >conftest.err
20016 rm -f conftest.er1
20017 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020019 (exit $ac_status); } && {
20020 test -z "$ac_c_werror_flag" ||
20021 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020022 } && test -s conftest$ac_exeext &&
20023 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020024 have_getaddrinfo=yes
20025else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020026 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020027sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020028
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020029 have_getaddrinfo=no
20030fi
20031
20032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20033 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020034{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20035echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020036if test $have_getaddrinfo = yes
20037then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020038 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20039echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020040 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020041 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020042else
20043 if test "$cross_compiling" = yes; then
20044 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020045else
Martin v. Löwis11437992002-04-12 09:54:03 +000020046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020047/* confdefs.h. */
20048_ACEOF
20049cat confdefs.h >>conftest.$ac_ext
20050cat >>conftest.$ac_ext <<_ACEOF
20051/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020052
20053#include <sys/types.h>
20054#include <netdb.h>
20055#include <string.h>
20056#include <sys/socket.h>
20057#include <netinet/in.h>
20058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020059int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020060{
20061 int passive, gaierr, inet4 = 0, inet6 = 0;
20062 struct addrinfo hints, *ai, *aitop;
20063 char straddr[INET6_ADDRSTRLEN], strport[16];
20064
20065 for (passive = 0; passive <= 1; passive++) {
20066 memset(&hints, 0, sizeof(hints));
20067 hints.ai_family = AF_UNSPEC;
20068 hints.ai_flags = passive ? AI_PASSIVE : 0;
20069 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020070 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020071 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20072 (void)gai_strerror(gaierr);
20073 goto bad;
20074 }
20075 for (ai = aitop; ai; ai = ai->ai_next) {
20076 if (ai->ai_addr == NULL ||
20077 ai->ai_addrlen == 0 ||
20078 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20079 straddr, sizeof(straddr), strport, sizeof(strport),
20080 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20081 goto bad;
20082 }
20083 switch (ai->ai_family) {
20084 case AF_INET:
20085 if (strcmp(strport, "54321") != 0) {
20086 goto bad;
20087 }
20088 if (passive) {
20089 if (strcmp(straddr, "0.0.0.0") != 0) {
20090 goto bad;
20091 }
20092 } else {
20093 if (strcmp(straddr, "127.0.0.1") != 0) {
20094 goto bad;
20095 }
20096 }
20097 inet4++;
20098 break;
20099 case AF_INET6:
20100 if (strcmp(strport, "54321") != 0) {
20101 goto bad;
20102 }
20103 if (passive) {
20104 if (strcmp(straddr, "::") != 0) {
20105 goto bad;
20106 }
20107 } else {
20108 if (strcmp(straddr, "::1") != 0) {
20109 goto bad;
20110 }
20111 }
20112 inet6++;
20113 break;
20114 case AF_UNSPEC:
20115 goto bad;
20116 break;
20117 default:
20118 /* another family support? */
20119 break;
20120 }
20121 }
20122 }
20123
20124 if (!(inet4 == 0 || inet4 == 2))
20125 goto bad;
20126 if (!(inet6 == 0 || inet6 == 2))
20127 goto bad;
20128
20129 if (aitop)
20130 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020131 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020132
20133 bad:
20134 if (aitop)
20135 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020136 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020137}
20138
Martin v. Löwis11437992002-04-12 09:54:03 +000020139_ACEOF
20140rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020141if { (ac_try="$ac_link"
20142case "(($ac_try" in
20143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20144 *) ac_try_echo=$ac_try;;
20145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020147 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020148 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020150 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020151 { (case "(($ac_try" in
20152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20153 *) ac_try_echo=$ac_try;;
20154esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020156 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020157 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020159 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020160 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020162 echo "$as_me: program exited with status $ac_status" >&5
20163echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020164sed 's/^/| /' conftest.$ac_ext >&5
20165
Martin v. Löwis11437992002-04-12 09:54:03 +000020166( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020167ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020169rm -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 +000020170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020171
20172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020173fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020174
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020176
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020177if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20178then
20179 if test $ipv6 = yes
20180 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020181 echo 'Fatal: You must get working getaddrinfo() function.'
20182 echo ' or you can specify "--disable-ipv6"'.
20183 exit 1
20184 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020185else
Martin v. Löwis11437992002-04-12 09:54:03 +000020186
20187cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020188#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020189_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020190
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020192
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020193for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020194do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020195as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20196{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20197echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020198if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020199 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020200else
Martin v. Löwis11437992002-04-12 09:54:03 +000020201 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020202/* confdefs.h. */
20203_ACEOF
20204cat confdefs.h >>conftest.$ac_ext
20205cat >>conftest.$ac_ext <<_ACEOF
20206/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020207/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20208 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20209#define $ac_func innocuous_$ac_func
20210
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020211/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020212 which can conflict with char $ac_func (); below.
20213 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020214 <limits.h> exists even on freestanding compilers. */
20215
20216#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020217# include <limits.h>
20218#else
20219# include <assert.h>
20220#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020221
20222#undef $ac_func
20223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020224/* Override any GCC internal prototype to avoid an error.
20225 Use char because int might match the return type of a GCC
20226 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020227#ifdef __cplusplus
20228extern "C"
20229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020230char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020231/* The GNU C library defines this for functions which it implements
20232 to always fail with ENOSYS. Some functions are actually named
20233 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020234#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020235choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020236#endif
20237
Skip Montanaro6dead952003-09-25 14:50:04 +000020238int
20239main ()
20240{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020241return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020242 ;
20243 return 0;
20244}
20245_ACEOF
20246rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020247if { (ac_try="$ac_link"
20248case "(($ac_try" in
20249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20250 *) ac_try_echo=$ac_try;;
20251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020253 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020255 grep -v '^ *+' conftest.er1 >conftest.err
20256 rm -f conftest.er1
20257 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020259 (exit $ac_status); } && {
20260 test -z "$ac_c_werror_flag" ||
20261 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020262 } && test -s conftest$ac_exeext &&
20263 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020264 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020265else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020267sed 's/^/| /' conftest.$ac_ext >&5
20268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020269 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020271
20272rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020273 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020274fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020275ac_res=`eval echo '${'$as_ac_var'}'`
20276 { echo "$as_me:$LINENO: result: $ac_res" >&5
20277echo "${ECHO_T}$ac_res" >&6; }
20278if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020279 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020280#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020281_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020282
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020283fi
20284done
20285
Michael W. Hudson54241132001-12-07 15:38:26 +000020286
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020287# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020288{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20289echo $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 +000020290if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020292else
Martin v. Löwis11437992002-04-12 09:54:03 +000020293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020294/* confdefs.h. */
20295_ACEOF
20296cat confdefs.h >>conftest.$ac_ext
20297cat >>conftest.$ac_ext <<_ACEOF
20298/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020299#include <sys/types.h>
20300#include <sys/time.h>
20301#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020302
Martin v. Löwis11437992002-04-12 09:54:03 +000020303int
20304main ()
20305{
20306if ((struct tm *) 0)
20307return 0;
20308 ;
20309 return 0;
20310}
20311_ACEOF
20312rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020313if { (ac_try="$ac_compile"
20314case "(($ac_try" in
20315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20316 *) ac_try_echo=$ac_try;;
20317esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020321 grep -v '^ *+' conftest.er1 >conftest.err
20322 rm -f conftest.er1
20323 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020325 (exit $ac_status); } && {
20326 test -z "$ac_c_werror_flag" ||
20327 test ! -s conftest.err
20328 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020329 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020330else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020332sed 's/^/| /' conftest.$ac_ext >&5
20333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020334 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020336
20337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020338fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020339{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20340echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020341if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020342
20343cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020344#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020345_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020346
20347fi
20348
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020349{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20350echo $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 +000020351if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020352 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020353else
Martin v. Löwis11437992002-04-12 09:54:03 +000020354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020355/* confdefs.h. */
20356_ACEOF
20357cat confdefs.h >>conftest.$ac_ext
20358cat >>conftest.$ac_ext <<_ACEOF
20359/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020360#include <sys/types.h>
20361#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020362
Martin v. Löwis11437992002-04-12 09:54:03 +000020363int
20364main ()
20365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020366struct tm tm;
20367 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020368 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020369 ;
20370 return 0;
20371}
20372_ACEOF
20373rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020374if { (ac_try="$ac_compile"
20375case "(($ac_try" in
20376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20377 *) ac_try_echo=$ac_try;;
20378esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020380 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020382 grep -v '^ *+' conftest.er1 >conftest.err
20383 rm -f conftest.er1
20384 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020386 (exit $ac_status); } && {
20387 test -z "$ac_c_werror_flag" ||
20388 test ! -s conftest.err
20389 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020390 ac_cv_struct_tm=time.h
20391else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020393sed 's/^/| /' conftest.$ac_ext >&5
20394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020395 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020397
20398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020399fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020400{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20401echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020402if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020403
20404cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020405#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020406_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020407
20408fi
20409
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020410{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20411echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020412if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020413 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020414else
Martin v. Löwis11437992002-04-12 09:54:03 +000020415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020416/* confdefs.h. */
20417_ACEOF
20418cat confdefs.h >>conftest.$ac_ext
20419cat >>conftest.$ac_ext <<_ACEOF
20420/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020421#include <sys/types.h>
20422#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020423
20424
Martin v. Löwis11437992002-04-12 09:54:03 +000020425int
20426main ()
20427{
20428static struct tm ac_aggr;
20429if (ac_aggr.tm_zone)
20430return 0;
20431 ;
20432 return 0;
20433}
20434_ACEOF
20435rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020436if { (ac_try="$ac_compile"
20437case "(($ac_try" in
20438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20439 *) ac_try_echo=$ac_try;;
20440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020444 grep -v '^ *+' conftest.er1 >conftest.err
20445 rm -f conftest.er1
20446 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020448 (exit $ac_status); } && {
20449 test -z "$ac_c_werror_flag" ||
20450 test ! -s conftest.err
20451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020452 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020453else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020455sed 's/^/| /' conftest.$ac_ext >&5
20456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020458/* confdefs.h. */
20459_ACEOF
20460cat confdefs.h >>conftest.$ac_ext
20461cat >>conftest.$ac_ext <<_ACEOF
20462/* end confdefs.h. */
20463#include <sys/types.h>
20464#include <$ac_cv_struct_tm>
20465
20466
20467int
20468main ()
20469{
20470static struct tm ac_aggr;
20471if (sizeof ac_aggr.tm_zone)
20472return 0;
20473 ;
20474 return 0;
20475}
20476_ACEOF
20477rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020478if { (ac_try="$ac_compile"
20479case "(($ac_try" in
20480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20481 *) ac_try_echo=$ac_try;;
20482esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020484 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020486 grep -v '^ *+' conftest.er1 >conftest.err
20487 rm -f conftest.er1
20488 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020490 (exit $ac_status); } && {
20491 test -z "$ac_c_werror_flag" ||
20492 test ! -s conftest.err
20493 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020494 ac_cv_member_struct_tm_tm_zone=yes
20495else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020497sed 's/^/| /' conftest.$ac_ext >&5
20498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020499 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020501
20502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020504
20505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020506fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020507{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20508echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20509if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020510
20511cat >>confdefs.h <<_ACEOF
20512#define HAVE_STRUCT_TM_TM_ZONE 1
20513_ACEOF
20514
20515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020516fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020517
Martin v. Löwis11437992002-04-12 09:54:03 +000020518if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20519
20520cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020521#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020522_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020523
20524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020525 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20526echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020527if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020528 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020529else
20530 cat >conftest.$ac_ext <<_ACEOF
20531/* confdefs.h. */
20532_ACEOF
20533cat confdefs.h >>conftest.$ac_ext
20534cat >>conftest.$ac_ext <<_ACEOF
20535/* end confdefs.h. */
20536#include <time.h>
20537
20538int
20539main ()
20540{
20541#ifndef tzname
20542 (void) tzname;
20543#endif
20544
20545 ;
20546 return 0;
20547}
20548_ACEOF
20549rm -f conftest.$ac_objext
20550if { (ac_try="$ac_compile"
20551case "(($ac_try" in
20552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20553 *) ac_try_echo=$ac_try;;
20554esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020556 (eval "$ac_compile") 2>conftest.er1
20557 ac_status=$?
20558 grep -v '^ *+' conftest.er1 >conftest.err
20559 rm -f conftest.er1
20560 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020562 (exit $ac_status); } && {
20563 test -z "$ac_c_werror_flag" ||
20564 test ! -s conftest.err
20565 } && test -s conftest.$ac_objext; then
20566 ac_cv_have_decl_tzname=yes
20567else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020568 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020569sed 's/^/| /' conftest.$ac_ext >&5
20570
20571 ac_cv_have_decl_tzname=no
20572fi
20573
20574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20575fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020576{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20577echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20578if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020579
20580cat >>confdefs.h <<_ACEOF
20581#define HAVE_DECL_TZNAME 1
20582_ACEOF
20583
20584
20585else
20586 cat >>confdefs.h <<_ACEOF
20587#define HAVE_DECL_TZNAME 0
20588_ACEOF
20589
20590
20591fi
20592
20593
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020594 { echo "$as_me:$LINENO: checking for tzname" >&5
20595echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020596if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020597 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020598else
Martin v. Löwis11437992002-04-12 09:54:03 +000020599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020600/* confdefs.h. */
20601_ACEOF
20602cat confdefs.h >>conftest.$ac_ext
20603cat >>conftest.$ac_ext <<_ACEOF
20604/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020605#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020606#if !HAVE_DECL_TZNAME
20607extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020609
Martin v. Löwis11437992002-04-12 09:54:03 +000020610int
20611main ()
20612{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020613return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020614 ;
20615 return 0;
20616}
20617_ACEOF
20618rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020619if { (ac_try="$ac_link"
20620case "(($ac_try" in
20621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20622 *) ac_try_echo=$ac_try;;
20623esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020625 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020627 grep -v '^ *+' conftest.er1 >conftest.err
20628 rm -f conftest.er1
20629 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020631 (exit $ac_status); } && {
20632 test -z "$ac_c_werror_flag" ||
20633 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020634 } && test -s conftest$ac_exeext &&
20635 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020636 ac_cv_var_tzname=yes
20637else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020639sed 's/^/| /' conftest.$ac_ext >&5
20640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020641 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020643
20644rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020645 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020646fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020647{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20648echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020649 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020650
20651cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020652#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020653_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020654
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020655 fi
20656fi
20657
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020658{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20659echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020660if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020661 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020662else
20663 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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020669$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020670int
20671main ()
20672{
20673static struct stat ac_aggr;
20674if (ac_aggr.st_rdev)
20675return 0;
20676 ;
20677 return 0;
20678}
20679_ACEOF
20680rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020681if { (ac_try="$ac_compile"
20682case "(($ac_try" in
20683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20684 *) ac_try_echo=$ac_try;;
20685esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020689 grep -v '^ *+' conftest.er1 >conftest.err
20690 rm -f conftest.er1
20691 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020693 (exit $ac_status); } && {
20694 test -z "$ac_c_werror_flag" ||
20695 test ! -s conftest.err
20696 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020697 ac_cv_member_struct_stat_st_rdev=yes
20698else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020700sed 's/^/| /' conftest.$ac_ext >&5
20701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020703/* confdefs.h. */
20704_ACEOF
20705cat confdefs.h >>conftest.$ac_ext
20706cat >>conftest.$ac_ext <<_ACEOF
20707/* end confdefs.h. */
20708$ac_includes_default
20709int
20710main ()
20711{
20712static struct stat ac_aggr;
20713if (sizeof ac_aggr.st_rdev)
20714return 0;
20715 ;
20716 return 0;
20717}
20718_ACEOF
20719rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020720if { (ac_try="$ac_compile"
20721case "(($ac_try" in
20722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20723 *) ac_try_echo=$ac_try;;
20724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020726 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020728 grep -v '^ *+' conftest.er1 >conftest.err
20729 rm -f conftest.er1
20730 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020732 (exit $ac_status); } && {
20733 test -z "$ac_c_werror_flag" ||
20734 test ! -s conftest.err
20735 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020736 ac_cv_member_struct_stat_st_rdev=yes
20737else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020739sed 's/^/| /' conftest.$ac_ext >&5
20740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020741 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020743
20744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020746
20747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020748fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020749{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20750echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20751if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020752
20753cat >>confdefs.h <<_ACEOF
20754#define HAVE_STRUCT_STAT_ST_RDEV 1
20755_ACEOF
20756
20757
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020758fi
20759
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020760{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20761echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020762if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020763 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020764else
Martin v. Löwis11437992002-04-12 09:54:03 +000020765 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020766/* confdefs.h. */
20767_ACEOF
20768cat confdefs.h >>conftest.$ac_ext
20769cat >>conftest.$ac_ext <<_ACEOF
20770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020771$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020772int
20773main ()
20774{
20775static struct stat ac_aggr;
20776if (ac_aggr.st_blksize)
20777return 0;
20778 ;
20779 return 0;
20780}
20781_ACEOF
20782rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020783if { (ac_try="$ac_compile"
20784case "(($ac_try" in
20785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20786 *) ac_try_echo=$ac_try;;
20787esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020791 grep -v '^ *+' conftest.er1 >conftest.err
20792 rm -f conftest.er1
20793 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020795 (exit $ac_status); } && {
20796 test -z "$ac_c_werror_flag" ||
20797 test ! -s conftest.err
20798 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020799 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020800else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020802sed 's/^/| /' conftest.$ac_ext >&5
20803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020805/* confdefs.h. */
20806_ACEOF
20807cat confdefs.h >>conftest.$ac_ext
20808cat >>conftest.$ac_ext <<_ACEOF
20809/* end confdefs.h. */
20810$ac_includes_default
20811int
20812main ()
20813{
20814static struct stat ac_aggr;
20815if (sizeof ac_aggr.st_blksize)
20816return 0;
20817 ;
20818 return 0;
20819}
20820_ACEOF
20821rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020822if { (ac_try="$ac_compile"
20823case "(($ac_try" in
20824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20825 *) ac_try_echo=$ac_try;;
20826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020828 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020830 grep -v '^ *+' conftest.er1 >conftest.err
20831 rm -f conftest.er1
20832 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020834 (exit $ac_status); } && {
20835 test -z "$ac_c_werror_flag" ||
20836 test ! -s conftest.err
20837 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020838 ac_cv_member_struct_stat_st_blksize=yes
20839else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020841sed 's/^/| /' conftest.$ac_ext >&5
20842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020843 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020845
20846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020848
20849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020850fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020851{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20852echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20853if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020854
Martin v. Löwis11437992002-04-12 09:54:03 +000020855cat >>confdefs.h <<_ACEOF
20856#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20857_ACEOF
20858
20859
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020860fi
20861
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020862{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20863echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020864if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020865 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020866else
20867 cat >conftest.$ac_ext <<_ACEOF
20868/* confdefs.h. */
20869_ACEOF
20870cat confdefs.h >>conftest.$ac_ext
20871cat >>conftest.$ac_ext <<_ACEOF
20872/* end confdefs.h. */
20873$ac_includes_default
20874int
20875main ()
20876{
20877static struct stat ac_aggr;
20878if (ac_aggr.st_flags)
20879return 0;
20880 ;
20881 return 0;
20882}
20883_ACEOF
20884rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020885if { (ac_try="$ac_compile"
20886case "(($ac_try" in
20887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20888 *) ac_try_echo=$ac_try;;
20889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020891 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020892 ac_status=$?
20893 grep -v '^ *+' conftest.er1 >conftest.err
20894 rm -f conftest.er1
20895 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020897 (exit $ac_status); } && {
20898 test -z "$ac_c_werror_flag" ||
20899 test ! -s conftest.err
20900 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020901 ac_cv_member_struct_stat_st_flags=yes
20902else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020903 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020904sed 's/^/| /' conftest.$ac_ext >&5
20905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020906 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020907/* confdefs.h. */
20908_ACEOF
20909cat confdefs.h >>conftest.$ac_ext
20910cat >>conftest.$ac_ext <<_ACEOF
20911/* end confdefs.h. */
20912$ac_includes_default
20913int
20914main ()
20915{
20916static struct stat ac_aggr;
20917if (sizeof ac_aggr.st_flags)
20918return 0;
20919 ;
20920 return 0;
20921}
20922_ACEOF
20923rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020924if { (ac_try="$ac_compile"
20925case "(($ac_try" in
20926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20927 *) ac_try_echo=$ac_try;;
20928esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020930 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020931 ac_status=$?
20932 grep -v '^ *+' conftest.er1 >conftest.err
20933 rm -f conftest.er1
20934 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020936 (exit $ac_status); } && {
20937 test -z "$ac_c_werror_flag" ||
20938 test ! -s conftest.err
20939 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020940 ac_cv_member_struct_stat_st_flags=yes
20941else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020942 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020943sed 's/^/| /' conftest.$ac_ext >&5
20944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020945 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020947
20948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020950
20951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020952fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020953{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20954echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20955if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020956
20957cat >>confdefs.h <<_ACEOF
20958#define HAVE_STRUCT_STAT_ST_FLAGS 1
20959_ACEOF
20960
20961
20962fi
20963
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020964{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20965echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020966if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020967 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020968else
20969 cat >conftest.$ac_ext <<_ACEOF
20970/* confdefs.h. */
20971_ACEOF
20972cat confdefs.h >>conftest.$ac_ext
20973cat >>conftest.$ac_ext <<_ACEOF
20974/* end confdefs.h. */
20975$ac_includes_default
20976int
20977main ()
20978{
20979static struct stat ac_aggr;
20980if (ac_aggr.st_gen)
20981return 0;
20982 ;
20983 return 0;
20984}
20985_ACEOF
20986rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020987if { (ac_try="$ac_compile"
20988case "(($ac_try" in
20989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20990 *) ac_try_echo=$ac_try;;
20991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020994 ac_status=$?
20995 grep -v '^ *+' conftest.er1 >conftest.err
20996 rm -f conftest.er1
20997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020999 (exit $ac_status); } && {
21000 test -z "$ac_c_werror_flag" ||
21001 test ! -s conftest.err
21002 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021003 ac_cv_member_struct_stat_st_gen=yes
21004else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021005 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021006sed 's/^/| /' conftest.$ac_ext >&5
21007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021008 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021009/* confdefs.h. */
21010_ACEOF
21011cat confdefs.h >>conftest.$ac_ext
21012cat >>conftest.$ac_ext <<_ACEOF
21013/* end confdefs.h. */
21014$ac_includes_default
21015int
21016main ()
21017{
21018static struct stat ac_aggr;
21019if (sizeof ac_aggr.st_gen)
21020return 0;
21021 ;
21022 return 0;
21023}
21024_ACEOF
21025rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021026if { (ac_try="$ac_compile"
21027case "(($ac_try" in
21028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21029 *) ac_try_echo=$ac_try;;
21030esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021033 ac_status=$?
21034 grep -v '^ *+' conftest.er1 >conftest.err
21035 rm -f conftest.er1
21036 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021038 (exit $ac_status); } && {
21039 test -z "$ac_c_werror_flag" ||
21040 test ! -s conftest.err
21041 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021042 ac_cv_member_struct_stat_st_gen=yes
21043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021044 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021045sed 's/^/| /' conftest.$ac_ext >&5
21046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021047 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021049
21050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021052
21053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021054fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021055{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21056echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21057if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021058
21059cat >>confdefs.h <<_ACEOF
21060#define HAVE_STRUCT_STAT_ST_GEN 1
21061_ACEOF
21062
21063
21064fi
21065
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021066{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21067echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021068if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021069 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021070else
21071 cat >conftest.$ac_ext <<_ACEOF
21072/* confdefs.h. */
21073_ACEOF
21074cat confdefs.h >>conftest.$ac_ext
21075cat >>conftest.$ac_ext <<_ACEOF
21076/* end confdefs.h. */
21077$ac_includes_default
21078int
21079main ()
21080{
21081static struct stat ac_aggr;
21082if (ac_aggr.st_birthtime)
21083return 0;
21084 ;
21085 return 0;
21086}
21087_ACEOF
21088rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021089if { (ac_try="$ac_compile"
21090case "(($ac_try" in
21091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21092 *) ac_try_echo=$ac_try;;
21093esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021095 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021096 ac_status=$?
21097 grep -v '^ *+' conftest.er1 >conftest.err
21098 rm -f conftest.er1
21099 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021101 (exit $ac_status); } && {
21102 test -z "$ac_c_werror_flag" ||
21103 test ! -s conftest.err
21104 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021105 ac_cv_member_struct_stat_st_birthtime=yes
21106else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021107 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021108sed 's/^/| /' conftest.$ac_ext >&5
21109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021110 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021111/* confdefs.h. */
21112_ACEOF
21113cat confdefs.h >>conftest.$ac_ext
21114cat >>conftest.$ac_ext <<_ACEOF
21115/* end confdefs.h. */
21116$ac_includes_default
21117int
21118main ()
21119{
21120static struct stat ac_aggr;
21121if (sizeof ac_aggr.st_birthtime)
21122return 0;
21123 ;
21124 return 0;
21125}
21126_ACEOF
21127rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021128if { (ac_try="$ac_compile"
21129case "(($ac_try" in
21130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21131 *) ac_try_echo=$ac_try;;
21132esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021135 ac_status=$?
21136 grep -v '^ *+' conftest.er1 >conftest.err
21137 rm -f conftest.er1
21138 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021140 (exit $ac_status); } && {
21141 test -z "$ac_c_werror_flag" ||
21142 test ! -s conftest.err
21143 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021144 ac_cv_member_struct_stat_st_birthtime=yes
21145else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021146 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021147sed 's/^/| /' conftest.$ac_ext >&5
21148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021149 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021151
21152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021154
21155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021156fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021157{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21158echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21159if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021160
21161cat >>confdefs.h <<_ACEOF
21162#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21163_ACEOF
21164
21165
21166fi
21167
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021168{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21169echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021170if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021172else
Martin v. Löwis11437992002-04-12 09:54:03 +000021173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021174/* confdefs.h. */
21175_ACEOF
21176cat confdefs.h >>conftest.$ac_ext
21177cat >>conftest.$ac_ext <<_ACEOF
21178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021179$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021180int
21181main ()
21182{
21183static struct stat ac_aggr;
21184if (ac_aggr.st_blocks)
21185return 0;
21186 ;
21187 return 0;
21188}
21189_ACEOF
21190rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021191if { (ac_try="$ac_compile"
21192case "(($ac_try" in
21193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21194 *) ac_try_echo=$ac_try;;
21195esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021199 grep -v '^ *+' conftest.er1 >conftest.err
21200 rm -f conftest.er1
21201 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021203 (exit $ac_status); } && {
21204 test -z "$ac_c_werror_flag" ||
21205 test ! -s conftest.err
21206 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021207 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021208else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021210sed 's/^/| /' conftest.$ac_ext >&5
21211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021213/* confdefs.h. */
21214_ACEOF
21215cat confdefs.h >>conftest.$ac_ext
21216cat >>conftest.$ac_ext <<_ACEOF
21217/* end confdefs.h. */
21218$ac_includes_default
21219int
21220main ()
21221{
21222static struct stat ac_aggr;
21223if (sizeof ac_aggr.st_blocks)
21224return 0;
21225 ;
21226 return 0;
21227}
21228_ACEOF
21229rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021230if { (ac_try="$ac_compile"
21231case "(($ac_try" in
21232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21233 *) ac_try_echo=$ac_try;;
21234esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021236 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021238 grep -v '^ *+' conftest.er1 >conftest.err
21239 rm -f conftest.er1
21240 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021242 (exit $ac_status); } && {
21243 test -z "$ac_c_werror_flag" ||
21244 test ! -s conftest.err
21245 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021246 ac_cv_member_struct_stat_st_blocks=yes
21247else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021249sed 's/^/| /' conftest.$ac_ext >&5
21250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021251 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021253
21254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021256
21257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021258fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021259{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21260echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21261if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021262
Martin v. Löwis11437992002-04-12 09:54:03 +000021263cat >>confdefs.h <<_ACEOF
21264#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21265_ACEOF
21266
21267
21268cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021269#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021270_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021271
21272else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021273 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021274 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021275 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21276 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021277esac
21278
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021279fi
21280
Michael W. Hudson54241132001-12-07 15:38:26 +000021281
Martin v. Löwis11437992002-04-12 09:54:03 +000021282
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021283{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21284echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021285if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021286 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021287else
Martin v. Löwis11437992002-04-12 09:54:03 +000021288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021289/* confdefs.h. */
21290_ACEOF
21291cat confdefs.h >>conftest.$ac_ext
21292cat >>conftest.$ac_ext <<_ACEOF
21293/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021294#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021295int
21296main ()
21297{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021298return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021299 ;
21300 return 0;
21301}
21302_ACEOF
21303rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021304if { (ac_try="$ac_compile"
21305case "(($ac_try" in
21306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21307 *) ac_try_echo=$ac_try;;
21308esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021310 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021312 grep -v '^ *+' conftest.er1 >conftest.err
21313 rm -f conftest.er1
21314 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021316 (exit $ac_status); } && {
21317 test -z "$ac_c_werror_flag" ||
21318 test ! -s conftest.err
21319 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021320 ac_cv_header_time_altzone=yes
21321else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021323sed 's/^/| /' conftest.$ac_ext >&5
21324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021325 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021326fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21329fi
21330
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021331{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21332echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021333if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021334
21335cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021336#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021337_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021338
21339fi
21340
Guido van Rossumda88dad1995-01-26 00:46:29 +000021341was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021342{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21343echo $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 +000021344cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021345/* confdefs.h. */
21346_ACEOF
21347cat confdefs.h >>conftest.$ac_ext
21348cat >>conftest.$ac_ext <<_ACEOF
21349/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021350
21351#include <sys/types.h>
21352#include <sys/select.h>
21353#include <sys/time.h>
21354
Martin v. Löwis11437992002-04-12 09:54:03 +000021355int
21356main ()
21357{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021358;
Martin v. Löwis11437992002-04-12 09:54:03 +000021359 ;
21360 return 0;
21361}
21362_ACEOF
21363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021364if { (ac_try="$ac_compile"
21365case "(($ac_try" in
21366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21367 *) ac_try_echo=$ac_try;;
21368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021372 grep -v '^ *+' conftest.er1 >conftest.err
21373 rm -f conftest.er1
21374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021376 (exit $ac_status); } && {
21377 test -z "$ac_c_werror_flag" ||
21378 test ! -s conftest.err
21379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021380
21381
21382cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021383#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021384_ACEOF
21385
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021386 was_it_defined=yes
21387
Guido van Rossumf78abae1997-01-21 22:02:36 +000021388else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021390sed 's/^/| /' conftest.$ac_ext >&5
21391
Thomas Wouters477c8d52006-05-27 19:21:47 +000021392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021393fi
21394
21395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021396{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21397echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021398
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021399{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21400echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021401if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021402 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021403else
Martin v. Löwis11437992002-04-12 09:54:03 +000021404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021405/* confdefs.h. */
21406_ACEOF
21407cat confdefs.h >>conftest.$ac_ext
21408cat >>conftest.$ac_ext <<_ACEOF
21409/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021410
21411# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021412int
21413main ()
21414{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021415struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021416 ;
21417 return 0;
21418}
21419_ACEOF
21420rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021421if { (ac_try="$ac_compile"
21422case "(($ac_try" in
21423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21424 *) ac_try_echo=$ac_try;;
21425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021429 grep -v '^ *+' conftest.er1 >conftest.err
21430 rm -f conftest.er1
21431 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021433 (exit $ac_status); } && {
21434 test -z "$ac_c_werror_flag" ||
21435 test ! -s conftest.err
21436 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021437 ac_cv_struct_addrinfo=yes
21438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021440sed 's/^/| /' conftest.$ac_ext >&5
21441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021442 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021443fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21446fi
21447
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021448{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21449echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021450if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021451
21452cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021453#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021454_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021455
21456fi
21457
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021458{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21459echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021460if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021461 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021462else
Martin v. Löwis11437992002-04-12 09:54:03 +000021463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021464/* confdefs.h. */
21465_ACEOF
21466cat confdefs.h >>conftest.$ac_ext
21467cat >>conftest.$ac_ext <<_ACEOF
21468/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021469
21470# include <sys/types.h>
21471# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021472int
21473main ()
21474{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021475struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021476 ;
21477 return 0;
21478}
21479_ACEOF
21480rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021481if { (ac_try="$ac_compile"
21482case "(($ac_try" in
21483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21484 *) ac_try_echo=$ac_try;;
21485esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021489 grep -v '^ *+' conftest.er1 >conftest.err
21490 rm -f conftest.er1
21491 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021493 (exit $ac_status); } && {
21494 test -z "$ac_c_werror_flag" ||
21495 test ! -s conftest.err
21496 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021497 ac_cv_struct_sockaddr_storage=yes
21498else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021500sed 's/^/| /' conftest.$ac_ext >&5
21501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021502 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021503fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21506fi
21507
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021508{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21509echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021510if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021511
21512cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021513#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021514_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021515
21516fi
21517
Guido van Rossum627b2d71993-12-24 10:39:16 +000021518# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021519
Michael W. Hudson54241132001-12-07 15:38:26 +000021520
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021521{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21522echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021523if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021524 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021525else
Martin v. Löwis11437992002-04-12 09:54:03 +000021526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021527/* confdefs.h. */
21528_ACEOF
21529cat confdefs.h >>conftest.$ac_ext
21530cat >>conftest.$ac_ext <<_ACEOF
21531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021532$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021533int
21534main ()
21535{
21536static int test_array [1 - 2 * !(((char) -1) < 0)];
21537test_array [0] = 0
21538
21539 ;
21540 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021541}
Martin v. Löwis11437992002-04-12 09:54:03 +000021542_ACEOF
21543rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021544if { (ac_try="$ac_compile"
21545case "(($ac_try" in
21546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21547 *) ac_try_echo=$ac_try;;
21548esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021552 grep -v '^ *+' conftest.er1 >conftest.err
21553 rm -f conftest.er1
21554 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021556 (exit $ac_status); } && {
21557 test -z "$ac_c_werror_flag" ||
21558 test ! -s conftest.err
21559 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021560 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021563sed 's/^/| /' conftest.$ac_ext >&5
21564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021565 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021567
21568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021569fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021570{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21571echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021572if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021573 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021574#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021575_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021576
21577fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021578
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021579{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21580echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021581if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021582 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021583else
21584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021585/* confdefs.h. */
21586_ACEOF
21587cat confdefs.h >>conftest.$ac_ext
21588cat >>conftest.$ac_ext <<_ACEOF
21589/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021590
Martin v. Löwis11437992002-04-12 09:54:03 +000021591int
21592main ()
21593{
21594/* FIXME: Include the comments suggested by Paul. */
21595#ifndef __cplusplus
21596 /* Ultrix mips cc rejects this. */
21597 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021598 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021599 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021600 char const *const *pcpcc;
21601 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021602 /* NEC SVR4.0.2 mips cc rejects this. */
21603 struct point {int x, y;};
21604 static struct point const zero = {0,0};
21605 /* AIX XL C 1.02.0.0 rejects this.
21606 It does not let you subtract one const X* pointer from another in
21607 an arm of an if-expression whose if-part is not a constant
21608 expression */
21609 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021610 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021611 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021612 ++pcpcc;
21613 ppc = (char**) pcpcc;
21614 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021615 { /* SCO 3.2v4 cc rejects this. */
21616 char *t;
21617 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021618
Martin v. Löwis11437992002-04-12 09:54:03 +000021619 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021620 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021621 }
21622 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21623 int x[] = {25, 17};
21624 const int *foo = &x[0];
21625 ++foo;
21626 }
21627 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21628 typedef const int *iptr;
21629 iptr p = 0;
21630 ++p;
21631 }
21632 { /* AIX XL C 1.02.0.0 rejects this saying
21633 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21634 struct s { int j; const int *ap[3]; };
21635 struct s *b; b->j = 5;
21636 }
21637 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21638 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021639 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021640 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021641 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021642#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021643
Martin v. Löwis11437992002-04-12 09:54:03 +000021644 ;
21645 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021646}
Martin v. Löwis11437992002-04-12 09:54:03 +000021647_ACEOF
21648rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021649if { (ac_try="$ac_compile"
21650case "(($ac_try" in
21651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21652 *) ac_try_echo=$ac_try;;
21653esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021657 grep -v '^ *+' conftest.er1 >conftest.err
21658 rm -f conftest.er1
21659 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021661 (exit $ac_status); } && {
21662 test -z "$ac_c_werror_flag" ||
21663 test ! -s conftest.err
21664 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021665 ac_cv_c_const=yes
21666else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021668sed 's/^/| /' conftest.$ac_ext >&5
21669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021670 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021672
21673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021674fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021675{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21676echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021677if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021678
21679cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021680#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021681_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021682
21683fi
21684
Michael W. Hudson54241132001-12-07 15:38:26 +000021685
Guido van Rossumda88dad1995-01-26 00:46:29 +000021686works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021687{ echo "$as_me:$LINENO: checking for working volatile" >&5
21688echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021689cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021690/* confdefs.h. */
21691_ACEOF
21692cat confdefs.h >>conftest.$ac_ext
21693cat >>conftest.$ac_ext <<_ACEOF
21694/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021695
Martin v. Löwis11437992002-04-12 09:54:03 +000021696int
21697main ()
21698{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021699volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021700 ;
21701 return 0;
21702}
21703_ACEOF
21704rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021705if { (ac_try="$ac_compile"
21706case "(($ac_try" in
21707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21708 *) ac_try_echo=$ac_try;;
21709esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021713 grep -v '^ *+' conftest.er1 >conftest.err
21714 rm -f conftest.er1
21715 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021717 (exit $ac_status); } && {
21718 test -z "$ac_c_werror_flag" ||
21719 test ! -s conftest.err
21720 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021721 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021722else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021724sed 's/^/| /' conftest.$ac_ext >&5
21725
Martin v. Löwis11437992002-04-12 09:54:03 +000021726
21727cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021728#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021729_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021730
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021731
Guido van Rossum627b2d71993-12-24 10:39:16 +000021732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021733
21734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021735{ echo "$as_me:$LINENO: result: $works" >&5
21736echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021737
Guido van Rossumda88dad1995-01-26 00:46:29 +000021738works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021739{ echo "$as_me:$LINENO: checking for working signed char" >&5
21740echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021742/* confdefs.h. */
21743_ACEOF
21744cat confdefs.h >>conftest.$ac_ext
21745cat >>conftest.$ac_ext <<_ACEOF
21746/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021747
Martin v. Löwis11437992002-04-12 09:54:03 +000021748int
21749main ()
21750{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021751signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021752 ;
21753 return 0;
21754}
21755_ACEOF
21756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021757if { (ac_try="$ac_compile"
21758case "(($ac_try" in
21759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21760 *) ac_try_echo=$ac_try;;
21761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021765 grep -v '^ *+' conftest.er1 >conftest.err
21766 rm -f conftest.er1
21767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021769 (exit $ac_status); } && {
21770 test -z "$ac_c_werror_flag" ||
21771 test ! -s conftest.err
21772 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021773 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021776sed 's/^/| /' conftest.$ac_ext >&5
21777
Martin v. Löwis11437992002-04-12 09:54:03 +000021778
21779cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021780#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021781_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021782
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021783
Guido van Rossum7f43da71994-08-01 12:15:30 +000021784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021785
21786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021787{ echo "$as_me:$LINENO: result: $works" >&5
21788echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021789
Guido van Rossumda88dad1995-01-26 00:46:29 +000021790have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021791{ echo "$as_me:$LINENO: checking for prototypes" >&5
21792echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021793cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021794/* confdefs.h. */
21795_ACEOF
21796cat confdefs.h >>conftest.$ac_ext
21797cat >>conftest.$ac_ext <<_ACEOF
21798/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021799int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021800int
21801main ()
21802{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021803return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021804 ;
21805 return 0;
21806}
21807_ACEOF
21808rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021809if { (ac_try="$ac_compile"
21810case "(($ac_try" in
21811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21812 *) ac_try_echo=$ac_try;;
21813esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021815 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021817 grep -v '^ *+' conftest.er1 >conftest.err
21818 rm -f conftest.er1
21819 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021821 (exit $ac_status); } && {
21822 test -z "$ac_c_werror_flag" ||
21823 test ! -s conftest.err
21824 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021825
21826
21827cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021828#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021829_ACEOF
21830
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021831 have_prototypes=yes
21832
Guido van Rossumf78abae1997-01-21 22:02:36 +000021833else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021835sed 's/^/| /' conftest.$ac_ext >&5
21836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021837
Guido van Rossum7f43da71994-08-01 12:15:30 +000021838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021839
21840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021841{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21842echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021843
Guido van Rossumda88dad1995-01-26 00:46:29 +000021844works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021845{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21846echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021848/* confdefs.h. */
21849_ACEOF
21850cat confdefs.h >>conftest.$ac_ext
21851cat >>conftest.$ac_ext <<_ACEOF
21852/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021853
21854#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021855int foo(int x, ...) {
21856 va_list va;
21857 va_start(va, x);
21858 va_arg(va, int);
21859 va_arg(va, char *);
21860 va_arg(va, double);
21861 return 0;
21862}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021863
Martin v. Löwis11437992002-04-12 09:54:03 +000021864int
21865main ()
21866{
Guido van Rossum90eea071996-08-30 20:58:57 +000021867return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021868 ;
21869 return 0;
21870}
21871_ACEOF
21872rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021873if { (ac_try="$ac_compile"
21874case "(($ac_try" in
21875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21876 *) ac_try_echo=$ac_try;;
21877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021881 grep -v '^ *+' conftest.er1 >conftest.err
21882 rm -f conftest.er1
21883 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021885 (exit $ac_status); } && {
21886 test -z "$ac_c_werror_flag" ||
21887 test ! -s conftest.err
21888 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021889
21890
21891cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021892#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021893_ACEOF
21894
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021895 works=yes
21896
Guido van Rossumf78abae1997-01-21 22:02:36 +000021897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021899sed 's/^/| /' conftest.$ac_ext >&5
21900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021901
Guido van Rossum627b2d71993-12-24 10:39:16 +000021902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021903
21904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021905{ echo "$as_me:$LINENO: result: $works" >&5
21906echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021907
Martin v. Löwisd6320502004-08-12 13:45:08 +000021908# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021909{ echo "$as_me:$LINENO: checking for socketpair" >&5
21910echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021911cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021912/* confdefs.h. */
21913_ACEOF
21914cat confdefs.h >>conftest.$ac_ext
21915cat >>conftest.$ac_ext <<_ACEOF
21916/* end confdefs.h. */
21917
21918#include <sys/types.h>
21919#include <sys/socket.h>
21920
21921int
21922main ()
21923{
21924void *x=socketpair
21925 ;
21926 return 0;
21927}
21928_ACEOF
21929rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021930if { (ac_try="$ac_compile"
21931case "(($ac_try" in
21932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21933 *) ac_try_echo=$ac_try;;
21934esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021938 grep -v '^ *+' conftest.er1 >conftest.err
21939 rm -f conftest.er1
21940 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021942 (exit $ac_status); } && {
21943 test -z "$ac_c_werror_flag" ||
21944 test ! -s conftest.err
21945 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021946
21947cat >>confdefs.h <<\_ACEOF
21948#define HAVE_SOCKETPAIR 1
21949_ACEOF
21950
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021951 { echo "$as_me:$LINENO: result: yes" >&5
21952echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021953else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021954 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021955sed 's/^/| /' conftest.$ac_ext >&5
21956
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021957 { echo "$as_me:$LINENO: result: no" >&5
21958echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021959
21960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021961
21962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021963
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021964# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021965{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21966echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021968/* confdefs.h. */
21969_ACEOF
21970cat confdefs.h >>conftest.$ac_ext
21971cat >>conftest.$ac_ext <<_ACEOF
21972/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021973#include <sys/types.h>
21974#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021975int
21976main ()
21977{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021978struct sockaddr x;
21979x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021980 ;
21981 return 0;
21982}
21983_ACEOF
21984rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021985if { (ac_try="$ac_compile"
21986case "(($ac_try" in
21987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21988 *) ac_try_echo=$ac_try;;
21989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021993 grep -v '^ *+' conftest.er1 >conftest.err
21994 rm -f conftest.er1
21995 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021997 (exit $ac_status); } && {
21998 test -z "$ac_c_werror_flag" ||
21999 test ! -s conftest.err
22000 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022001 { echo "$as_me:$LINENO: result: yes" >&5
22002echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022003
22004cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022005#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022006_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022007
22008else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022010sed 's/^/| /' conftest.$ac_ext >&5
22011
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022012 { echo "$as_me:$LINENO: result: no" >&5
22013echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022015
22016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022017
Guido van Rossumda88dad1995-01-26 00:46:29 +000022018va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022019{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22020echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022022/* confdefs.h. */
22023_ACEOF
22024cat confdefs.h >>conftest.$ac_ext
22025cat >>conftest.$ac_ext <<_ACEOF
22026/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022027
22028#ifdef HAVE_STDARG_PROTOTYPES
22029#include <stdarg.h>
22030#else
22031#include <varargs.h>
22032#endif
22033
Martin v. Löwis11437992002-04-12 09:54:03 +000022034int
22035main ()
22036{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022037va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022038 ;
22039 return 0;
22040}
22041_ACEOF
22042rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022043if { (ac_try="$ac_compile"
22044case "(($ac_try" in
22045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22046 *) ac_try_echo=$ac_try;;
22047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022051 grep -v '^ *+' conftest.er1 >conftest.err
22052 rm -f conftest.er1
22053 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022055 (exit $ac_status); } && {
22056 test -z "$ac_c_werror_flag" ||
22057 test ! -s conftest.err
22058 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022059 :
22060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022062sed 's/^/| /' conftest.$ac_ext >&5
22063
Martin v. Löwis11437992002-04-12 09:54:03 +000022064
22065
22066cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022067#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022068_ACEOF
22069
Guido van Rossumda88dad1995-01-26 00:46:29 +000022070 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022071
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022073
22074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022075{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22076echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022077
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022078# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022079
22080
22081
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022082{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22083echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022084if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022086else
Martin v. Löwis11437992002-04-12 09:54:03 +000022087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022088/* confdefs.h. */
22089_ACEOF
22090cat confdefs.h >>conftest.$ac_ext
22091cat >>conftest.$ac_ext <<_ACEOF
22092/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022093/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22094 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22095#define gethostbyname_r innocuous_gethostbyname_r
22096
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022097/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022098 which can conflict with char gethostbyname_r (); below.
22099 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022100 <limits.h> exists even on freestanding compilers. */
22101
22102#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022103# include <limits.h>
22104#else
22105# include <assert.h>
22106#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022107
22108#undef gethostbyname_r
22109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022110/* Override any GCC internal prototype to avoid an error.
22111 Use char because int might match the return type of a GCC
22112 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022113#ifdef __cplusplus
22114extern "C"
22115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022116char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022117/* The GNU C library defines this for functions which it implements
22118 to always fail with ENOSYS. Some functions are actually named
22119 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022120#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022121choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022122#endif
22123
Skip Montanaro6dead952003-09-25 14:50:04 +000022124int
22125main ()
22126{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022127return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022128 ;
22129 return 0;
22130}
22131_ACEOF
22132rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022133if { (ac_try="$ac_link"
22134case "(($ac_try" in
22135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22136 *) ac_try_echo=$ac_try;;
22137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022139 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022141 grep -v '^ *+' conftest.er1 >conftest.err
22142 rm -f conftest.er1
22143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022145 (exit $ac_status); } && {
22146 test -z "$ac_c_werror_flag" ||
22147 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022148 } && test -s conftest$ac_exeext &&
22149 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022150 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022151else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022153sed 's/^/| /' conftest.$ac_ext >&5
22154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022155 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022157
22158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022159 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022160fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022161{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22162echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22163if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022164
Martin v. Löwis11437992002-04-12 09:54:03 +000022165 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022166#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022167_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022168
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022169 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22170echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022171 OLD_CFLAGS=$CFLAGS
22172 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022173 cat >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. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022179
22180# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022181
Martin v. Löwis11437992002-04-12 09:54:03 +000022182int
22183main ()
22184{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022185
22186 char *name;
22187 struct hostent *he, *res;
22188 char buffer[2048];
22189 int buflen = 2048;
22190 int h_errnop;
22191
22192 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022193
22194 ;
22195 return 0;
22196}
22197_ACEOF
22198rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022199if { (ac_try="$ac_compile"
22200case "(($ac_try" in
22201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22202 *) ac_try_echo=$ac_try;;
22203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022207 grep -v '^ *+' conftest.er1 >conftest.err
22208 rm -f conftest.er1
22209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022211 (exit $ac_status); } && {
22212 test -z "$ac_c_werror_flag" ||
22213 test ! -s conftest.err
22214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022215
22216 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022217#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022218_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022219
Martin v. Löwis11437992002-04-12 09:54:03 +000022220
22221cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022222#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022223_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022224
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022225 { echo "$as_me:$LINENO: result: yes" >&5
22226echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022227
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022230sed 's/^/| /' conftest.$ac_ext >&5
22231
Martin v. Löwis11437992002-04-12 09:54:03 +000022232
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022233 { echo "$as_me:$LINENO: result: no" >&5
22234echo "${ECHO_T}no" >&6; }
22235 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22236echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022237 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022238/* confdefs.h. */
22239_ACEOF
22240cat confdefs.h >>conftest.$ac_ext
22241cat >>conftest.$ac_ext <<_ACEOF
22242/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022243
22244# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022245
Martin v. Löwis11437992002-04-12 09:54:03 +000022246int
22247main ()
22248{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022249
22250 char *name;
22251 struct hostent *he;
22252 char buffer[2048];
22253 int buflen = 2048;
22254 int h_errnop;
22255
22256 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022257
22258 ;
22259 return 0;
22260}
22261_ACEOF
22262rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022263if { (ac_try="$ac_compile"
22264case "(($ac_try" in
22265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22266 *) ac_try_echo=$ac_try;;
22267esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022271 grep -v '^ *+' conftest.er1 >conftest.err
22272 rm -f conftest.er1
22273 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022275 (exit $ac_status); } && {
22276 test -z "$ac_c_werror_flag" ||
22277 test ! -s conftest.err
22278 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022279
22280 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022281#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022282_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022283
Martin v. Löwis11437992002-04-12 09:54:03 +000022284
22285cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022286#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022287_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022288
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022289 { echo "$as_me:$LINENO: result: yes" >&5
22290echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022291
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022294sed 's/^/| /' conftest.$ac_ext >&5
22295
Martin v. Löwis11437992002-04-12 09:54:03 +000022296
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022297 { echo "$as_me:$LINENO: result: no" >&5
22298echo "${ECHO_T}no" >&6; }
22299 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22300echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022302/* confdefs.h. */
22303_ACEOF
22304cat confdefs.h >>conftest.$ac_ext
22305cat >>conftest.$ac_ext <<_ACEOF
22306/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022307
22308# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022309
Martin v. Löwis11437992002-04-12 09:54:03 +000022310int
22311main ()
22312{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022313
22314 char *name;
22315 struct hostent *he;
22316 struct hostent_data data;
22317
22318 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022319
22320 ;
22321 return 0;
22322}
22323_ACEOF
22324rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022325if { (ac_try="$ac_compile"
22326case "(($ac_try" in
22327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22328 *) ac_try_echo=$ac_try;;
22329esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022331 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022333 grep -v '^ *+' conftest.er1 >conftest.err
22334 rm -f conftest.er1
22335 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022337 (exit $ac_status); } && {
22338 test -z "$ac_c_werror_flag" ||
22339 test ! -s conftest.err
22340 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022341
22342 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022343#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022344_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022345
Martin v. Löwis11437992002-04-12 09:54:03 +000022346
22347cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022348#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022349_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022350
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022351 { echo "$as_me:$LINENO: result: yes" >&5
22352echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022353
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022354else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022356sed 's/^/| /' conftest.$ac_ext >&5
22357
Martin v. Löwis11437992002-04-12 09:54:03 +000022358
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022359 { echo "$as_me:$LINENO: result: no" >&5
22360echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022361
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.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022365
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022367
22368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022369
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022371
22372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022373 CFLAGS=$OLD_CFLAGS
22374
22375else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022376
Martin v. Löwis11437992002-04-12 09:54:03 +000022377
22378for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022379do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022380as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22381{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22382echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022383if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022385else
Martin v. Löwis11437992002-04-12 09:54:03 +000022386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022387/* confdefs.h. */
22388_ACEOF
22389cat confdefs.h >>conftest.$ac_ext
22390cat >>conftest.$ac_ext <<_ACEOF
22391/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022392/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22393 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22394#define $ac_func innocuous_$ac_func
22395
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022396/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022397 which can conflict with char $ac_func (); below.
22398 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022399 <limits.h> exists even on freestanding compilers. */
22400
22401#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022402# include <limits.h>
22403#else
22404# include <assert.h>
22405#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022406
22407#undef $ac_func
22408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022409/* Override any GCC internal prototype to avoid an error.
22410 Use char because int might match the return type of a GCC
22411 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022412#ifdef __cplusplus
22413extern "C"
22414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022415char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022416/* The GNU C library defines this for functions which it implements
22417 to always fail with ENOSYS. Some functions are actually named
22418 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022419#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022420choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022421#endif
22422
Skip Montanaro6dead952003-09-25 14:50:04 +000022423int
22424main ()
22425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022426return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022427 ;
22428 return 0;
22429}
22430_ACEOF
22431rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022432if { (ac_try="$ac_link"
22433case "(($ac_try" in
22434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22435 *) ac_try_echo=$ac_try;;
22436esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022438 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022440 grep -v '^ *+' conftest.er1 >conftest.err
22441 rm -f conftest.er1
22442 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022444 (exit $ac_status); } && {
22445 test -z "$ac_c_werror_flag" ||
22446 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022447 } && test -s conftest$ac_exeext &&
22448 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022449 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022450else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022452sed 's/^/| /' conftest.$ac_ext >&5
22453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022454 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022456
22457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022458 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022459fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022460ac_res=`eval echo '${'$as_ac_var'}'`
22461 { echo "$as_me:$LINENO: result: $ac_res" >&5
22462echo "${ECHO_T}$ac_res" >&6; }
22463if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022464 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022465#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022466_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022468fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022469done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022470
Michael W. Hudson54241132001-12-07 15:38:26 +000022471
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022472fi
22473
Michael W. Hudson54241132001-12-07 15:38:26 +000022474
22475
22476
22477
22478
22479
Guido van Rossum627b2d71993-12-24 10:39:16 +000022480# checks for system services
22481# (none yet)
22482
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022483# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022484{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22485echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022486if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022487 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022488else
Martin v. Löwis11437992002-04-12 09:54:03 +000022489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022490/* confdefs.h. */
22491_ACEOF
22492cat confdefs.h >>conftest.$ac_ext
22493cat >>conftest.$ac_ext <<_ACEOF
22494/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022495/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22496 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22497#define __fpu_control innocuous___fpu_control
22498
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022499/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022500 which can conflict with char __fpu_control (); below.
22501 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022502 <limits.h> exists even on freestanding compilers. */
22503
22504#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022505# include <limits.h>
22506#else
22507# include <assert.h>
22508#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022509
22510#undef __fpu_control
22511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022512/* Override any GCC internal prototype to avoid an error.
22513 Use char because int might match the return type of a GCC
22514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022515#ifdef __cplusplus
22516extern "C"
22517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022518char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022519/* The GNU C library defines this for functions which it implements
22520 to always fail with ENOSYS. Some functions are actually named
22521 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022522#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022523choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022524#endif
22525
Skip Montanaro6dead952003-09-25 14:50:04 +000022526int
22527main ()
22528{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022529return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022530 ;
22531 return 0;
22532}
22533_ACEOF
22534rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022535if { (ac_try="$ac_link"
22536case "(($ac_try" in
22537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22538 *) ac_try_echo=$ac_try;;
22539esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022541 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022543 grep -v '^ *+' conftest.er1 >conftest.err
22544 rm -f conftest.er1
22545 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022547 (exit $ac_status); } && {
22548 test -z "$ac_c_werror_flag" ||
22549 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022550 } && test -s conftest$ac_exeext &&
22551 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022552 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022553else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022555sed 's/^/| /' conftest.$ac_ext >&5
22556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022557 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022559
22560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022561 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022562fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022563{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22564echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22565if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022566 :
22567else
Martin v. Löwis11437992002-04-12 09:54:03 +000022568
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022569{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22570echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022571if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022573else
Martin v. Löwis11437992002-04-12 09:54:03 +000022574 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022575LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022577/* confdefs.h. */
22578_ACEOF
22579cat confdefs.h >>conftest.$ac_ext
22580cat >>conftest.$ac_ext <<_ACEOF
22581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022583/* Override any GCC internal prototype to avoid an error.
22584 Use char because int might match the return type of a GCC
22585 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022586#ifdef __cplusplus
22587extern "C"
22588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022589char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022590int
22591main ()
22592{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022593return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022594 ;
22595 return 0;
22596}
22597_ACEOF
22598rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022599if { (ac_try="$ac_link"
22600case "(($ac_try" in
22601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22602 *) ac_try_echo=$ac_try;;
22603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022605 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022607 grep -v '^ *+' conftest.er1 >conftest.err
22608 rm -f conftest.er1
22609 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022611 (exit $ac_status); } && {
22612 test -z "$ac_c_werror_flag" ||
22613 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022614 } && test -s conftest$ac_exeext &&
22615 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022616 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022617else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022619sed 's/^/| /' conftest.$ac_ext >&5
22620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022621 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022623
22624rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022625 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022626LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022627fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022628{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22629echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22630if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022631 cat >>confdefs.h <<_ACEOF
22632#define HAVE_LIBIEEE 1
22633_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022634
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022635 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022636
Guido van Rossum627b2d71993-12-24 10:39:16 +000022637fi
22638
Michael W. Hudson54241132001-12-07 15:38:26 +000022639
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022640fi
22641
Michael W. Hudson54241132001-12-07 15:38:26 +000022642
Guido van Rossum7f253911997-05-09 02:42:48 +000022643# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022644{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22645echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022647# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022648if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022649 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022650if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022651then
22652
22653cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022654#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022655_ACEOF
22656
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022657 { echo "$as_me:$LINENO: result: yes" >&5
22658echo "${ECHO_T}yes" >&6; }
22659else { echo "$as_me:$LINENO: result: no" >&5
22660echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022661fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022663 { echo "$as_me:$LINENO: result: no" >&5
22664echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022665fi
22666
Guido van Rossum7f253911997-05-09 02:42:48 +000022667
Guido van Rossum7f43da71994-08-01 12:15:30 +000022668# check for --with-libm=...
22669
Guido van Rossum563e7081996-09-10 18:20:48 +000022670case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022671Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022672*) LIBM=-lm
22673esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022674{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22675echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022677# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022678if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022679 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022680if test "$withval" = no
22681then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022682 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22683echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022684elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022685then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022686 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22687echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22688else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22689echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022690 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022691fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022692else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022693 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22694echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022695fi
22696
Guido van Rossum7f43da71994-08-01 12:15:30 +000022697
22698# check for --with-libc=...
22699
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022700{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22701echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022703# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022704if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022705 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022706if test "$withval" = no
22707then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022708 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22709echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022710elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022711then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022712 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22713echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22714else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22715echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022716 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022717fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022718else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022719 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22720echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022721fi
22722
Guido van Rossum7f43da71994-08-01 12:15:30 +000022723
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022724# **************************************************
22725# * Check for various properties of floating point *
22726# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022727
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022728{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22729echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022730if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022731 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022732else
22733
22734if test "$cross_compiling" = yes; then
22735 ac_cv_little_endian_double=no
22736else
22737 cat >conftest.$ac_ext <<_ACEOF
22738/* confdefs.h. */
22739_ACEOF
22740cat confdefs.h >>conftest.$ac_ext
22741cat >>conftest.$ac_ext <<_ACEOF
22742/* end confdefs.h. */
22743
22744#include <string.h>
22745int main() {
22746 double x = 9006104071832581.0;
22747 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22748 return 0;
22749 else
22750 return 1;
22751}
22752
22753_ACEOF
22754rm -f conftest$ac_exeext
22755if { (ac_try="$ac_link"
22756case "(($ac_try" in
22757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22758 *) ac_try_echo=$ac_try;;
22759esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022761 (eval "$ac_link") 2>&5
22762 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022764 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22765 { (case "(($ac_try" in
22766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22767 *) ac_try_echo=$ac_try;;
22768esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022770 (eval "$ac_try") 2>&5
22771 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022773 (exit $ac_status); }; }; then
22774 ac_cv_little_endian_double=yes
22775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022776 echo "$as_me: program exited with status $ac_status" >&5
22777echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022778sed 's/^/| /' conftest.$ac_ext >&5
22779
22780( exit $ac_status )
22781ac_cv_little_endian_double=no
22782fi
22783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22784fi
22785
22786
22787fi
22788
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022789{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22790echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022791if test "$ac_cv_little_endian_double" = yes
22792then
22793
22794cat >>confdefs.h <<\_ACEOF
22795#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22796_ACEOF
22797
22798fi
22799
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022800{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22801echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022802if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022803 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022804else
22805
22806if test "$cross_compiling" = yes; then
22807 ac_cv_big_endian_double=no
22808else
22809 cat >conftest.$ac_ext <<_ACEOF
22810/* confdefs.h. */
22811_ACEOF
22812cat confdefs.h >>conftest.$ac_ext
22813cat >>conftest.$ac_ext <<_ACEOF
22814/* end confdefs.h. */
22815
22816#include <string.h>
22817int main() {
22818 double x = 9006104071832581.0;
22819 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22820 return 0;
22821 else
22822 return 1;
22823}
22824
22825_ACEOF
22826rm -f conftest$ac_exeext
22827if { (ac_try="$ac_link"
22828case "(($ac_try" in
22829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22830 *) ac_try_echo=$ac_try;;
22831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022833 (eval "$ac_link") 2>&5
22834 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22837 { (case "(($ac_try" in
22838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22839 *) ac_try_echo=$ac_try;;
22840esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022842 (eval "$ac_try") 2>&5
22843 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022845 (exit $ac_status); }; }; then
22846 ac_cv_big_endian_double=yes
22847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022848 echo "$as_me: program exited with status $ac_status" >&5
22849echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022850sed 's/^/| /' conftest.$ac_ext >&5
22851
22852( exit $ac_status )
22853ac_cv_big_endian_double=no
22854fi
22855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22856fi
22857
22858
22859fi
22860
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022861{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22862echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022863if test "$ac_cv_big_endian_double" = yes
22864then
22865
22866cat >>confdefs.h <<\_ACEOF
22867#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22868_ACEOF
22869
22870fi
22871
22872# Some ARM platforms use a mixed-endian representation for doubles.
22873# While Python doesn't currently have full support for these platforms
22874# (see e.g., issue 1762561), we can at least make sure that float <-> string
22875# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022876{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22877echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022878if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022879 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022880else
22881
22882if test "$cross_compiling" = yes; then
22883 ac_cv_mixed_endian_double=no
22884else
22885 cat >conftest.$ac_ext <<_ACEOF
22886/* confdefs.h. */
22887_ACEOF
22888cat confdefs.h >>conftest.$ac_ext
22889cat >>conftest.$ac_ext <<_ACEOF
22890/* end confdefs.h. */
22891
22892#include <string.h>
22893int main() {
22894 double x = 9006104071832581.0;
22895 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22896 return 0;
22897 else
22898 return 1;
22899}
22900
22901_ACEOF
22902rm -f conftest$ac_exeext
22903if { (ac_try="$ac_link"
22904case "(($ac_try" in
22905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22906 *) ac_try_echo=$ac_try;;
22907esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022909 (eval "$ac_link") 2>&5
22910 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022912 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22913 { (case "(($ac_try" in
22914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22915 *) ac_try_echo=$ac_try;;
22916esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022918 (eval "$ac_try") 2>&5
22919 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022921 (exit $ac_status); }; }; then
22922 ac_cv_mixed_endian_double=yes
22923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022924 echo "$as_me: program exited with status $ac_status" >&5
22925echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022926sed 's/^/| /' conftest.$ac_ext >&5
22927
22928( exit $ac_status )
22929ac_cv_mixed_endian_double=no
22930fi
22931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22932fi
22933
22934
22935fi
22936
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022937{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22938echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022939if test "$ac_cv_mixed_endian_double" = yes
22940then
22941
22942cat >>confdefs.h <<\_ACEOF
22943#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22944_ACEOF
22945
22946fi
22947
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022948# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022949# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022950# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022951# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000022952# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000022953# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000022954
22955# This inline assembler syntax may also work for suncc and icc,
22956# so we try it on all platforms.
22957
22958{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022959echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000022960cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022961/* confdefs.h. */
22962_ACEOF
22963cat confdefs.h >>conftest.$ac_ext
22964cat >>conftest.$ac_ext <<_ACEOF
22965/* end confdefs.h. */
22966
22967int
22968main ()
22969{
22970
Mark Dickinsonf4243f62009-11-15 13:47:27 +000022971 unsigned short cw;
22972 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22973 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022974
22975 ;
22976 return 0;
22977}
22978_ACEOF
22979rm -f conftest.$ac_objext
22980if { (ac_try="$ac_compile"
22981case "(($ac_try" in
22982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22983 *) ac_try_echo=$ac_try;;
22984esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022986 (eval "$ac_compile") 2>conftest.er1
22987 ac_status=$?
22988 grep -v '^ *+' conftest.er1 >conftest.err
22989 rm -f conftest.er1
22990 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022992 (exit $ac_status); } && {
22993 test -z "$ac_c_werror_flag" ||
22994 test ! -s conftest.err
22995 } && test -s conftest.$ac_objext; then
22996 have_gcc_asm_for_x87=yes
22997else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022998 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022999sed 's/^/| /' conftest.$ac_ext >&5
23000
23001 have_gcc_asm_for_x87=no
23002fi
23003
23004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023005{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023006echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023007if test "$have_gcc_asm_for_x87" = yes
23008then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023009
23010cat >>confdefs.h <<\_ACEOF
23011#define HAVE_GCC_ASM_FOR_X87 1
23012_ACEOF
23013
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023014fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023015
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023016# Detect whether system arithmetic is subject to x87-style double
23017# rounding issues. The result of this test has little meaning on non
23018# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23019# mode is round-to-nearest and double rounding issues are present, and
23020# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023021{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23022echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023023# $BASECFLAGS may affect the result
23024ac_save_cc="$CC"
23025CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023026if test "$cross_compiling" = yes; then
23027 ac_cv_x87_double_rounding=no
23028else
23029 cat >conftest.$ac_ext <<_ACEOF
23030/* confdefs.h. */
23031_ACEOF
23032cat confdefs.h >>conftest.$ac_ext
23033cat >>conftest.$ac_ext <<_ACEOF
23034/* end confdefs.h. */
23035
23036#include <stdlib.h>
23037#include <math.h>
23038int main() {
23039 volatile double x, y, z;
23040 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23041 x = 0.99999999999999989; /* 1-2**-53 */
23042 y = 1./x;
23043 if (y != 1.)
23044 exit(0);
23045 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23046 x = 1e16;
23047 y = 2.99999;
23048 z = x + y;
23049 if (z != 1e16+4.)
23050 exit(0);
23051 /* both tests show evidence of double rounding */
23052 exit(1);
23053}
23054
23055_ACEOF
23056rm -f conftest$ac_exeext
23057if { (ac_try="$ac_link"
23058case "(($ac_try" in
23059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23060 *) ac_try_echo=$ac_try;;
23061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023063 (eval "$ac_link") 2>&5
23064 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023066 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23067 { (case "(($ac_try" in
23068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23069 *) ac_try_echo=$ac_try;;
23070esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023072 (eval "$ac_try") 2>&5
23073 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023075 (exit $ac_status); }; }; then
23076 ac_cv_x87_double_rounding=no
23077else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023078 echo "$as_me: program exited with status $ac_status" >&5
23079echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023080sed 's/^/| /' conftest.$ac_ext >&5
23081
23082( exit $ac_status )
23083ac_cv_x87_double_rounding=yes
23084fi
23085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23086fi
23087
23088
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023089CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023090{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23091echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023092if test "$ac_cv_x87_double_rounding" = yes
23093then
23094
23095cat >>confdefs.h <<\_ACEOF
23096#define X87_DOUBLE_ROUNDING 1
23097_ACEOF
23098
23099fi
23100
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023101# ************************************
23102# * Check for mathematical functions *
23103# ************************************
23104
23105LIBS_SAVE=$LIBS
23106LIBS="$LIBS $LIBM"
23107
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023108# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23109# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023110{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23111echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023112if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023113 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023114else
23115
23116if test "$cross_compiling" = yes; then
23117 ac_cv_tanh_preserves_zero_sign=no
23118else
23119 cat >conftest.$ac_ext <<_ACEOF
23120/* confdefs.h. */
23121_ACEOF
23122cat confdefs.h >>conftest.$ac_ext
23123cat >>conftest.$ac_ext <<_ACEOF
23124/* end confdefs.h. */
23125
23126#include <math.h>
23127#include <stdlib.h>
23128int main() {
23129 /* return 0 if either negative zeros don't exist
23130 on this platform or if negative zeros exist
23131 and tanh(-0.) == -0. */
23132 if (atan2(0., -1.) == atan2(-0., -1.) ||
23133 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23134 else exit(1);
23135}
23136
23137_ACEOF
23138rm -f conftest$ac_exeext
23139if { (ac_try="$ac_link"
23140case "(($ac_try" in
23141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23142 *) ac_try_echo=$ac_try;;
23143esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023145 (eval "$ac_link") 2>&5
23146 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023148 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23149 { (case "(($ac_try" in
23150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23151 *) ac_try_echo=$ac_try;;
23152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023154 (eval "$ac_try") 2>&5
23155 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023157 (exit $ac_status); }; }; then
23158 ac_cv_tanh_preserves_zero_sign=yes
23159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023160 echo "$as_me: program exited with status $ac_status" >&5
23161echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023162sed 's/^/| /' conftest.$ac_ext >&5
23163
23164( exit $ac_status )
23165ac_cv_tanh_preserves_zero_sign=no
23166fi
23167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23168fi
23169
23170
23171fi
23172
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023173{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23174echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023175if test "$ac_cv_tanh_preserves_zero_sign" = yes
23176then
23177
23178cat >>confdefs.h <<\_ACEOF
23179#define TANH_PRESERVES_ZERO_SIGN 1
23180_ACEOF
23181
23182fi
23183
23184
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023185
Michael W. Hudson54241132001-12-07 15:38:26 +000023186
Christian Heimes99170a52007-12-19 02:07:34 +000023187
23188
23189
23190
23191
Mark Dickinsonf2537862009-04-18 13:58:18 +000023192
Mark Dickinson9c113362009-09-05 10:36:23 +000023193for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23194do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023195as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23196{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23197echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023198if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023199 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023200else
23201 cat >conftest.$ac_ext <<_ACEOF
23202/* confdefs.h. */
23203_ACEOF
23204cat confdefs.h >>conftest.$ac_ext
23205cat >>conftest.$ac_ext <<_ACEOF
23206/* end confdefs.h. */
23207/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23208 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23209#define $ac_func innocuous_$ac_func
23210
23211/* System header to define __stub macros and hopefully few prototypes,
23212 which can conflict with char $ac_func (); below.
23213 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23214 <limits.h> exists even on freestanding compilers. */
23215
23216#ifdef __STDC__
23217# include <limits.h>
23218#else
23219# include <assert.h>
23220#endif
23221
23222#undef $ac_func
23223
23224/* Override any GCC internal prototype to avoid an error.
23225 Use char because int might match the return type of a GCC
23226 builtin and then its argument prototype would still apply. */
23227#ifdef __cplusplus
23228extern "C"
23229#endif
23230char $ac_func ();
23231/* The GNU C library defines this for functions which it implements
23232 to always fail with ENOSYS. Some functions are actually named
23233 something starting with __ and the normal name is an alias. */
23234#if defined __stub_$ac_func || defined __stub___$ac_func
23235choke me
23236#endif
23237
23238int
23239main ()
23240{
23241return $ac_func ();
23242 ;
23243 return 0;
23244}
23245_ACEOF
23246rm -f conftest.$ac_objext conftest$ac_exeext
23247if { (ac_try="$ac_link"
23248case "(($ac_try" in
23249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23250 *) ac_try_echo=$ac_try;;
23251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023253 (eval "$ac_link") 2>conftest.er1
23254 ac_status=$?
23255 grep -v '^ *+' conftest.er1 >conftest.err
23256 rm -f conftest.er1
23257 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023259 (exit $ac_status); } && {
23260 test -z "$ac_c_werror_flag" ||
23261 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023262 } && test -s conftest$ac_exeext &&
23263 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023264 eval "$as_ac_var=yes"
23265else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023266 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023267sed 's/^/| /' conftest.$ac_ext >&5
23268
23269 eval "$as_ac_var=no"
23270fi
23271
23272rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23273 conftest$ac_exeext conftest.$ac_ext
23274fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023275ac_res=`eval echo '${'$as_ac_var'}'`
23276 { echo "$as_me:$LINENO: result: $ac_res" >&5
23277echo "${ECHO_T}$ac_res" >&6; }
23278if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023279 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023280#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023281_ACEOF
23282
23283fi
23284done
23285
23286
23287
23288
23289
23290
23291for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023292do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023293as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23294{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23295echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023296if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023297 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023298else
23299 cat >conftest.$ac_ext <<_ACEOF
23300/* confdefs.h. */
23301_ACEOF
23302cat confdefs.h >>conftest.$ac_ext
23303cat >>conftest.$ac_ext <<_ACEOF
23304/* end confdefs.h. */
23305/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23306 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23307#define $ac_func innocuous_$ac_func
23308
23309/* System header to define __stub macros and hopefully few prototypes,
23310 which can conflict with char $ac_func (); below.
23311 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23312 <limits.h> exists even on freestanding compilers. */
23313
23314#ifdef __STDC__
23315# include <limits.h>
23316#else
23317# include <assert.h>
23318#endif
23319
23320#undef $ac_func
23321
23322/* Override any GCC internal prototype to avoid an error.
23323 Use char because int might match the return type of a GCC
23324 builtin and then its argument prototype would still apply. */
23325#ifdef __cplusplus
23326extern "C"
23327#endif
23328char $ac_func ();
23329/* The GNU C library defines this for functions which it implements
23330 to always fail with ENOSYS. Some functions are actually named
23331 something starting with __ and the normal name is an alias. */
23332#if defined __stub_$ac_func || defined __stub___$ac_func
23333choke me
23334#endif
23335
23336int
23337main ()
23338{
23339return $ac_func ();
23340 ;
23341 return 0;
23342}
23343_ACEOF
23344rm -f conftest.$ac_objext conftest$ac_exeext
23345if { (ac_try="$ac_link"
23346case "(($ac_try" in
23347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23348 *) ac_try_echo=$ac_try;;
23349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023351 (eval "$ac_link") 2>conftest.er1
23352 ac_status=$?
23353 grep -v '^ *+' conftest.er1 >conftest.err
23354 rm -f conftest.er1
23355 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023357 (exit $ac_status); } && {
23358 test -z "$ac_c_werror_flag" ||
23359 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023360 } && test -s conftest$ac_exeext &&
23361 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023362 eval "$as_ac_var=yes"
23363else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023364 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023365sed 's/^/| /' conftest.$ac_ext >&5
23366
23367 eval "$as_ac_var=no"
23368fi
23369
23370rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23371 conftest$ac_exeext conftest.$ac_ext
23372fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023373ac_res=`eval echo '${'$as_ac_var'}'`
23374 { echo "$as_me:$LINENO: result: $ac_res" >&5
23375echo "${ECHO_T}$ac_res" >&6; }
23376if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023377 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023378#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023379_ACEOF
23380
23381fi
23382done
23383
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023384{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23385echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023386if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023387 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023388else
23389 cat >conftest.$ac_ext <<_ACEOF
23390/* confdefs.h. */
23391_ACEOF
23392cat confdefs.h >>conftest.$ac_ext
23393cat >>conftest.$ac_ext <<_ACEOF
23394/* end confdefs.h. */
23395#include <math.h>
23396
23397int
23398main ()
23399{
23400#ifndef isinf
23401 (void) isinf;
23402#endif
23403
23404 ;
23405 return 0;
23406}
23407_ACEOF
23408rm -f conftest.$ac_objext
23409if { (ac_try="$ac_compile"
23410case "(($ac_try" in
23411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23412 *) ac_try_echo=$ac_try;;
23413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023415 (eval "$ac_compile") 2>conftest.er1
23416 ac_status=$?
23417 grep -v '^ *+' conftest.er1 >conftest.err
23418 rm -f conftest.er1
23419 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023421 (exit $ac_status); } && {
23422 test -z "$ac_c_werror_flag" ||
23423 test ! -s conftest.err
23424 } && test -s conftest.$ac_objext; then
23425 ac_cv_have_decl_isinf=yes
23426else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023427 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023428sed 's/^/| /' conftest.$ac_ext >&5
23429
23430 ac_cv_have_decl_isinf=no
23431fi
23432
23433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23434fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023435{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23436echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23437if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023438
23439cat >>confdefs.h <<_ACEOF
23440#define HAVE_DECL_ISINF 1
23441_ACEOF
23442
23443
23444else
23445 cat >>confdefs.h <<_ACEOF
23446#define HAVE_DECL_ISINF 0
23447_ACEOF
23448
23449
23450fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023451{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23452echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023453if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023454 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023455else
23456 cat >conftest.$ac_ext <<_ACEOF
23457/* confdefs.h. */
23458_ACEOF
23459cat confdefs.h >>conftest.$ac_ext
23460cat >>conftest.$ac_ext <<_ACEOF
23461/* end confdefs.h. */
23462#include <math.h>
23463
23464int
23465main ()
23466{
23467#ifndef isnan
23468 (void) isnan;
23469#endif
23470
23471 ;
23472 return 0;
23473}
23474_ACEOF
23475rm -f conftest.$ac_objext
23476if { (ac_try="$ac_compile"
23477case "(($ac_try" in
23478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23479 *) ac_try_echo=$ac_try;;
23480esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023482 (eval "$ac_compile") 2>conftest.er1
23483 ac_status=$?
23484 grep -v '^ *+' conftest.er1 >conftest.err
23485 rm -f conftest.er1
23486 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023488 (exit $ac_status); } && {
23489 test -z "$ac_c_werror_flag" ||
23490 test ! -s conftest.err
23491 } && test -s conftest.$ac_objext; then
23492 ac_cv_have_decl_isnan=yes
23493else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023494 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023495sed 's/^/| /' conftest.$ac_ext >&5
23496
23497 ac_cv_have_decl_isnan=no
23498fi
23499
23500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23501fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023502{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23503echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23504if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023505
23506cat >>confdefs.h <<_ACEOF
23507#define HAVE_DECL_ISNAN 1
23508_ACEOF
23509
23510
23511else
23512 cat >>confdefs.h <<_ACEOF
23513#define HAVE_DECL_ISNAN 0
23514_ACEOF
23515
23516
23517fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023518{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23519echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023520if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023521 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023522else
23523 cat >conftest.$ac_ext <<_ACEOF
23524/* confdefs.h. */
23525_ACEOF
23526cat confdefs.h >>conftest.$ac_ext
23527cat >>conftest.$ac_ext <<_ACEOF
23528/* end confdefs.h. */
23529#include <math.h>
23530
23531int
23532main ()
23533{
23534#ifndef isfinite
23535 (void) isfinite;
23536#endif
23537
23538 ;
23539 return 0;
23540}
23541_ACEOF
23542rm -f conftest.$ac_objext
23543if { (ac_try="$ac_compile"
23544case "(($ac_try" in
23545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23546 *) ac_try_echo=$ac_try;;
23547esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023549 (eval "$ac_compile") 2>conftest.er1
23550 ac_status=$?
23551 grep -v '^ *+' conftest.er1 >conftest.err
23552 rm -f conftest.er1
23553 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023555 (exit $ac_status); } && {
23556 test -z "$ac_c_werror_flag" ||
23557 test ! -s conftest.err
23558 } && test -s conftest.$ac_objext; then
23559 ac_cv_have_decl_isfinite=yes
23560else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023561 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023562sed 's/^/| /' conftest.$ac_ext >&5
23563
23564 ac_cv_have_decl_isfinite=no
23565fi
23566
23567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23568fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023569{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23570echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23571if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023572
23573cat >>confdefs.h <<_ACEOF
23574#define HAVE_DECL_ISFINITE 1
23575_ACEOF
23576
23577
23578else
23579 cat >>confdefs.h <<_ACEOF
23580#define HAVE_DECL_ISFINITE 0
23581_ACEOF
23582
23583
23584fi
23585
23586
Christian Heimes99170a52007-12-19 02:07:34 +000023587
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023588LIBS=$LIBS_SAVE
23589
Mark Dickinsona614f042009-11-28 12:48:43 +000023590# For multiprocessing module, check that sem_open
23591# actually works. For FreeBSD versions <= 7.2,
23592# the kernel module that provides POSIX semaphores
23593# isn't loaded by default, so an attempt to call
23594# sem_open results in a 'Signal 12' error.
23595{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
23596echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
23597if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
23598 echo $ECHO_N "(cached) $ECHO_C" >&6
23599else
23600 if test "$cross_compiling" = yes; then
23601 ac_cv_posix_semaphores_enabled=yes
23602else
23603 cat >conftest.$ac_ext <<_ACEOF
23604/* confdefs.h. */
23605_ACEOF
23606cat confdefs.h >>conftest.$ac_ext
23607cat >>conftest.$ac_ext <<_ACEOF
23608/* end confdefs.h. */
23609
23610#include <unistd.h>
23611#include <fcntl.h>
23612#include <stdio.h>
23613#include <semaphore.h>
23614#include <sys/stat.h>
23615
23616int main(void) {
23617 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23618 if (a == SEM_FAILED) {
23619 perror("sem_open");
23620 return 1;
23621 }
23622 sem_close(a);
23623 return 0;
23624}
23625
23626_ACEOF
23627rm -f conftest$ac_exeext
23628if { (ac_try="$ac_link"
23629case "(($ac_try" in
23630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23631 *) ac_try_echo=$ac_try;;
23632esac
23633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23634 (eval "$ac_link") 2>&5
23635 ac_status=$?
23636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23637 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23638 { (case "(($ac_try" in
23639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23640 *) ac_try_echo=$ac_try;;
23641esac
23642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23643 (eval "$ac_try") 2>&5
23644 ac_status=$?
23645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23646 (exit $ac_status); }; }; then
23647 ac_cv_posix_semaphores_enabled=yes
23648else
23649 echo "$as_me: program exited with status $ac_status" >&5
23650echo "$as_me: failed program was:" >&5
23651sed 's/^/| /' conftest.$ac_ext >&5
23652
23653( exit $ac_status )
23654ac_cv_posix_semaphores_enabled=no
23655fi
23656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23657fi
23658
23659
23660
23661fi
23662
23663{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
23664echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
23665if test $ac_cv_posix_semaphores_enabled = no
23666then
23667
23668cat >>confdefs.h <<\_ACEOF
23669#define POSIX_SEMAPHORES_NOT_ENABLED 1
23670_ACEOF
23671
23672fi
23673
Mark Dickinson10683072009-04-18 21:18:19 +000023674# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023675{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23676echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023677if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023678 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023679else
23680 if test "$cross_compiling" = yes; then
23681 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023682else
23683 cat >conftest.$ac_ext <<_ACEOF
23684/* confdefs.h. */
23685_ACEOF
23686cat confdefs.h >>conftest.$ac_ext
23687cat >>conftest.$ac_ext <<_ACEOF
23688/* end confdefs.h. */
23689
23690#include <unistd.h>
23691#include <fcntl.h>
23692#include <stdio.h>
23693#include <semaphore.h>
23694#include <sys/stat.h>
23695
23696int main(void){
23697 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23698 int count;
23699 int res;
23700 if(a==SEM_FAILED){
23701 perror("sem_open");
23702 return 1;
23703
23704 }
23705 res = sem_getvalue(a, &count);
23706 sem_close(a);
23707 return res==-1 ? 1 : 0;
23708}
23709
Mark Dickinson10683072009-04-18 21:18:19 +000023710_ACEOF
23711rm -f conftest$ac_exeext
23712if { (ac_try="$ac_link"
23713case "(($ac_try" in
23714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23715 *) ac_try_echo=$ac_try;;
23716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023718 (eval "$ac_link") 2>&5
23719 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23722 { (case "(($ac_try" in
23723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23724 *) ac_try_echo=$ac_try;;
23725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023727 (eval "$ac_try") 2>&5
23728 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023730 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023731 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023732else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023733 echo "$as_me: program exited with status $ac_status" >&5
23734echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023735sed 's/^/| /' conftest.$ac_ext >&5
23736
23737( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023738ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023739fi
23740rm -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 +000023741fi
23742
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023743
23744
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023745fi
23746
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023747{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23748echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023749if test $ac_cv_broken_sem_getvalue = yes
23750then
23751
23752cat >>confdefs.h <<\_ACEOF
23753#define HAVE_BROKEN_SEM_GETVALUE 1
23754_ACEOF
23755
23756fi
23757
Mark Dickinsonbd792642009-03-18 20:06:12 +000023758# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023759{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23760echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023761# Check whether --enable-big-digits was given.
23762if test "${enable_big_digits+set}" = set; then
23763 enableval=$enable_big_digits; case $enable_big_digits in
23764yes)
23765 enable_big_digits=30 ;;
23766no)
23767 enable_big_digits=15 ;;
2376815|30)
23769 ;;
23770*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023771 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23772echo "$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 +000023773 { (exit 1); exit 1; }; } ;;
23774esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023775{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23776echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023777
23778cat >>confdefs.h <<_ACEOF
23779#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23780_ACEOF
23781
23782
23783else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023784 { echo "$as_me:$LINENO: result: no value specified" >&5
23785echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023786fi
23787
23788
Guido van Rossumef2255b2000-03-10 22:30:29 +000023789# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023790if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023791 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23792echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023793if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023794 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023795fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023796{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23797echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023798else
Martin v. Löwis11437992002-04-12 09:54:03 +000023799 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023800{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23801echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023803/* confdefs.h. */
23804_ACEOF
23805cat confdefs.h >>conftest.$ac_ext
23806cat >>conftest.$ac_ext <<_ACEOF
23807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023808$ac_includes_default
23809#include <wchar.h>
23810_ACEOF
23811rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023812if { (ac_try="$ac_compile"
23813case "(($ac_try" in
23814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23815 *) ac_try_echo=$ac_try;;
23816esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023820 grep -v '^ *+' conftest.er1 >conftest.err
23821 rm -f conftest.er1
23822 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023824 (exit $ac_status); } && {
23825 test -z "$ac_c_werror_flag" ||
23826 test ! -s conftest.err
23827 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023828 ac_header_compiler=yes
23829else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023831sed 's/^/| /' conftest.$ac_ext >&5
23832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023833 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023835
23836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023837{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23838echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023839
23840# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023841{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23842echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023843cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023844/* confdefs.h. */
23845_ACEOF
23846cat confdefs.h >>conftest.$ac_ext
23847cat >>conftest.$ac_ext <<_ACEOF
23848/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023849#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023850_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023851if { (ac_try="$ac_cpp conftest.$ac_ext"
23852case "(($ac_try" in
23853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23854 *) ac_try_echo=$ac_try;;
23855esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023857 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023858 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023859 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023860 rm -f conftest.er1
23861 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023863 (exit $ac_status); } >/dev/null && {
23864 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23865 test ! -s conftest.err
23866 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023867 ac_header_preproc=yes
23868else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023870sed 's/^/| /' conftest.$ac_ext >&5
23871
Martin v. Löwis11437992002-04-12 09:54:03 +000023872 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023874
Martin v. Löwis11437992002-04-12 09:54:03 +000023875rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023876{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23877echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023878
23879# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023880case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23881 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023882 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23883echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23884 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23885echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023886 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023887 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023888 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023889 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23890echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23891 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23892echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23893 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23894echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23895 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23896echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23897 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23898echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23899 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23900echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023901 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023902## -------------------------------------- ##
23903## Report this to http://bugs.python.org/ ##
23904## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023905_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023906 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023907 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023909{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23910echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023911if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023912 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023913else
23914 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023915fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023916{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23917echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023918
23919fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023920if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023921
23922
23923cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023924#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023925_ACEOF
23926
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023927 wchar_h="yes"
23928
Guido van Rossumef2255b2000-03-10 22:30:29 +000023929else
Martin v. Löwis11437992002-04-12 09:54:03 +000023930 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023931
23932fi
23933
Michael W. Hudson54241132001-12-07 15:38:26 +000023934
Martin v. Löwis11437992002-04-12 09:54:03 +000023935
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023936# determine wchar_t size
23937if test "$wchar_h" = yes
23938then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023939 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23940echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23941if test "${ac_cv_type_wchar_t+set}" = set; then
23942 echo $ECHO_N "(cached) $ECHO_C" >&6
23943else
23944 cat >conftest.$ac_ext <<_ACEOF
23945/* confdefs.h. */
23946_ACEOF
23947cat confdefs.h >>conftest.$ac_ext
23948cat >>conftest.$ac_ext <<_ACEOF
23949/* end confdefs.h. */
23950#include <wchar.h>
23951
23952typedef wchar_t ac__type_new_;
23953int
23954main ()
23955{
23956if ((ac__type_new_ *) 0)
23957 return 0;
23958if (sizeof (ac__type_new_))
23959 return 0;
23960 ;
23961 return 0;
23962}
23963_ACEOF
23964rm -f conftest.$ac_objext
23965if { (ac_try="$ac_compile"
23966case "(($ac_try" in
23967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23968 *) ac_try_echo=$ac_try;;
23969esac
23970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23971 (eval "$ac_compile") 2>conftest.er1
23972 ac_status=$?
23973 grep -v '^ *+' conftest.er1 >conftest.err
23974 rm -f conftest.er1
23975 cat conftest.err >&5
23976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23977 (exit $ac_status); } && {
23978 test -z "$ac_c_werror_flag" ||
23979 test ! -s conftest.err
23980 } && test -s conftest.$ac_objext; then
23981 ac_cv_type_wchar_t=yes
23982else
23983 echo "$as_me: failed program was:" >&5
23984sed 's/^/| /' conftest.$ac_ext >&5
23985
23986 ac_cv_type_wchar_t=no
23987fi
23988
23989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23990fi
23991{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23992echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23993
23994# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023995# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23996# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23997# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023998{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23999echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024000if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024001 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024002else
Martin v. Löwis11437992002-04-12 09:54:03 +000024003 if test "$cross_compiling" = yes; then
24004 # Depending upon the size, compute the lo and hi bounds.
24005cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024006/* confdefs.h. */
24007_ACEOF
24008cat confdefs.h >>conftest.$ac_ext
24009cat >>conftest.$ac_ext <<_ACEOF
24010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024011#include <wchar.h>
24012
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024013 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024014int
24015main ()
24016{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024017static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024018test_array [0] = 0
24019
24020 ;
24021 return 0;
24022}
24023_ACEOF
24024rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024025if { (ac_try="$ac_compile"
24026case "(($ac_try" in
24027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24028 *) ac_try_echo=$ac_try;;
24029esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024033 grep -v '^ *+' conftest.er1 >conftest.err
24034 rm -f conftest.er1
24035 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024037 (exit $ac_status); } && {
24038 test -z "$ac_c_werror_flag" ||
24039 test ! -s conftest.err
24040 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024041 ac_lo=0 ac_mid=0
24042 while :; do
24043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024044/* confdefs.h. */
24045_ACEOF
24046cat confdefs.h >>conftest.$ac_ext
24047cat >>conftest.$ac_ext <<_ACEOF
24048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024049#include <wchar.h>
24050
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024051 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024052int
24053main ()
24054{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024055static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024056test_array [0] = 0
24057
24058 ;
24059 return 0;
24060}
24061_ACEOF
24062rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024063if { (ac_try="$ac_compile"
24064case "(($ac_try" in
24065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24066 *) ac_try_echo=$ac_try;;
24067esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024071 grep -v '^ *+' conftest.er1 >conftest.err
24072 rm -f conftest.er1
24073 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024075 (exit $ac_status); } && {
24076 test -z "$ac_c_werror_flag" ||
24077 test ! -s conftest.err
24078 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024079 ac_hi=$ac_mid; break
24080else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024082sed 's/^/| /' conftest.$ac_ext >&5
24083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024084 ac_lo=`expr $ac_mid + 1`
24085 if test $ac_lo -le $ac_mid; then
24086 ac_lo= ac_hi=
24087 break
24088 fi
24089 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024091
24092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024093 done
24094else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024096sed 's/^/| /' conftest.$ac_ext >&5
24097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024099/* confdefs.h. */
24100_ACEOF
24101cat confdefs.h >>conftest.$ac_ext
24102cat >>conftest.$ac_ext <<_ACEOF
24103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024104#include <wchar.h>
24105
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024106 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024107int
24108main ()
24109{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024110static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024111test_array [0] = 0
24112
24113 ;
24114 return 0;
24115}
24116_ACEOF
24117rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024118if { (ac_try="$ac_compile"
24119case "(($ac_try" in
24120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24121 *) ac_try_echo=$ac_try;;
24122esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024126 grep -v '^ *+' conftest.er1 >conftest.err
24127 rm -f conftest.er1
24128 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024130 (exit $ac_status); } && {
24131 test -z "$ac_c_werror_flag" ||
24132 test ! -s conftest.err
24133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024134 ac_hi=-1 ac_mid=-1
24135 while :; do
24136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024137/* confdefs.h. */
24138_ACEOF
24139cat confdefs.h >>conftest.$ac_ext
24140cat >>conftest.$ac_ext <<_ACEOF
24141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024142#include <wchar.h>
24143
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024144 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024145int
24146main ()
24147{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024148static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024149test_array [0] = 0
24150
24151 ;
24152 return 0;
24153}
24154_ACEOF
24155rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024156if { (ac_try="$ac_compile"
24157case "(($ac_try" in
24158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24159 *) ac_try_echo=$ac_try;;
24160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024164 grep -v '^ *+' conftest.er1 >conftest.err
24165 rm -f conftest.er1
24166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024168 (exit $ac_status); } && {
24169 test -z "$ac_c_werror_flag" ||
24170 test ! -s conftest.err
24171 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024172 ac_lo=$ac_mid; break
24173else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024175sed 's/^/| /' conftest.$ac_ext >&5
24176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024177 ac_hi=`expr '(' $ac_mid ')' - 1`
24178 if test $ac_mid -le $ac_hi; then
24179 ac_lo= ac_hi=
24180 break
24181 fi
24182 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024184
24185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024186 done
24187else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024189sed 's/^/| /' conftest.$ac_ext >&5
24190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024191 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024193
24194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024196
24197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024198# Binary search between lo and hi bounds.
24199while test "x$ac_lo" != "x$ac_hi"; do
24200 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24201 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024202/* confdefs.h. */
24203_ACEOF
24204cat confdefs.h >>conftest.$ac_ext
24205cat >>conftest.$ac_ext <<_ACEOF
24206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024207#include <wchar.h>
24208
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024209 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024210int
24211main ()
24212{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024214test_array [0] = 0
24215
24216 ;
24217 return 0;
24218}
24219_ACEOF
24220rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024221if { (ac_try="$ac_compile"
24222case "(($ac_try" in
24223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24224 *) ac_try_echo=$ac_try;;
24225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024229 grep -v '^ *+' conftest.er1 >conftest.err
24230 rm -f conftest.er1
24231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024233 (exit $ac_status); } && {
24234 test -z "$ac_c_werror_flag" ||
24235 test ! -s conftest.err
24236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024237 ac_hi=$ac_mid
24238else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024240sed 's/^/| /' conftest.$ac_ext >&5
24241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024242 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024244
24245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024246done
24247case $ac_lo in
24248?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024249'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024250 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024251See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024252echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024253See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024254 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024255 else
24256 ac_cv_sizeof_wchar_t=0
24257 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024258esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024259else
Martin v. Löwis11437992002-04-12 09:54:03 +000024260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024261/* confdefs.h. */
24262_ACEOF
24263cat confdefs.h >>conftest.$ac_ext
24264cat >>conftest.$ac_ext <<_ACEOF
24265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024266#include <wchar.h>
24267
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024268 typedef wchar_t ac__type_sizeof_;
24269static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24270static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024271#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024272#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024273int
24274main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024275{
Martin v. Löwis11437992002-04-12 09:54:03 +000024276
24277 FILE *f = fopen ("conftest.val", "w");
24278 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024279 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024280 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024281 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024282 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024283 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024284 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024285 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024286 }
24287 else
24288 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024289 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024290 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024291 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024292 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024293 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024294 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024295
24296 ;
24297 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024298}
Martin v. Löwis11437992002-04-12 09:54:03 +000024299_ACEOF
24300rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024301if { (ac_try="$ac_link"
24302case "(($ac_try" in
24303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24304 *) ac_try_echo=$ac_try;;
24305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024307 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024308 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024310 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024311 { (case "(($ac_try" in
24312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24313 *) ac_try_echo=$ac_try;;
24314esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024316 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024317 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024319 (exit $ac_status); }; }; then
24320 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024321else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024322 echo "$as_me: program exited with status $ac_status" >&5
24323echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024324sed 's/^/| /' conftest.$ac_ext >&5
24325
Martin v. Löwis11437992002-04-12 09:54:03 +000024326( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024327if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024328 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024329See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024330echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024331See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024332 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024333 else
24334 ac_cv_sizeof_wchar_t=0
24335 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024337rm -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 +000024338fi
24339rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024340fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024341{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24342echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024343
24344
24345
Martin v. Löwis11437992002-04-12 09:54:03 +000024346cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024347#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024348_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024349
Michael W. Hudson54241132001-12-07 15:38:26 +000024350
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024351fi
24352
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024353{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24354echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024355have_ucs4_tcl=no
24356cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024357/* confdefs.h. */
24358_ACEOF
24359cat confdefs.h >>conftest.$ac_ext
24360cat >>conftest.$ac_ext <<_ACEOF
24361/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024362
24363#include <tcl.h>
24364#if TCL_UTF_MAX != 6
24365# error "NOT UCS4_TCL"
24366#endif
24367int
24368main ()
24369{
24370
24371 ;
24372 return 0;
24373}
24374_ACEOF
24375rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024376if { (ac_try="$ac_compile"
24377case "(($ac_try" in
24378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24379 *) ac_try_echo=$ac_try;;
24380esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024384 grep -v '^ *+' conftest.er1 >conftest.err
24385 rm -f conftest.er1
24386 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024388 (exit $ac_status); } && {
24389 test -z "$ac_c_werror_flag" ||
24390 test ! -s conftest.err
24391 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024392
24393
24394cat >>confdefs.h <<\_ACEOF
24395#define HAVE_UCS4_TCL 1
24396_ACEOF
24397
24398 have_ucs4_tcl=yes
24399
24400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024402sed 's/^/| /' conftest.$ac_ext >&5
24403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024404
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024406
24407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024408{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24409echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024410
Skip Montanaro6dead952003-09-25 14:50:04 +000024411# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024412if test "$wchar_h" = yes
24413then
24414 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024415 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24416echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024417 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024418 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024419else
24420
24421 if test "$cross_compiling" = yes; then
24422 ac_cv_wchar_t_signed=yes
24423else
24424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024425/* confdefs.h. */
24426_ACEOF
24427cat confdefs.h >>conftest.$ac_ext
24428cat >>conftest.$ac_ext <<_ACEOF
24429/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024430
24431 #include <wchar.h>
24432 int main()
24433 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024434 /* Success: exit code 0 */
24435 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024436 }
24437
24438_ACEOF
24439rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024440if { (ac_try="$ac_link"
24441case "(($ac_try" in
24442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24443 *) ac_try_echo=$ac_try;;
24444esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024446 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024447 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024450 { (case "(($ac_try" in
24451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24452 *) ac_try_echo=$ac_try;;
24453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024455 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024456 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024458 (exit $ac_status); }; }; then
24459 ac_cv_wchar_t_signed=yes
24460else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024461 echo "$as_me: program exited with status $ac_status" >&5
24462echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024463sed 's/^/| /' conftest.$ac_ext >&5
24464
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024465( exit $ac_status )
24466ac_cv_wchar_t_signed=no
24467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024468rm -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 +000024469fi
24470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024471
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024472fi
24473
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024474 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24475echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024476fi
24477
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024478{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24479echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024480
24481# Check whether --with-wide-unicode was given.
24482if test "${with_wide_unicode+set}" = set; then
24483 withval=$with_wide_unicode;
24484if test "$withval" != no
24485then unicode_size="4"
24486else unicode_size="2"
24487fi
24488
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024489else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024490
Georg Brandl52d168a2008-01-07 18:10:24 +000024491case "$have_ucs4_tcl" in
24492 yes) unicode_size="4" ;;
24493 *) unicode_size="2" ;;
24494esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024495
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024496fi
24497
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024498
24499
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024500
Georg Brandl52d168a2008-01-07 18:10:24 +000024501case "$unicode_size" in
24502 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024503#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024504_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024505 ;;
24506 *) cat >>confdefs.h <<\_ACEOF
24507#define Py_UNICODE_SIZE 2
24508_ACEOF
24509 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024510esac
24511
Michael W. Hudson54241132001-12-07 15:38:26 +000024512
Martin v. Löwis11437992002-04-12 09:54:03 +000024513
24514
Georg Brandl52d168a2008-01-07 18:10:24 +000024515# wchar_t is only usable if it maps to an unsigned type
24516if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024517 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024518then
24519 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024520
Martin v. Löwis11437992002-04-12 09:54:03 +000024521cat >>confdefs.h <<\_ACEOF
24522#define HAVE_USABLE_WCHAR_T 1
24523_ACEOF
24524
Georg Brandl52d168a2008-01-07 18:10:24 +000024525 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024526#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024527_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024528
Georg Brandl52d168a2008-01-07 18:10:24 +000024529elif test "$ac_cv_sizeof_short" = "$unicode_size"
24530then
24531 PY_UNICODE_TYPE="unsigned short"
24532 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024533#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024534_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024535
Georg Brandl52d168a2008-01-07 18:10:24 +000024536elif test "$ac_cv_sizeof_long" = "$unicode_size"
24537then
24538 PY_UNICODE_TYPE="unsigned long"
24539 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024540#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024541_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024542
Georg Brandl52d168a2008-01-07 18:10:24 +000024543else
24544 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024545fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024546{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24547echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024548
24549# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024550{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24551echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024552if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024553 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024554else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024555 # See if sys/param.h defines the BYTE_ORDER macro.
24556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024557/* confdefs.h. */
24558_ACEOF
24559cat confdefs.h >>conftest.$ac_ext
24560cat >>conftest.$ac_ext <<_ACEOF
24561/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024562#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024563#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024564
Martin v. Löwis11437992002-04-12 09:54:03 +000024565int
24566main ()
24567{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024568#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24569 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24570 bogus endian macros
24571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024572
24573 ;
24574 return 0;
24575}
24576_ACEOF
24577rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024578if { (ac_try="$ac_compile"
24579case "(($ac_try" in
24580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24581 *) ac_try_echo=$ac_try;;
24582esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024586 grep -v '^ *+' conftest.er1 >conftest.err
24587 rm -f conftest.er1
24588 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024590 (exit $ac_status); } && {
24591 test -z "$ac_c_werror_flag" ||
24592 test ! -s conftest.err
24593 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024594 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024596/* confdefs.h. */
24597_ACEOF
24598cat confdefs.h >>conftest.$ac_ext
24599cat >>conftest.$ac_ext <<_ACEOF
24600/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024601#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024602#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024603
Martin v. Löwis11437992002-04-12 09:54:03 +000024604int
24605main ()
24606{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024607#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024608 not big endian
24609#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024610
24611 ;
24612 return 0;
24613}
24614_ACEOF
24615rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024616if { (ac_try="$ac_compile"
24617case "(($ac_try" in
24618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24619 *) ac_try_echo=$ac_try;;
24620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024624 grep -v '^ *+' conftest.er1 >conftest.err
24625 rm -f conftest.er1
24626 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024628 (exit $ac_status); } && {
24629 test -z "$ac_c_werror_flag" ||
24630 test ! -s conftest.err
24631 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024632 ac_cv_c_bigendian=yes
24633else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024635sed 's/^/| /' conftest.$ac_ext >&5
24636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024637 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024639
24640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024641else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024643sed 's/^/| /' conftest.$ac_ext >&5
24644
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024645 # It does not; compile a test program.
24646if test "$cross_compiling" = yes; then
24647 # try to guess the endianness by grepping values into an object file
24648 ac_cv_c_bigendian=unknown
24649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024650/* confdefs.h. */
24651_ACEOF
24652cat confdefs.h >>conftest.$ac_ext
24653cat >>conftest.$ac_ext <<_ACEOF
24654/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024655short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24656short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24657void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24658short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24659short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24660void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024661int
24662main ()
24663{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024664 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024665 ;
24666 return 0;
24667}
24668_ACEOF
24669rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024670if { (ac_try="$ac_compile"
24671case "(($ac_try" in
24672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24673 *) ac_try_echo=$ac_try;;
24674esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024678 grep -v '^ *+' conftest.er1 >conftest.err
24679 rm -f conftest.er1
24680 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024682 (exit $ac_status); } && {
24683 test -z "$ac_c_werror_flag" ||
24684 test ! -s conftest.err
24685 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024686 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024687 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024689if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24690 if test "$ac_cv_c_bigendian" = unknown; then
24691 ac_cv_c_bigendian=no
24692 else
24693 # finding both strings is unlikely to happen, but who knows?
24694 ac_cv_c_bigendian=unknown
24695 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024696fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024699sed 's/^/| /' conftest.$ac_ext >&5
24700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024701
Martin v. Löwis11437992002-04-12 09:54:03 +000024702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024703
24704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024705else
24706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024707/* confdefs.h. */
24708_ACEOF
24709cat confdefs.h >>conftest.$ac_ext
24710cat >>conftest.$ac_ext <<_ACEOF
24711/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024712$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024713int
24714main ()
24715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024716
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024717 /* Are we little or big endian? From Harbison&Steele. */
24718 union
24719 {
24720 long int l;
24721 char c[sizeof (long int)];
24722 } u;
24723 u.l = 1;
24724 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024725
24726 ;
24727 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024728}
Martin v. Löwis11437992002-04-12 09:54:03 +000024729_ACEOF
24730rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024731if { (ac_try="$ac_link"
24732case "(($ac_try" in
24733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24734 *) ac_try_echo=$ac_try;;
24735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024737 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024738 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024740 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024741 { (case "(($ac_try" in
24742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24743 *) ac_try_echo=$ac_try;;
24744esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024746 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024747 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024749 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024750 ac_cv_c_bigendian=no
24751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024752 echo "$as_me: program exited with status $ac_status" >&5
24753echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024754sed 's/^/| /' conftest.$ac_ext >&5
24755
Martin v. Löwis11437992002-04-12 09:54:03 +000024756( exit $ac_status )
24757ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024759rm -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 +000024760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024761
24762
Martin v. Löwis11437992002-04-12 09:54:03 +000024763fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024764
24765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24766fi
24767{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24768echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24769case $ac_cv_c_bigendian in
24770 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024771
24772cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024773#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024774_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024775 ;;
24776 no)
24777 ;;
24778 *)
24779 { { echo "$as_me:$LINENO: error: unknown endianness
24780presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24781echo "$as_me: error: unknown endianness
24782presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024783 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024784esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024785
Michael W. Hudson54241132001-12-07 15:38:26 +000024786
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024787# Check whether right shifting a negative integer extends the sign bit
24788# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024789{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24790echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024791if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024792 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024793else
Martin v. Löwis11437992002-04-12 09:54:03 +000024794
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024795if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024796 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024797else
Martin v. Löwis11437992002-04-12 09:54:03 +000024798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024799/* confdefs.h. */
24800_ACEOF
24801cat confdefs.h >>conftest.$ac_ext
24802cat >>conftest.$ac_ext <<_ACEOF
24803/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024804
24805int main()
24806{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024807 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024808}
24809
Martin v. Löwis11437992002-04-12 09:54:03 +000024810_ACEOF
24811rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024812if { (ac_try="$ac_link"
24813case "(($ac_try" in
24814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24815 *) ac_try_echo=$ac_try;;
24816esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024818 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024819 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024822 { (case "(($ac_try" in
24823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24824 *) ac_try_echo=$ac_try;;
24825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024827 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024828 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024830 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024831 ac_cv_rshift_extends_sign=yes
24832else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024833 echo "$as_me: program exited with status $ac_status" >&5
24834echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024835sed 's/^/| /' conftest.$ac_ext >&5
24836
Martin v. Löwis11437992002-04-12 09:54:03 +000024837( exit $ac_status )
24838ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024840rm -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 +000024841fi
24842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024843
24844fi
24845
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024846{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24847echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024848if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024849then
Martin v. Löwis11437992002-04-12 09:54:03 +000024850
24851cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024852#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024853_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024854
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024855fi
24856
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024857# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024858{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24859echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024860if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024861 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024862else
Martin v. Löwis11437992002-04-12 09:54:03 +000024863
24864cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024865/* confdefs.h. */
24866_ACEOF
24867cat confdefs.h >>conftest.$ac_ext
24868cat >>conftest.$ac_ext <<_ACEOF
24869/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024870#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024871int
24872main ()
24873{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024874
24875 FILE *f = fopen("/dev/null", "r");
24876 flockfile(f);
24877 getc_unlocked(f);
24878 funlockfile(f);
24879
Martin v. Löwis11437992002-04-12 09:54:03 +000024880 ;
24881 return 0;
24882}
24883_ACEOF
24884rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024885if { (ac_try="$ac_link"
24886case "(($ac_try" in
24887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24888 *) ac_try_echo=$ac_try;;
24889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024891 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024893 grep -v '^ *+' conftest.er1 >conftest.err
24894 rm -f conftest.er1
24895 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024897 (exit $ac_status); } && {
24898 test -z "$ac_c_werror_flag" ||
24899 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024900 } && test -s conftest$ac_exeext &&
24901 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024902 ac_cv_have_getc_unlocked=yes
24903else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024905sed 's/^/| /' conftest.$ac_ext >&5
24906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024907 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024909
24910rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024911 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024912fi
24913
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024914{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24915echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024916if test "$ac_cv_have_getc_unlocked" = yes
24917then
Martin v. Löwis11437992002-04-12 09:54:03 +000024918
24919cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024920#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024921_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024922
24923fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024924
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024925# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024926# save the value of LIBS so we don't actually link Python with readline
24927LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024928
Gregory P. Smith18820942008-09-07 06:24:49 +000024929# On some systems we need to link readline to a termcap compatible
24930# library. NOTE: Keep the precedence of listed libraries synchronised
24931# with setup.py.
24932py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024933{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24934echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024935for py_libtermcap in "" ncursesw ncurses curses termcap; do
24936 if test -z "$py_libtermcap"; then
24937 READLINE_LIBS="-lreadline"
24938 else
24939 READLINE_LIBS="-lreadline -l$py_libtermcap"
24940 fi
24941 LIBS="$READLINE_LIBS $LIBS_no_readline"
24942 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024943/* confdefs.h. */
24944_ACEOF
24945cat confdefs.h >>conftest.$ac_ext
24946cat >>conftest.$ac_ext <<_ACEOF
24947/* end confdefs.h. */
24948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024949/* Override any GCC internal prototype to avoid an error.
24950 Use char because int might match the return type of a GCC
24951 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024952#ifdef __cplusplus
24953extern "C"
24954#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024955char readline ();
24956int
24957main ()
24958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024959return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024960 ;
24961 return 0;
24962}
24963_ACEOF
24964rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024965if { (ac_try="$ac_link"
24966case "(($ac_try" in
24967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24968 *) ac_try_echo=$ac_try;;
24969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024971 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024972 ac_status=$?
24973 grep -v '^ *+' conftest.er1 >conftest.err
24974 rm -f conftest.er1
24975 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024977 (exit $ac_status); } && {
24978 test -z "$ac_c_werror_flag" ||
24979 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024980 } && test -s conftest$ac_exeext &&
24981 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024982 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024983else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024984 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024985sed 's/^/| /' conftest.$ac_ext >&5
24986
Gregory P. Smith18820942008-09-07 06:24:49 +000024987
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024989
24990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024991 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024992 if test $py_cv_lib_readline = yes; then
24993 break
24994 fi
24995done
24996# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24997#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024998if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024999 { echo "$as_me:$LINENO: result: none" >&5
25000echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025001else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025002 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25003echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025004
25005cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025006#define HAVE_LIBREADLINE 1
25007_ACEOF
25008
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025009fi
25010
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025011# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025012{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25013echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025014if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025015 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025016else
25017 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025018LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025019cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025020/* confdefs.h. */
25021_ACEOF
25022cat confdefs.h >>conftest.$ac_ext
25023cat >>conftest.$ac_ext <<_ACEOF
25024/* end confdefs.h. */
25025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025026/* Override any GCC internal prototype to avoid an error.
25027 Use char because int might match the return type of a GCC
25028 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025029#ifdef __cplusplus
25030extern "C"
25031#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025032char rl_callback_handler_install ();
25033int
25034main ()
25035{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025036return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025037 ;
25038 return 0;
25039}
25040_ACEOF
25041rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025042if { (ac_try="$ac_link"
25043case "(($ac_try" in
25044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25045 *) ac_try_echo=$ac_try;;
25046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025048 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025050 grep -v '^ *+' conftest.er1 >conftest.err
25051 rm -f conftest.er1
25052 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025054 (exit $ac_status); } && {
25055 test -z "$ac_c_werror_flag" ||
25056 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025057 } && test -s conftest$ac_exeext &&
25058 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025059 ac_cv_lib_readline_rl_callback_handler_install=yes
25060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025061 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025062sed 's/^/| /' conftest.$ac_ext >&5
25063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025064 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025066
25067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025068 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025069LIBS=$ac_check_lib_save_LIBS
25070fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025071{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25072echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25073if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025074
25075cat >>confdefs.h <<\_ACEOF
25076#define HAVE_RL_CALLBACK 1
25077_ACEOF
25078
25079fi
25080
25081
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025082# check for readline 2.2
25083cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025084/* confdefs.h. */
25085_ACEOF
25086cat confdefs.h >>conftest.$ac_ext
25087cat >>conftest.$ac_ext <<_ACEOF
25088/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025089#include <readline/readline.h>
25090_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025091if { (ac_try="$ac_cpp conftest.$ac_ext"
25092case "(($ac_try" in
25093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25094 *) ac_try_echo=$ac_try;;
25095esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025097 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025098 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025099 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025100 rm -f conftest.er1
25101 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025103 (exit $ac_status); } >/dev/null && {
25104 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25105 test ! -s conftest.err
25106 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025107 have_readline=yes
25108else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025110sed 's/^/| /' conftest.$ac_ext >&5
25111
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025112 have_readline=no
25113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025114
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025115rm -f conftest.err conftest.$ac_ext
25116if test $have_readline = yes
25117then
25118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025119/* confdefs.h. */
25120_ACEOF
25121cat confdefs.h >>conftest.$ac_ext
25122cat >>conftest.$ac_ext <<_ACEOF
25123/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025124#include <readline/readline.h>
25125
25126_ACEOF
25127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025128 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025129
25130cat >>confdefs.h <<\_ACEOF
25131#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25132_ACEOF
25133
25134fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000025135rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025136
Antoine Pitroud5131772009-10-26 19:22:14 +000025137 cat >conftest.$ac_ext <<_ACEOF
25138/* confdefs.h. */
25139_ACEOF
25140cat confdefs.h >>conftest.$ac_ext
25141cat >>conftest.$ac_ext <<_ACEOF
25142/* end confdefs.h. */
25143#include <readline/readline.h>
25144
25145_ACEOF
25146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25147 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25148
25149cat >>confdefs.h <<\_ACEOF
25150#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25151_ACEOF
25152
25153fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000025154rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025155
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025156fi
25157
Martin v. Löwis0daad592001-09-30 21:09:59 +000025158# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025159{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25160echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025161if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025162 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025163else
Martin v. Löwis11437992002-04-12 09:54:03 +000025164 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025165LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025166cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025167/* confdefs.h. */
25168_ACEOF
25169cat confdefs.h >>conftest.$ac_ext
25170cat >>conftest.$ac_ext <<_ACEOF
25171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025173/* Override any GCC internal prototype to avoid an error.
25174 Use char because int might match the return type of a GCC
25175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025176#ifdef __cplusplus
25177extern "C"
25178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025179char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025180int
25181main ()
25182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025183return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025184 ;
25185 return 0;
25186}
25187_ACEOF
25188rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025189if { (ac_try="$ac_link"
25190case "(($ac_try" in
25191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25192 *) ac_try_echo=$ac_try;;
25193esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025195 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025197 grep -v '^ *+' conftest.er1 >conftest.err
25198 rm -f conftest.er1
25199 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025201 (exit $ac_status); } && {
25202 test -z "$ac_c_werror_flag" ||
25203 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025204 } && test -s conftest$ac_exeext &&
25205 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025206 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025209sed 's/^/| /' conftest.$ac_ext >&5
25210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025211 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025213
25214rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025216LIBS=$ac_check_lib_save_LIBS
25217fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025218{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25219echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25220if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025221
Martin v. Löwis11437992002-04-12 09:54:03 +000025222cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025223#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025224_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025225
Martin v. Löwis0daad592001-09-30 21:09:59 +000025226fi
25227
Michael W. Hudson54241132001-12-07 15:38:26 +000025228
Thomas Wouters89d996e2007-09-08 17:39:28 +000025229# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025230{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25231echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025232if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025233 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025234else
25235 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025236LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025237cat >conftest.$ac_ext <<_ACEOF
25238/* confdefs.h. */
25239_ACEOF
25240cat confdefs.h >>conftest.$ac_ext
25241cat >>conftest.$ac_ext <<_ACEOF
25242/* end confdefs.h. */
25243
25244/* Override any GCC internal prototype to avoid an error.
25245 Use char because int might match the return type of a GCC
25246 builtin and then its argument prototype would still apply. */
25247#ifdef __cplusplus
25248extern "C"
25249#endif
25250char rl_completion_display_matches_hook ();
25251int
25252main ()
25253{
25254return rl_completion_display_matches_hook ();
25255 ;
25256 return 0;
25257}
25258_ACEOF
25259rm -f conftest.$ac_objext conftest$ac_exeext
25260if { (ac_try="$ac_link"
25261case "(($ac_try" in
25262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25263 *) ac_try_echo=$ac_try;;
25264esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025266 (eval "$ac_link") 2>conftest.er1
25267 ac_status=$?
25268 grep -v '^ *+' conftest.er1 >conftest.err
25269 rm -f conftest.er1
25270 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025272 (exit $ac_status); } && {
25273 test -z "$ac_c_werror_flag" ||
25274 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025275 } && test -s conftest$ac_exeext &&
25276 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025277 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25278else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025279 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025280sed 's/^/| /' conftest.$ac_ext >&5
25281
25282 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25283fi
25284
25285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25286 conftest$ac_exeext conftest.$ac_ext
25287LIBS=$ac_check_lib_save_LIBS
25288fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025289{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25290echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25291if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025292
25293cat >>confdefs.h <<\_ACEOF
25294#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25295_ACEOF
25296
25297fi
25298
25299
Martin v. Löwis0daad592001-09-30 21:09:59 +000025300# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025301{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25302echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025303if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025304 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025305else
Martin v. Löwis11437992002-04-12 09:54:03 +000025306 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025307LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025309/* confdefs.h. */
25310_ACEOF
25311cat confdefs.h >>conftest.$ac_ext
25312cat >>conftest.$ac_ext <<_ACEOF
25313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025315/* Override any GCC internal prototype to avoid an error.
25316 Use char because int might match the return type of a GCC
25317 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025318#ifdef __cplusplus
25319extern "C"
25320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025321char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025322int
25323main ()
25324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025325return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025326 ;
25327 return 0;
25328}
25329_ACEOF
25330rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025331if { (ac_try="$ac_link"
25332case "(($ac_try" in
25333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25334 *) ac_try_echo=$ac_try;;
25335esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025339 grep -v '^ *+' conftest.er1 >conftest.err
25340 rm -f conftest.er1
25341 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025343 (exit $ac_status); } && {
25344 test -z "$ac_c_werror_flag" ||
25345 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025346 } && test -s conftest$ac_exeext &&
25347 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025348 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025349else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025351sed 's/^/| /' conftest.$ac_ext >&5
25352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025353 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025355
25356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025358LIBS=$ac_check_lib_save_LIBS
25359fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025360{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25361echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25362if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025363
Martin v. Löwis11437992002-04-12 09:54:03 +000025364cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025365#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025366_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025367
Guido van Rossum353ae582001-07-10 16:45:32 +000025368fi
25369
Jack Jansendd19cf82001-12-06 22:36:17 +000025370
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025371# also in readline 4.2
25372cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025373/* confdefs.h. */
25374_ACEOF
25375cat confdefs.h >>conftest.$ac_ext
25376cat >>conftest.$ac_ext <<_ACEOF
25377/* end confdefs.h. */
25378#include <readline/readline.h>
25379_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025380if { (ac_try="$ac_cpp conftest.$ac_ext"
25381case "(($ac_try" in
25382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25383 *) ac_try_echo=$ac_try;;
25384esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025386 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025387 ac_status=$?
25388 grep -v '^ *+' conftest.er1 >conftest.err
25389 rm -f conftest.er1
25390 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025392 (exit $ac_status); } >/dev/null && {
25393 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25394 test ! -s conftest.err
25395 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025396 have_readline=yes
25397else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025398 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025399sed 's/^/| /' conftest.$ac_ext >&5
25400
25401 have_readline=no
25402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025403
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025404rm -f conftest.err conftest.$ac_ext
25405if test $have_readline = yes
25406then
25407 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025408/* confdefs.h. */
25409_ACEOF
25410cat confdefs.h >>conftest.$ac_ext
25411cat >>conftest.$ac_ext <<_ACEOF
25412/* end confdefs.h. */
25413#include <readline/readline.h>
25414
25415_ACEOF
25416if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25417 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25418
25419cat >>confdefs.h <<\_ACEOF
25420#define HAVE_RL_CATCH_SIGNAL 1
25421_ACEOF
25422
25423fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000025424rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025425
25426fi
25427
Martin v. Löwis82bca632006-02-10 20:49:30 +000025428# End of readline checks: restore LIBS
25429LIBS=$LIBS_no_readline
25430
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025431{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25432echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025433if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025434 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025435else
Martin v. Löwis11437992002-04-12 09:54:03 +000025436
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025437if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025438 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025439else
Martin v. Löwis11437992002-04-12 09:54:03 +000025440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025441/* confdefs.h. */
25442_ACEOF
25443cat confdefs.h >>conftest.$ac_ext
25444cat >>conftest.$ac_ext <<_ACEOF
25445/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025446
25447int main()
25448{
25449 int val1 = nice(1);
25450 if (val1 != -1 && val1 == nice(2))
25451 exit(0);
25452 exit(1);
25453}
25454
Martin v. Löwis11437992002-04-12 09:54:03 +000025455_ACEOF
25456rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025457if { (ac_try="$ac_link"
25458case "(($ac_try" in
25459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25460 *) ac_try_echo=$ac_try;;
25461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025463 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025464 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025466 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025467 { (case "(($ac_try" in
25468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25469 *) ac_try_echo=$ac_try;;
25470esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025472 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025473 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025475 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025476 ac_cv_broken_nice=yes
25477else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025478 echo "$as_me: program exited with status $ac_status" >&5
25479echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025480sed 's/^/| /' conftest.$ac_ext >&5
25481
Martin v. Löwis11437992002-04-12 09:54:03 +000025482( exit $ac_status )
25483ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025485rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025486fi
25487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025488
25489fi
25490
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025491{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25492echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025493if test "$ac_cv_broken_nice" = yes
25494then
Martin v. Löwis11437992002-04-12 09:54:03 +000025495
25496cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025497#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025498_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025499
25500fi
25501
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025502{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25503echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025504if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025505 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025506else
25507 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025508 ac_cv_broken_poll=no
25509else
25510 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025511/* confdefs.h. */
25512_ACEOF
25513cat confdefs.h >>conftest.$ac_ext
25514cat >>conftest.$ac_ext <<_ACEOF
25515/* end confdefs.h. */
25516
25517#include <poll.h>
25518
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025519int main()
25520{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025521 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025522 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025523
25524 close (42);
25525
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025526 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025527 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025528 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025529 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025530 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025531 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025532 return 1;
25533}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025534
25535_ACEOF
25536rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025537if { (ac_try="$ac_link"
25538case "(($ac_try" in
25539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25540 *) ac_try_echo=$ac_try;;
25541esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025543 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025544 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025546 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025547 { (case "(($ac_try" in
25548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25549 *) ac_try_echo=$ac_try;;
25550esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025552 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025553 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025555 (exit $ac_status); }; }; then
25556 ac_cv_broken_poll=yes
25557else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025558 echo "$as_me: program exited with status $ac_status" >&5
25559echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025560sed 's/^/| /' conftest.$ac_ext >&5
25561
25562( exit $ac_status )
25563ac_cv_broken_poll=no
25564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025565rm -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 +000025566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025567
25568
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025569fi
25570
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025571{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25572echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025573if test "$ac_cv_broken_poll" = yes
25574then
25575
25576cat >>confdefs.h <<\_ACEOF
25577#define HAVE_BROKEN_POLL 1
25578_ACEOF
25579
25580fi
25581
Brett Cannon43802422005-02-10 20:48:03 +000025582# 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 +000025583# (which is not required by ISO C or UNIX spec) and/or if we support
25584# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025585{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25586echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025587if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025588 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025589else
25590 cat >conftest.$ac_ext <<_ACEOF
25591/* confdefs.h. */
25592_ACEOF
25593cat confdefs.h >>conftest.$ac_ext
25594cat >>conftest.$ac_ext <<_ACEOF
25595/* end confdefs.h. */
25596#include <sys/types.h>
25597#include <$ac_cv_struct_tm>
25598
25599
25600int
25601main ()
25602{
25603static struct tm ac_aggr;
25604if (ac_aggr.tm_zone)
25605return 0;
25606 ;
25607 return 0;
25608}
25609_ACEOF
25610rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025611if { (ac_try="$ac_compile"
25612case "(($ac_try" in
25613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25614 *) ac_try_echo=$ac_try;;
25615esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025617 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025618 ac_status=$?
25619 grep -v '^ *+' conftest.er1 >conftest.err
25620 rm -f conftest.er1
25621 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025623 (exit $ac_status); } && {
25624 test -z "$ac_c_werror_flag" ||
25625 test ! -s conftest.err
25626 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025627 ac_cv_member_struct_tm_tm_zone=yes
25628else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025629 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025630sed 's/^/| /' conftest.$ac_ext >&5
25631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025632 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025633/* confdefs.h. */
25634_ACEOF
25635cat confdefs.h >>conftest.$ac_ext
25636cat >>conftest.$ac_ext <<_ACEOF
25637/* end confdefs.h. */
25638#include <sys/types.h>
25639#include <$ac_cv_struct_tm>
25640
25641
25642int
25643main ()
25644{
25645static struct tm ac_aggr;
25646if (sizeof ac_aggr.tm_zone)
25647return 0;
25648 ;
25649 return 0;
25650}
25651_ACEOF
25652rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025653if { (ac_try="$ac_compile"
25654case "(($ac_try" in
25655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25656 *) ac_try_echo=$ac_try;;
25657esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025659 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025660 ac_status=$?
25661 grep -v '^ *+' conftest.er1 >conftest.err
25662 rm -f conftest.er1
25663 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025665 (exit $ac_status); } && {
25666 test -z "$ac_c_werror_flag" ||
25667 test ! -s conftest.err
25668 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025669 ac_cv_member_struct_tm_tm_zone=yes
25670else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025671 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025672sed 's/^/| /' conftest.$ac_ext >&5
25673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025674 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025676
25677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025679
25680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025681fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025682{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25683echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25684if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025685
25686cat >>confdefs.h <<_ACEOF
25687#define HAVE_STRUCT_TM_TM_ZONE 1
25688_ACEOF
25689
25690
25691fi
25692
25693if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25694
25695cat >>confdefs.h <<\_ACEOF
25696#define HAVE_TM_ZONE 1
25697_ACEOF
25698
25699else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025700 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25701echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025702if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025703 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025704else
25705 cat >conftest.$ac_ext <<_ACEOF
25706/* confdefs.h. */
25707_ACEOF
25708cat confdefs.h >>conftest.$ac_ext
25709cat >>conftest.$ac_ext <<_ACEOF
25710/* end confdefs.h. */
25711#include <time.h>
25712
25713int
25714main ()
25715{
25716#ifndef tzname
25717 (void) tzname;
25718#endif
25719
25720 ;
25721 return 0;
25722}
25723_ACEOF
25724rm -f conftest.$ac_objext
25725if { (ac_try="$ac_compile"
25726case "(($ac_try" in
25727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25728 *) ac_try_echo=$ac_try;;
25729esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025731 (eval "$ac_compile") 2>conftest.er1
25732 ac_status=$?
25733 grep -v '^ *+' conftest.er1 >conftest.err
25734 rm -f conftest.er1
25735 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025737 (exit $ac_status); } && {
25738 test -z "$ac_c_werror_flag" ||
25739 test ! -s conftest.err
25740 } && test -s conftest.$ac_objext; then
25741 ac_cv_have_decl_tzname=yes
25742else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025743 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025744sed 's/^/| /' conftest.$ac_ext >&5
25745
25746 ac_cv_have_decl_tzname=no
25747fi
25748
25749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25750fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025751{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25752echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25753if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025754
25755cat >>confdefs.h <<_ACEOF
25756#define HAVE_DECL_TZNAME 1
25757_ACEOF
25758
25759
25760else
25761 cat >>confdefs.h <<_ACEOF
25762#define HAVE_DECL_TZNAME 0
25763_ACEOF
25764
25765
25766fi
25767
25768
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025769 { echo "$as_me:$LINENO: checking for tzname" >&5
25770echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025771if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025772 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025773else
25774 cat >conftest.$ac_ext <<_ACEOF
25775/* confdefs.h. */
25776_ACEOF
25777cat confdefs.h >>conftest.$ac_ext
25778cat >>conftest.$ac_ext <<_ACEOF
25779/* end confdefs.h. */
25780#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025781#if !HAVE_DECL_TZNAME
25782extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025783#endif
25784
25785int
25786main ()
25787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025788return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025789 ;
25790 return 0;
25791}
25792_ACEOF
25793rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025794if { (ac_try="$ac_link"
25795case "(($ac_try" in
25796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25797 *) ac_try_echo=$ac_try;;
25798esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025800 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025801 ac_status=$?
25802 grep -v '^ *+' conftest.er1 >conftest.err
25803 rm -f conftest.er1
25804 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025806 (exit $ac_status); } && {
25807 test -z "$ac_c_werror_flag" ||
25808 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025809 } && test -s conftest$ac_exeext &&
25810 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025811 ac_cv_var_tzname=yes
25812else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025813 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025814sed 's/^/| /' conftest.$ac_ext >&5
25815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025816 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025818
25819rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025820 conftest$ac_exeext conftest.$ac_ext
25821fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025822{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25823echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025824 if test $ac_cv_var_tzname = yes; then
25825
25826cat >>confdefs.h <<\_ACEOF
25827#define HAVE_TZNAME 1
25828_ACEOF
25829
25830 fi
25831fi
25832
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025833
Martin v. Löwis1d459062005-03-14 21:23:33 +000025834# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025835{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25836echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025837if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025838 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025839else
25840
25841if test "$cross_compiling" = yes; then
25842 ac_cv_working_tzset=no
25843else
25844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025845/* confdefs.h. */
25846_ACEOF
25847cat confdefs.h >>conftest.$ac_ext
25848cat >>conftest.$ac_ext <<_ACEOF
25849/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025850
25851#include <stdlib.h>
25852#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025853#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025854
25855#if HAVE_TZNAME
25856extern char *tzname[];
25857#endif
25858
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025859int main()
25860{
Brett Cannon18367812003-09-19 00:59:16 +000025861 /* Note that we need to ensure that not only does tzset(3)
25862 do 'something' with localtime, but it works as documented
25863 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025864 This includes making sure that tzname is set properly if
25865 tm->tm_zone does not exist since it is the alternative way
25866 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025867
25868 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025869 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025870 */
25871
Martin v. Löwis1d459062005-03-14 21:23:33 +000025872 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025873 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25874
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025875 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025876 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025877 if (localtime(&groundhogday)->tm_hour != 0)
25878 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025879#if HAVE_TZNAME
25880 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25881 if (strcmp(tzname[0], "UTC") ||
25882 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25883 exit(1);
25884#endif
Brett Cannon18367812003-09-19 00:59:16 +000025885
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025886 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025887 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025888 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025889 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025890#if HAVE_TZNAME
25891 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25892 exit(1);
25893#endif
Brett Cannon18367812003-09-19 00:59:16 +000025894
25895 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25896 tzset();
25897 if (localtime(&groundhogday)->tm_hour != 11)
25898 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025899#if HAVE_TZNAME
25900 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25901 exit(1);
25902#endif
25903
25904#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025905 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25906 exit(1);
25907 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25908 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025909#endif
Brett Cannon18367812003-09-19 00:59:16 +000025910
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025911 exit(0);
25912}
25913
25914_ACEOF
25915rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025916if { (ac_try="$ac_link"
25917case "(($ac_try" in
25918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25919 *) ac_try_echo=$ac_try;;
25920esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025922 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025923 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025926 { (case "(($ac_try" in
25927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25928 *) ac_try_echo=$ac_try;;
25929esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025931 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025932 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025934 (exit $ac_status); }; }; then
25935 ac_cv_working_tzset=yes
25936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025937 echo "$as_me: program exited with status $ac_status" >&5
25938echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025939sed 's/^/| /' conftest.$ac_ext >&5
25940
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025941( exit $ac_status )
25942ac_cv_working_tzset=no
25943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025944rm -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 +000025945fi
25946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025947
25948fi
25949
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025950{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25951echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025952if test "$ac_cv_working_tzset" = yes
25953then
25954
25955cat >>confdefs.h <<\_ACEOF
25956#define HAVE_WORKING_TZSET 1
25957_ACEOF
25958
25959fi
25960
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025961# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025962{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25963echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025964if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025965 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025966else
25967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025968/* confdefs.h. */
25969_ACEOF
25970cat confdefs.h >>conftest.$ac_ext
25971cat >>conftest.$ac_ext <<_ACEOF
25972/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025973#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025974int
25975main ()
25976{
25977
25978struct stat st;
25979st.st_mtim.tv_nsec = 1;
25980
25981 ;
25982 return 0;
25983}
25984_ACEOF
25985rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025986if { (ac_try="$ac_compile"
25987case "(($ac_try" in
25988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25989 *) ac_try_echo=$ac_try;;
25990esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025994 grep -v '^ *+' conftest.er1 >conftest.err
25995 rm -f conftest.er1
25996 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025998 (exit $ac_status); } && {
25999 test -z "$ac_c_werror_flag" ||
26000 test ! -s conftest.err
26001 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026002 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026003else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026005sed 's/^/| /' conftest.$ac_ext >&5
26006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026007 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026008fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26011fi
26012
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026013{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26014echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026015if test "$ac_cv_stat_tv_nsec" = yes
26016then
26017
26018cat >>confdefs.h <<\_ACEOF
26019#define HAVE_STAT_TV_NSEC 1
26020_ACEOF
26021
26022fi
26023
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026024# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026025{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26026echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026027if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026028 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026029else
26030 cat >conftest.$ac_ext <<_ACEOF
26031/* confdefs.h. */
26032_ACEOF
26033cat confdefs.h >>conftest.$ac_ext
26034cat >>conftest.$ac_ext <<_ACEOF
26035/* end confdefs.h. */
26036#include <sys/stat.h>
26037int
26038main ()
26039{
26040
26041struct stat st;
26042st.st_mtimespec.tv_nsec = 1;
26043
26044 ;
26045 return 0;
26046}
26047_ACEOF
26048rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026049if { (ac_try="$ac_compile"
26050case "(($ac_try" in
26051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26052 *) ac_try_echo=$ac_try;;
26053esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026055 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026056 ac_status=$?
26057 grep -v '^ *+' conftest.er1 >conftest.err
26058 rm -f conftest.er1
26059 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026061 (exit $ac_status); } && {
26062 test -z "$ac_c_werror_flag" ||
26063 test ! -s conftest.err
26064 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026065 ac_cv_stat_tv_nsec2=yes
26066else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026067 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026068sed 's/^/| /' conftest.$ac_ext >&5
26069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026070 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026071fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26074fi
26075
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026076{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26077echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026078if test "$ac_cv_stat_tv_nsec2" = yes
26079then
26080
26081cat >>confdefs.h <<\_ACEOF
26082#define HAVE_STAT_TV_NSEC2 1
26083_ACEOF
26084
26085fi
26086
Jack Jansen666b1e72001-10-31 12:11:48 +000026087# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026088{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26089echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026090if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026091 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026092else
Martin v. Löwis11437992002-04-12 09:54:03 +000026093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026094/* confdefs.h. */
26095_ACEOF
26096cat confdefs.h >>conftest.$ac_ext
26097cat >>conftest.$ac_ext <<_ACEOF
26098/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026099#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026100int
26101main ()
26102{
Jack Jansen666b1e72001-10-31 12:11:48 +000026103
26104 int rtn;
26105 rtn = mvwdelch(0,0,0);
26106
Martin v. Löwis11437992002-04-12 09:54:03 +000026107 ;
26108 return 0;
26109}
26110_ACEOF
26111rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026112if { (ac_try="$ac_compile"
26113case "(($ac_try" in
26114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26115 *) ac_try_echo=$ac_try;;
26116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026120 grep -v '^ *+' conftest.er1 >conftest.err
26121 rm -f conftest.er1
26122 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026124 (exit $ac_status); } && {
26125 test -z "$ac_c_werror_flag" ||
26126 test ! -s conftest.err
26127 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026128 ac_cv_mvwdelch_is_expression=yes
26129else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026131sed 's/^/| /' conftest.$ac_ext >&5
26132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026133 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026134fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26137fi
26138
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026139{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26140echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026141
26142if test "$ac_cv_mvwdelch_is_expression" = yes
26143then
Martin v. Löwis11437992002-04-12 09:54:03 +000026144
26145cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026146#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026147_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026148
26149fi
26150
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026151{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26152echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026153if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026154 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026155else
Martin v. Löwis11437992002-04-12 09:54:03 +000026156 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026157/* confdefs.h. */
26158_ACEOF
26159cat confdefs.h >>conftest.$ac_ext
26160cat >>conftest.$ac_ext <<_ACEOF
26161/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026162#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026163int
26164main ()
26165{
Jack Jansen666b1e72001-10-31 12:11:48 +000026166
26167 WINDOW *w;
26168 w->_flags = 0;
26169
Martin v. Löwis11437992002-04-12 09:54:03 +000026170 ;
26171 return 0;
26172}
26173_ACEOF
26174rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026175if { (ac_try="$ac_compile"
26176case "(($ac_try" in
26177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26178 *) ac_try_echo=$ac_try;;
26179esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026181 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026183 grep -v '^ *+' conftest.er1 >conftest.err
26184 rm -f conftest.er1
26185 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026187 (exit $ac_status); } && {
26188 test -z "$ac_c_werror_flag" ||
26189 test ! -s conftest.err
26190 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026191 ac_cv_window_has_flags=yes
26192else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026194sed 's/^/| /' conftest.$ac_ext >&5
26195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026196 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026197fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26200fi
26201
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026202{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26203echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026204
Jack Jansen666b1e72001-10-31 12:11:48 +000026205
26206if test "$ac_cv_window_has_flags" = yes
26207then
Martin v. Löwis11437992002-04-12 09:54:03 +000026208
26209cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026210#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026211_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026212
26213fi
26214
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026215{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26216echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026217cat >conftest.$ac_ext <<_ACEOF
26218/* confdefs.h. */
26219_ACEOF
26220cat confdefs.h >>conftest.$ac_ext
26221cat >>conftest.$ac_ext <<_ACEOF
26222/* end confdefs.h. */
26223#include <curses.h>
26224int
26225main ()
26226{
26227void *x=is_term_resized
26228 ;
26229 return 0;
26230}
26231_ACEOF
26232rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026233if { (ac_try="$ac_compile"
26234case "(($ac_try" in
26235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26236 *) ac_try_echo=$ac_try;;
26237esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026239 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026240 ac_status=$?
26241 grep -v '^ *+' conftest.er1 >conftest.err
26242 rm -f conftest.er1
26243 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026245 (exit $ac_status); } && {
26246 test -z "$ac_c_werror_flag" ||
26247 test ! -s conftest.err
26248 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026249
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026250cat >>confdefs.h <<\_ACEOF
26251#define HAVE_CURSES_IS_TERM_RESIZED 1
26252_ACEOF
26253
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026254 { echo "$as_me:$LINENO: result: yes" >&5
26255echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026256else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026257 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026258sed 's/^/| /' conftest.$ac_ext >&5
26259
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026260 { echo "$as_me:$LINENO: result: no" >&5
26261echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026262
26263fi
26264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26266
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026267{ echo "$as_me:$LINENO: checking for resize_term" >&5
26268echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026269cat >conftest.$ac_ext <<_ACEOF
26270/* confdefs.h. */
26271_ACEOF
26272cat confdefs.h >>conftest.$ac_ext
26273cat >>conftest.$ac_ext <<_ACEOF
26274/* end confdefs.h. */
26275#include <curses.h>
26276int
26277main ()
26278{
26279void *x=resize_term
26280 ;
26281 return 0;
26282}
26283_ACEOF
26284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026285if { (ac_try="$ac_compile"
26286case "(($ac_try" in
26287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26288 *) ac_try_echo=$ac_try;;
26289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026291 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026292 ac_status=$?
26293 grep -v '^ *+' conftest.er1 >conftest.err
26294 rm -f conftest.er1
26295 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026297 (exit $ac_status); } && {
26298 test -z "$ac_c_werror_flag" ||
26299 test ! -s conftest.err
26300 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026301
26302cat >>confdefs.h <<\_ACEOF
26303#define HAVE_CURSES_RESIZE_TERM 1
26304_ACEOF
26305
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026306 { echo "$as_me:$LINENO: result: yes" >&5
26307echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026308else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026309 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026310sed 's/^/| /' conftest.$ac_ext >&5
26311
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026312 { echo "$as_me:$LINENO: result: no" >&5
26313echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026314
26315fi
26316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026319{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26320echo $ECHO_N "checking for resizeterm... $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=resizeterm
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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026353
26354cat >>confdefs.h <<\_ACEOF
26355#define HAVE_CURSES_RESIZETERM 1
26356_ACEOF
26357
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026358 { echo "$as_me:$LINENO: result: yes" >&5
26359echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026360else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026361 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026362sed 's/^/| /' conftest.$ac_ext >&5
26363
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026371{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26372echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026373
26374if test -r /dev/ptmx
26375then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026376 { echo "$as_me:$LINENO: result: yes" >&5
26377echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026378
26379cat >>confdefs.h <<\_ACEOF
26380#define HAVE_DEV_PTMX 1
26381_ACEOF
26382
Thomas Wouters89f507f2006-12-13 04:49:30 +000026383else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026384 { echo "$as_me:$LINENO: result: no" >&5
26385echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026386fi
26387
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026388{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26389echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026390
26391if test -r /dev/ptc
26392then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026393 { echo "$as_me:$LINENO: result: yes" >&5
26394echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026395
26396cat >>confdefs.h <<\_ACEOF
26397#define HAVE_DEV_PTC 1
26398_ACEOF
26399
Thomas Wouters89f507f2006-12-13 04:49:30 +000026400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026401 { echo "$as_me:$LINENO: result: no" >&5
26402echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026403fi
26404
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026405if test "$have_long_long" = yes
26406then
26407 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26408echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26409 if test "${ac_cv_have_long_long_format+set}" = set; then
26410 echo $ECHO_N "(cached) $ECHO_C" >&6
26411else
26412 if test "$cross_compiling" = yes; then
26413 ac_cv_have_long_long_format=no
26414else
26415 cat >conftest.$ac_ext <<_ACEOF
26416/* confdefs.h. */
26417_ACEOF
26418cat confdefs.h >>conftest.$ac_ext
26419cat >>conftest.$ac_ext <<_ACEOF
26420/* end confdefs.h. */
26421
26422 #include <stdio.h>
26423 #include <stddef.h>
26424 #include <string.h>
26425
26426 #ifdef HAVE_SYS_TYPES_H
26427 #include <sys/types.h>
26428 #endif
26429
26430 int main()
26431 {
26432 char buffer[256];
26433
26434 if (sprintf(buffer, "%lld", (long long)123) < 0)
26435 return 1;
26436 if (strcmp(buffer, "123"))
26437 return 1;
26438
26439 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26440 return 1;
26441 if (strcmp(buffer, "-123"))
26442 return 1;
26443
26444 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26445 return 1;
26446 if (strcmp(buffer, "123"))
26447 return 1;
26448
26449 return 0;
26450 }
26451
26452_ACEOF
26453rm -f conftest$ac_exeext
26454if { (ac_try="$ac_link"
26455case "(($ac_try" in
26456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26457 *) ac_try_echo=$ac_try;;
26458esac
26459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26460 (eval "$ac_link") 2>&5
26461 ac_status=$?
26462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26463 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26464 { (case "(($ac_try" in
26465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26466 *) ac_try_echo=$ac_try;;
26467esac
26468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26469 (eval "$ac_try") 2>&5
26470 ac_status=$?
26471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26472 (exit $ac_status); }; }; then
26473 ac_cv_have_long_long_format=yes
26474else
26475 echo "$as_me: program exited with status $ac_status" >&5
26476echo "$as_me: failed program was:" >&5
26477sed 's/^/| /' conftest.$ac_ext >&5
26478
26479( exit $ac_status )
26480ac_cv_have_long_long_format=no
26481fi
26482rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26483fi
26484
26485
26486
26487fi
26488
26489 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
26490echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
26491fi
26492
26493if test $ac_cv_have_long_long_format = yes
26494then
26495
26496cat >>confdefs.h <<\_ACEOF
26497#define PY_FORMAT_LONG_LONG "ll"
26498_ACEOF
26499
26500fi
26501
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000026502if test $ac_sys_system = Darwin
26503then
26504 LIBS="$LIBS -framework CoreFoundation"
26505fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026506
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026507{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26508echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026509if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026510 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026511else
26512 if test "$cross_compiling" = yes; then
26513 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026514else
26515 cat >conftest.$ac_ext <<_ACEOF
26516/* confdefs.h. */
26517_ACEOF
26518cat confdefs.h >>conftest.$ac_ext
26519cat >>conftest.$ac_ext <<_ACEOF
26520/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026521
Thomas Wouters477c8d52006-05-27 19:21:47 +000026522#include <stdio.h>
26523#include <stddef.h>
26524#include <string.h>
26525
Christian Heimes2c181612007-12-17 20:04:13 +000026526#ifdef HAVE_SYS_TYPES_H
26527#include <sys/types.h>
26528#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026529
26530#ifdef HAVE_SSIZE_T
26531typedef ssize_t Py_ssize_t;
26532#elif SIZEOF_VOID_P == SIZEOF_LONG
26533typedef long Py_ssize_t;
26534#else
26535typedef int Py_ssize_t;
26536#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026537
Christian Heimes2c181612007-12-17 20:04:13 +000026538int main()
26539{
26540 char buffer[256];
26541
Thomas Wouters477c8d52006-05-27 19:21:47 +000026542 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26543 return 1;
26544
Thomas Wouters89f507f2006-12-13 04:49:30 +000026545 if (strcmp(buffer, "123"))
26546 return 1;
26547
26548 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26549 return 1;
26550
26551 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026552 return 1;
26553
26554 return 0;
26555}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026556
Thomas Wouters477c8d52006-05-27 19:21:47 +000026557_ACEOF
26558rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026559if { (ac_try="$ac_link"
26560case "(($ac_try" in
26561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26562 *) ac_try_echo=$ac_try;;
26563esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026565 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026566 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026568 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026569 { (case "(($ac_try" in
26570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26571 *) ac_try_echo=$ac_try;;
26572esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026574 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026575 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026577 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026578 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026579else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026580 echo "$as_me: program exited with status $ac_status" >&5
26581echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026582sed 's/^/| /' conftest.$ac_ext >&5
26583
26584( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026585ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026586fi
26587rm -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 +000026588fi
26589
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026590
26591
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026592fi
26593
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026594{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26595echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026596if test $ac_cv_have_size_t_format = yes
26597then
26598
26599cat >>confdefs.h <<\_ACEOF
26600#define PY_FORMAT_SIZE_T "z"
26601_ACEOF
26602
26603fi
26604
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026605{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26606echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026607if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026608 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026609else
Martin v. Löwis11437992002-04-12 09:54:03 +000026610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026611/* confdefs.h. */
26612_ACEOF
26613cat confdefs.h >>conftest.$ac_ext
26614cat >>conftest.$ac_ext <<_ACEOF
26615/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026616
26617#ifdef HAVE_SYS_TYPES_H
26618#include <sys/types.h>
26619#endif
26620#ifdef HAVE_SYS_SOCKET_H
26621#include <sys/socket.h>
26622#endif
26623
26624
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026625typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026626int
26627main ()
26628{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026629if ((ac__type_new_ *) 0)
26630 return 0;
26631if (sizeof (ac__type_new_))
26632 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026633 ;
26634 return 0;
26635}
26636_ACEOF
26637rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026638if { (ac_try="$ac_compile"
26639case "(($ac_try" in
26640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26641 *) ac_try_echo=$ac_try;;
26642esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026646 grep -v '^ *+' conftest.er1 >conftest.err
26647 rm -f conftest.er1
26648 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026650 (exit $ac_status); } && {
26651 test -z "$ac_c_werror_flag" ||
26652 test ! -s conftest.err
26653 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026654 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026655else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026657sed 's/^/| /' conftest.$ac_ext >&5
26658
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026659 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026661
26662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026663fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026664{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26665echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26666if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026667 :
26668else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026669
Martin v. Löwis01c04012002-11-11 14:58:44 +000026670cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026671#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026672_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026673
26674fi
26675
Michael W. Hudson54241132001-12-07 15:38:26 +000026676
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026677{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26678echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026679if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026680 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026681else
26682 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026683 ac_cv_broken_mbstowcs=no
26684else
26685 cat >conftest.$ac_ext <<_ACEOF
26686/* confdefs.h. */
26687_ACEOF
26688cat confdefs.h >>conftest.$ac_ext
26689cat >>conftest.$ac_ext <<_ACEOF
26690/* end confdefs.h. */
26691
26692#include<stdlib.h>
26693int main() {
26694 size_t len = -1;
26695 const char *str = "text";
26696 len = mbstowcs(NULL, str, 0);
26697 return (len != 4);
26698}
26699
26700_ACEOF
26701rm -f conftest$ac_exeext
26702if { (ac_try="$ac_link"
26703case "(($ac_try" in
26704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26705 *) ac_try_echo=$ac_try;;
26706esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026708 (eval "$ac_link") 2>&5
26709 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026711 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26712 { (case "(($ac_try" in
26713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26714 *) ac_try_echo=$ac_try;;
26715esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026717 (eval "$ac_try") 2>&5
26718 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026720 (exit $ac_status); }; }; then
26721 ac_cv_broken_mbstowcs=no
26722else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026723 echo "$as_me: program exited with status $ac_status" >&5
26724echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026725sed 's/^/| /' conftest.$ac_ext >&5
26726
26727( exit $ac_status )
26728ac_cv_broken_mbstowcs=yes
26729fi
26730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26731fi
26732
26733
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026734fi
26735
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026736{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26737echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026738if test "$ac_cv_broken_mbstowcs" = yes
26739then
26740
26741cat >>confdefs.h <<\_ACEOF
26742#define HAVE_BROKEN_MBSTOWCS 1
26743_ACEOF
26744
26745fi
26746
Antoine Pitroub52ec782009-01-25 16:34:23 +000026747# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026748{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26749echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026750
26751# Check whether --with-computed-gotos was given.
26752if test "${with_computed_gotos+set}" = set; then
26753 withval=$with_computed_gotos;
26754if test "$withval" != no
26755then
26756
26757cat >>confdefs.h <<\_ACEOF
26758#define USE_COMPUTED_GOTOS 1
26759_ACEOF
26760
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026761 { echo "$as_me:$LINENO: result: yes" >&5
26762echo "${ECHO_T}yes" >&6; }
26763else { echo "$as_me:$LINENO: result: no" >&5
26764echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026765fi
26766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026767 { echo "$as_me:$LINENO: result: no" >&5
26768echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026769fi
26770
26771
26772
Michael W. Hudson54241132001-12-07 15:38:26 +000026773
26774
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026775for h in `(cd $srcdir;echo Python/thread_*.h)`
26776do
26777 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26778done
26779
Michael W. Hudson54241132001-12-07 15:38:26 +000026780
Neal Norwitzd24499d2005-12-18 21:36:39 +000026781SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026782{ echo "$as_me:$LINENO: checking for build directories" >&5
26783echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026784for dir in $SRCDIRS; do
26785 if test ! -d $dir; then
26786 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026787 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026788done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026789{ echo "$as_me:$LINENO: result: done" >&5
26790echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026791
Guido van Rossum627b2d71993-12-24 10:39:16 +000026792# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026793ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026794
Martin v. Löwis11437992002-04-12 09:54:03 +000026795cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026796# This file is a shell script that caches the results of configure
26797# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026798# scripts and configure runs, see configure's option --config-cache.
26799# It is not useful on other systems. If it contains results you don't
26800# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026801#
Martin v. Löwis11437992002-04-12 09:54:03 +000026802# config.status only pays attention to the cache file if you give it
26803# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026804#
Skip Montanaro6dead952003-09-25 14:50:04 +000026805# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026806# loading this file, other *unset* `ac_cv_foo' will be assigned the
26807# following values.
26808
26809_ACEOF
26810
Guido van Rossumf78abae1997-01-21 22:02:36 +000026811# The following way of writing the cache mishandles newlines in values,
26812# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026813# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026814# Ultrix sh set writes to stderr and can't be redirected directly,
26815# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026816(
26817 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26818 eval ac_val=\$$ac_var
26819 case $ac_val in #(
26820 *${as_nl}*)
26821 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026822 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26823echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026824 esac
26825 case $ac_var in #(
26826 _ | IFS | as_nl) ;; #(
26827 *) $as_unset $ac_var ;;
26828 esac ;;
26829 esac
26830 done
26831
Martin v. Löwis11437992002-04-12 09:54:03 +000026832 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026833 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26834 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026835 # `set' does not quote correctly, so add quotes (double-quote
26836 # substitution turns \\\\ into \\, and sed turns \\ into \).
26837 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026838 "s/'/'\\\\''/g;
26839 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026840 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026841 *)
26842 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026843 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026844 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026845 esac |
26846 sort
26847) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026848 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026849 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026850 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026851 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026852 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26853 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026854 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26855 :end' >>confcache
26856if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26857 if test -w "$cache_file"; then
26858 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026859 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26860echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026861 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026862 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026863 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26864echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026865 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026866fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026867rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026868
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026869test "x$prefix" = xNONE && prefix=$ac_default_prefix
26870# Let make expand exec_prefix.
26871test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026872
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026873DEFS=-DHAVE_CONFIG_H
26874
Skip Montanaro6dead952003-09-25 14:50:04 +000026875ac_libobjs=
26876ac_ltlibobjs=
26877for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26878 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026879 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026880 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026881 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26882 # will be set to the directory where LIBOBJS objects are built.
26883 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26884 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026885done
26886LIBOBJS=$ac_libobjs
26887
26888LTLIBOBJS=$ac_ltlibobjs
26889
26890
Martin v. Löwis11437992002-04-12 09:54:03 +000026891
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026892: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026893ac_clean_files_save=$ac_clean_files
26894ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026895{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26896echo "$as_me: creating $CONFIG_STATUS" >&6;}
26897cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026898#! $SHELL
26899# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026900# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026901# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026902# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026903
Martin v. Löwis11437992002-04-12 09:54:03 +000026904debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026905ac_cs_recheck=false
26906ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026907SHELL=\${CONFIG_SHELL-$SHELL}
26908_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026909
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026910cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026911## --------------------- ##
26912## M4sh Initialization. ##
26913## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026915# Be more Bourne compatible
26916DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026917if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26918 emulate sh
26919 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026920 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026921 # is contrary to our usage. Disable this feature.
26922 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026923 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026924else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026925 case `(set -o) 2>/dev/null` in
26926 *posix*) set -o posix ;;
26927esac
26928
Michael W. Hudson54241132001-12-07 15:38:26 +000026929fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026930
26931
Michael W. Hudson54241132001-12-07 15:38:26 +000026932
Michael W. Hudson54241132001-12-07 15:38:26 +000026933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026934# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026935# Avoid depending upon Character Ranges.
26936as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26937as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26938as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26939as_cr_digits='0123456789'
26940as_cr_alnum=$as_cr_Letters$as_cr_digits
26941
26942# The user is always right.
26943if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026944 echo "#! /bin/sh" >conf$$.sh
26945 echo "exit 0" >>conf$$.sh
26946 chmod +x conf$$.sh
26947 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26948 PATH_SEPARATOR=';'
26949 else
26950 PATH_SEPARATOR=:
26951 fi
26952 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026953fi
26954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026955# Support unset when possible.
26956if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26957 as_unset=unset
26958else
26959 as_unset=false
26960fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026962
26963# IFS
26964# We need space, tab and new line, in precisely that order. Quoting is
26965# there to prevent editors from complaining about space-tab.
26966# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26967# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026968as_nl='
26969'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026970IFS=" "" $as_nl"
26971
26972# Find who we are. Look in the path if we contain no directory separator.
26973case $0 in
26974 *[\\/]* ) as_myself=$0 ;;
26975 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026976for as_dir in $PATH
26977do
26978 IFS=$as_save_IFS
26979 test -z "$as_dir" && as_dir=.
26980 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26981done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026982IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026984 ;;
26985esac
26986# We did not find ourselves, most probably we were run as `sh COMMAND'
26987# in which case we are not to be found in the path.
26988if test "x$as_myself" = x; then
26989 as_myself=$0
26990fi
26991if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026992 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026993 { (exit 1); exit 1; }
26994fi
26995
26996# Work around bugs in pre-3.0 UWIN ksh.
26997for as_var in ENV MAIL MAILPATH
26998do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26999done
27000PS1='$ '
27001PS2='> '
27002PS4='+ '
27003
27004# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027005for as_var in \
27006 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27007 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27008 LC_TELEPHONE LC_TIME
27009do
27010 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27011 eval $as_var=C; export $as_var
27012 else
27013 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27014 fi
27015done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027016
27017# Required to use basename.
27018if expr a : '\(a\)' >/dev/null 2>&1 &&
27019 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27020 as_expr=expr
27021else
27022 as_expr=false
27023fi
27024
27025if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27026 as_basename=basename
27027else
27028 as_basename=false
27029fi
27030
27031
27032# Name of the executable.
27033as_me=`$as_basename -- "$0" ||
27034$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27035 X"$0" : 'X\(//\)$' \| \
27036 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027037echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027038 sed '/^.*\/\([^/][^/]*\)\/*$/{
27039 s//\1/
27040 q
27041 }
27042 /^X\/\(\/\/\)$/{
27043 s//\1/
27044 q
27045 }
27046 /^X\/\(\/\).*/{
27047 s//\1/
27048 q
27049 }
27050 s/.*/./; q'`
27051
27052# CDPATH.
27053$as_unset CDPATH
27054
27055
27056
Martin v. Löwis11437992002-04-12 09:54:03 +000027057 as_lineno_1=$LINENO
27058 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027059 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027060 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027061
Martin v. Löwis11437992002-04-12 09:54:03 +000027062 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27063 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027064 # line-number line after each line using $LINENO; the second 'sed'
27065 # does the real work. The second script uses 'N' to pair each
27066 # line-number line with the line containing $LINENO, and appends
27067 # trailing '-' during substitution so that $LINENO is not a special
27068 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027069 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027070 # scripts with optimization help from Paolo Bonzini. Blame Lee
27071 # E. McMahon (1931-1989) for sed's syntax. :-)
27072 sed -n '
27073 p
27074 /[$]LINENO/=
27075 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027076 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027077 s/[$]LINENO.*/&-/
27078 t lineno
27079 b
27080 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027081 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027082 :loop
27083 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027084 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027085 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027086 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027087 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027088 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027089 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027090
Martin v. Löwis11437992002-04-12 09:54:03 +000027091 # Don't try to exec as it changes $[0], causing all sort of problems
27092 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027093 # original and so on. Autoconf is especially sensitive to this).
27094 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027095 # Exit status is that of the last command.
27096 exit
27097}
27098
27099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027100if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27101 as_dirname=dirname
27102else
27103 as_dirname=false
27104fi
27105
27106ECHO_C= ECHO_N= ECHO_T=
27107case `echo -n x` in
27108-n*)
27109 case `echo 'x\c'` in
27110 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27111 *) ECHO_C='\c';;
27112 esac;;
27113*)
27114 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027115esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027117if expr a : '\(a\)' >/dev/null 2>&1 &&
27118 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027119 as_expr=expr
27120else
27121 as_expr=false
27122fi
27123
27124rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027125if test -d conf$$.dir; then
27126 rm -f conf$$.dir/conf$$.file
27127else
27128 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027129 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027130fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027131echo >conf$$.file
27132if ln -s conf$$.file conf$$ 2>/dev/null; then
27133 as_ln_s='ln -s'
27134 # ... but there are two gotchas:
27135 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27136 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27137 # In both cases, we have to default to `cp -p'.
27138 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027139 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027140elif ln conf$$.file conf$$ 2>/dev/null; then
27141 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027142else
27143 as_ln_s='cp -p'
27144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027145rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27146rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027147
Skip Montanaro6dead952003-09-25 14:50:04 +000027148if mkdir -p . 2>/dev/null; then
27149 as_mkdir_p=:
27150else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027151 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027152 as_mkdir_p=false
27153fi
27154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027155if test -x / >/dev/null 2>&1; then
27156 as_test_x='test -x'
27157else
27158 if ls -dL / >/dev/null 2>&1; then
27159 as_ls_L_option=L
27160 else
27161 as_ls_L_option=
27162 fi
27163 as_test_x='
27164 eval sh -c '\''
27165 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027166 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027167 else
27168 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027169 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027170 esac;
27171 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27172 ???[sx]*):;;*)false;;esac;fi
27173 '\'' sh
27174 '
27175fi
27176as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027177
27178# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027179as_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 +000027180
27181# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027182as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027183
27184
Martin v. Löwis11437992002-04-12 09:54:03 +000027185exec 6>&1
27186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027187# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027188# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027189# values after options handling.
27190ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027191This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027192generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027193
27194 CONFIG_FILES = $CONFIG_FILES
27195 CONFIG_HEADERS = $CONFIG_HEADERS
27196 CONFIG_LINKS = $CONFIG_LINKS
27197 CONFIG_COMMANDS = $CONFIG_COMMANDS
27198 $ $0 $@
27199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027200on `(hostname || uname -n) 2>/dev/null | sed 1q`
27201"
27202
Martin v. Löwis11437992002-04-12 09:54:03 +000027203_ACEOF
27204
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027205cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027206# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027207config_files="$ac_config_files"
27208config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027210_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027211
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027212cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027213ac_cs_usage="\
27214\`$as_me' instantiates files from templates according to the
27215current configuration.
27216
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027217Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027218
27219 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027220 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027221 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027222 -d, --debug don't remove temporary files
27223 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027224 --file=FILE[:TEMPLATE]
27225 instantiate the configuration file FILE
27226 --header=FILE[:TEMPLATE]
27227 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027228
27229Configuration files:
27230$config_files
27231
27232Configuration headers:
27233$config_headers
27234
27235Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027237_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027238cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027239ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027240python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027241configured by $0, generated by GNU Autoconf 2.61,
27242 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027243
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027244Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027245This config.status script is free software; the Free Software Foundation
27246gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027247
27248ac_pwd='$ac_pwd'
27249srcdir='$srcdir'
27250INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027251_ACEOF
27252
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027253cat >>$CONFIG_STATUS <<\_ACEOF
27254# If no file are specified by the user, then we need to provide default
27255# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027256ac_need_defaults=:
27257while test $# != 0
27258do
27259 case $1 in
27260 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027261 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27262 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027263 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027264 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027265 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027266 ac_option=$1
27267 ac_optarg=$2
27268 ac_shift=shift
27269 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027270 esac
27271
Skip Montanaro6dead952003-09-25 14:50:04 +000027272 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027273 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027274 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27275 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027276 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027277 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027278 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027279 debug=: ;;
27280 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027281 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027282 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027283 ac_need_defaults=false;;
27284 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027285 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027286 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027287 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027288 --he | --h)
27289 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027290 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027291Try \`$0 --help' for more information." >&2
27292 { (exit 1); exit 1; }; };;
27293 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027294 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027295 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27296 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27297 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027298
27299 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027300 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027301Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027302 { (exit 1); exit 1; }; } ;;
27303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027304 *) ac_config_targets="$ac_config_targets $1"
27305 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027306
27307 esac
27308 shift
27309done
27310
Skip Montanaro6dead952003-09-25 14:50:04 +000027311ac_configure_extra_args=
27312
27313if $ac_cs_silent; then
27314 exec 6>/dev/null
27315 ac_configure_extra_args="$ac_configure_extra_args --silent"
27316fi
27317
27318_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027319cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027320if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027321 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27322 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027323 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027324 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027325fi
27326
Martin v. Löwis11437992002-04-12 09:54:03 +000027327_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027328cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027329exec 5>>config.log
27330{
27331 echo
27332 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27333## Running $as_me. ##
27334_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027335 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027336} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027338_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027339cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027340_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027341
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027342cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027343
27344# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027345for ac_config_target in $ac_config_targets
27346do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027347 case $ac_config_target in
27348 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27349 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27350 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027351 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27352 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027353 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27354 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027355 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027356
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027357 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27358echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027359 { (exit 1); exit 1; }; };;
27360 esac
27361done
27362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027363
Martin v. Löwis11437992002-04-12 09:54:03 +000027364# If the user did not use the arguments to specify the items to instantiate,
27365# then the envvar interface is used. Set only those that are not.
27366# We use the long form for the default assignment because of an extremely
27367# bizarre bug on SunOS 4.1.3.
27368if $ac_need_defaults; then
27369 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27370 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27371fi
27372
Skip Montanaro6dead952003-09-25 14:50:04 +000027373# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027374# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027375# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027376# Hook for its removal unless debugging.
27377# Note that there is a small window in which the directory will not be cleaned:
27378# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027379$debug ||
27380{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027381 tmp=
27382 trap 'exit_status=$?
27383 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27384' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027385 trap '{ (exit 1); exit 1; }' 1 2 13 15
27386}
Martin v. Löwis11437992002-04-12 09:54:03 +000027387# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027388
Martin v. Löwis11437992002-04-12 09:54:03 +000027389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027390 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027391 test -n "$tmp" && test -d "$tmp"
27392} ||
27393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027394 tmp=./conf$$-$RANDOM
27395 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027396} ||
27397{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027398 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027399 { (exit 1); exit 1; }
27400}
27401
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027402#
27403# Set up the sed scripts for CONFIG_FILES section.
27404#
27405
27406# No need to generate the scripts if there are no CONFIG_FILES.
27407# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027408if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027409
27410_ACEOF
27411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027412
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027414ac_delim='%!_!# '
27415for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027416 cat >conf$$subs.sed <<_ACEOF
27417SHELL!$SHELL$ac_delim
27418PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27419PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27420PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27421PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27422PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27423PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27424exec_prefix!$exec_prefix$ac_delim
27425prefix!$prefix$ac_delim
27426program_transform_name!$program_transform_name$ac_delim
27427bindir!$bindir$ac_delim
27428sbindir!$sbindir$ac_delim
27429libexecdir!$libexecdir$ac_delim
27430datarootdir!$datarootdir$ac_delim
27431datadir!$datadir$ac_delim
27432sysconfdir!$sysconfdir$ac_delim
27433sharedstatedir!$sharedstatedir$ac_delim
27434localstatedir!$localstatedir$ac_delim
27435includedir!$includedir$ac_delim
27436oldincludedir!$oldincludedir$ac_delim
27437docdir!$docdir$ac_delim
27438infodir!$infodir$ac_delim
27439htmldir!$htmldir$ac_delim
27440dvidir!$dvidir$ac_delim
27441pdfdir!$pdfdir$ac_delim
27442psdir!$psdir$ac_delim
27443libdir!$libdir$ac_delim
27444localedir!$localedir$ac_delim
27445mandir!$mandir$ac_delim
27446DEFS!$DEFS$ac_delim
27447ECHO_C!$ECHO_C$ac_delim
27448ECHO_N!$ECHO_N$ac_delim
27449ECHO_T!$ECHO_T$ac_delim
27450LIBS!$LIBS$ac_delim
27451build_alias!$build_alias$ac_delim
27452host_alias!$host_alias$ac_delim
27453target_alias!$target_alias$ac_delim
27454VERSION!$VERSION$ac_delim
27455SOVERSION!$SOVERSION$ac_delim
27456CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27457UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27458ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27459PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27460PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27461PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27462PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27463PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27464FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27465FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27466FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27467FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27468FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27469MACHDEP!$MACHDEP$ac_delim
27470SGI_ABI!$SGI_ABI$ac_delim
27471CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27472EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27473CC!$CC$ac_delim
27474CFLAGS!$CFLAGS$ac_delim
27475LDFLAGS!$LDFLAGS$ac_delim
27476CPPFLAGS!$CPPFLAGS$ac_delim
27477ac_ct_CC!$ac_ct_CC$ac_delim
27478EXEEXT!$EXEEXT$ac_delim
27479OBJEXT!$OBJEXT$ac_delim
27480CXX!$CXX$ac_delim
27481MAINCC!$MAINCC$ac_delim
27482CPP!$CPP$ac_delim
27483GREP!$GREP$ac_delim
27484EGREP!$EGREP$ac_delim
27485BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27486LIBRARY!$LIBRARY$ac_delim
27487LDLIBRARY!$LDLIBRARY$ac_delim
27488DLLLIBRARY!$DLLLIBRARY$ac_delim
27489BLDLIBRARY!$BLDLIBRARY$ac_delim
27490LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27491INSTSONAME!$INSTSONAME$ac_delim
27492RUNSHARED!$RUNSHARED$ac_delim
27493LINKCC!$LINKCC$ac_delim
27494GNULD!$GNULD$ac_delim
27495RANLIB!$RANLIB$ac_delim
27496AR!$AR$ac_delim
27497ARFLAGS!$ARFLAGS$ac_delim
27498SVNVERSION!$SVNVERSION$ac_delim
27499INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27500INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27501INSTALL_DATA!$INSTALL_DATA$ac_delim
27502LN!$LN$ac_delim
27503OPT!$OPT$ac_delim
27504BASECFLAGS!$BASECFLAGS$ac_delim
27505UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27506OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27507LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27508SO!$SO$ac_delim
27509LDSHARED!$LDSHARED$ac_delim
27510BLDSHARED!$BLDSHARED$ac_delim
27511CCSHARED!$CCSHARED$ac_delim
27512LINKFORSHARED!$LINKFORSHARED$ac_delim
27513CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27514_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027515
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027516 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027517 break
27518 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027519 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27520echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027521 { (exit 1); exit 1; }; }
27522 else
27523 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027524 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027525done
27526
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027527ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27528if test -n "$ac_eof"; then
27529 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27530 ac_eof=`expr $ac_eof + 1`
27531fi
27532
27533cat >>$CONFIG_STATUS <<_ACEOF
27534cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27535/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027536_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027537sed '
27538s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27539s/^/s,@/; s/!/@,|#_!!_#|/
27540:n
27541t n
27542s/'"$ac_delim"'$/,g/; t
27543s/$/\\/; p
27544N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27545' >>$CONFIG_STATUS <conf$$subs.sed
27546rm -f conf$$subs.sed
27547cat >>$CONFIG_STATUS <<_ACEOF
27548CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027549_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027550
27551
27552ac_delim='%!_!# '
27553for ac_last_try in false false false false false :; do
27554 cat >conf$$subs.sed <<_ACEOF
27555SHLIBS!$SHLIBS$ac_delim
27556USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27557SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27558USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27559LDLAST!$LDLAST$ac_delim
27560THREADOBJ!$THREADOBJ$ac_delim
27561DLINCLDIR!$DLINCLDIR$ac_delim
27562DYNLOADFILE!$DYNLOADFILE$ac_delim
27563MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27564TRUE!$TRUE$ac_delim
27565LIBOBJS!$LIBOBJS$ac_delim
27566HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27567HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27568HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27569HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27570HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27571LIBM!$LIBM$ac_delim
27572LIBC!$LIBC$ac_delim
27573THREADHEADERS!$THREADHEADERS$ac_delim
27574SRCDIRS!$SRCDIRS$ac_delim
27575LTLIBOBJS!$LTLIBOBJS$ac_delim
27576_ACEOF
27577
27578 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
27579 break
27580 elif $ac_last_try; then
27581 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27582echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027583 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027584 else
27585 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27586 fi
27587done
27588
27589ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27590if test -n "$ac_eof"; then
27591 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27592 ac_eof=`expr $ac_eof + 1`
27593fi
27594
27595cat >>$CONFIG_STATUS <<_ACEOF
27596cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27597/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027598_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027599sed '
27600s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27601s/^/s,@/; s/!/@,|#_!!_#|/
27602:n
27603t n
27604s/'"$ac_delim"'$/,g/; t
27605s/$/\\/; p
27606N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27607' >>$CONFIG_STATUS <conf$$subs.sed
27608rm -f conf$$subs.sed
27609cat >>$CONFIG_STATUS <<_ACEOF
27610:end
27611s/|#_!!_#|//g
27612CEOF$ac_eof
27613_ACEOF
27614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027615
27616# VPATH may cause trouble with some makes, so we remove $(srcdir),
27617# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27618# trailing colons and then remove the whole line if VPATH becomes empty
27619# (actually we leave an empty line to preserve line numbers).
27620if test "x$srcdir" = x.; then
27621 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27622s/:*\$(srcdir):*/:/
27623s/:*\${srcdir}:*/:/
27624s/:*@srcdir@:*/:/
27625s/^\([^=]*=[ ]*\):*/\1/
27626s/:*$//
27627s/^[^=]*=[ ]*$//
27628}'
27629fi
27630
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027631cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027632fi # test -n "$CONFIG_FILES"
27633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027634
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027635for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027636do
27637 case $ac_tag in
27638 :[FHLC]) ac_mode=$ac_tag; continue;;
27639 esac
27640 case $ac_mode$ac_tag in
27641 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027642 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27643echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027644 { (exit 1); exit 1; }; };;
27645 :[FH]-) ac_tag=-:-;;
27646 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27647 esac
27648 ac_save_IFS=$IFS
27649 IFS=:
27650 set x $ac_tag
27651 IFS=$ac_save_IFS
27652 shift
27653 ac_file=$1
27654 shift
27655
27656 case $ac_mode in
27657 :L) ac_source=$1;;
27658 :[FH])
27659 ac_file_inputs=
27660 for ac_f
27661 do
27662 case $ac_f in
27663 -) ac_f="$tmp/stdin";;
27664 *) # Look for the file first in the build tree, then in the source tree
27665 # (if the path is not absolute). The absolute path cannot be DOS-style,
27666 # because $ac_f cannot contain `:'.
27667 test -f "$ac_f" ||
27668 case $ac_f in
27669 [\\/$]*) false;;
27670 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27671 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027672 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27673echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027674 { (exit 1); exit 1; }; };;
27675 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027676 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027677 done
27678
27679 # Let's still pretend it is `configure' which instantiates (i.e., don't
27680 # use $as_me), people would be surprised to read:
27681 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027682 configure_input="Generated from "`IFS=:
27683 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027684 if test x"$ac_file" != x-; then
27685 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027686 { echo "$as_me:$LINENO: creating $ac_file" >&5
27687echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027688 fi
27689
27690 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027691 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027692 esac
27693 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027694 esac
27695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027696 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027697$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027698 X"$ac_file" : 'X\(//\)[^/]' \| \
27699 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027700 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027701echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27703 s//\1/
27704 q
27705 }
27706 /^X\(\/\/\)[^/].*/{
27707 s//\1/
27708 q
27709 }
27710 /^X\(\/\/\)$/{
27711 s//\1/
27712 q
27713 }
27714 /^X\(\/\).*/{
27715 s//\1/
27716 q
27717 }
27718 s/.*/./; q'`
27719 { as_dir="$ac_dir"
27720 case $as_dir in #(
27721 -*) as_dir=./$as_dir;;
27722 esac
27723 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027724 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027725 while :; do
27726 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027727 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027728 *) as_qdir=$as_dir;;
27729 esac
27730 as_dirs="'$as_qdir' $as_dirs"
27731 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027732$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027733 X"$as_dir" : 'X\(//\)[^/]' \| \
27734 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027735 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027736echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027737 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27738 s//\1/
27739 q
27740 }
27741 /^X\(\/\/\)[^/].*/{
27742 s//\1/
27743 q
27744 }
27745 /^X\(\/\/\)$/{
27746 s//\1/
27747 q
27748 }
27749 /^X\(\/\).*/{
27750 s//\1/
27751 q
27752 }
27753 s/.*/./; q'`
27754 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027755 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027756 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027757 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27758echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027759 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027760 ac_builddir=.
27761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027762case "$ac_dir" in
27763.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27764*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027765 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027766 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027767 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027768 case $ac_top_builddir_sub in
27769 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27770 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27771 esac ;;
27772esac
27773ac_abs_top_builddir=$ac_pwd
27774ac_abs_builddir=$ac_pwd$ac_dir_suffix
27775# for backward compatibility:
27776ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027777
27778case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027779 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027780 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027781 ac_top_srcdir=$ac_top_builddir_sub
27782 ac_abs_top_srcdir=$ac_pwd ;;
27783 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027784 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027785 ac_top_srcdir=$srcdir
27786 ac_abs_top_srcdir=$srcdir ;;
27787 *) # Relative name.
27788 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27789 ac_top_srcdir=$ac_top_build_prefix$srcdir
27790 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027791esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027792ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027793
Martin v. Löwis11437992002-04-12 09:54:03 +000027794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027795 case $ac_mode in
27796 :F)
27797 #
27798 # CONFIG_FILE
27799 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027800
27801 case $INSTALL in
27802 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027803 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027804 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027805_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027806
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027807cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027808# If the template does not know about datarootdir, expand it.
27809# FIXME: This hack should be removed a few years after 2.60.
27810ac_datarootdir_hack=; ac_datarootdir_seen=
27811
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027812case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027813 p
27814 q
27815}
27816/@datadir@/p
27817/@docdir@/p
27818/@infodir@/p
27819/@localedir@/p
27820/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027821' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027822*datarootdir*) ac_datarootdir_seen=yes;;
27823*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027824 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27825echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027826_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027827cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027828 ac_datarootdir_hack='
27829 s&@datadir@&$datadir&g
27830 s&@docdir@&$docdir&g
27831 s&@infodir@&$infodir&g
27832 s&@localedir@&$localedir&g
27833 s&@mandir@&$mandir&g
27834 s&\\\${datarootdir}&$datarootdir&g' ;;
27835esac
27836_ACEOF
27837
27838# Neutralize VPATH when `$srcdir' = `.'.
27839# Shell code in configure.ac might set extrasub.
27840# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027841cat >>$CONFIG_STATUS <<_ACEOF
27842 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027843$extrasub
27844_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027845cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027846:t
27847/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027848s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027849s&@top_builddir@&$ac_top_builddir_sub&;t t
27850s&@srcdir@&$ac_srcdir&;t t
27851s&@abs_srcdir@&$ac_abs_srcdir&;t t
27852s&@top_srcdir@&$ac_top_srcdir&;t t
27853s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27854s&@builddir@&$ac_builddir&;t t
27855s&@abs_builddir@&$ac_abs_builddir&;t t
27856s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27857s&@INSTALL@&$ac_INSTALL&;t t
27858$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027859" $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 +000027860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027861test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27862 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27863 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027864 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027865which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027866echo "$as_me: 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." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027869 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027870 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027871 -) cat "$tmp/out"; rm -f "$tmp/out";;
27872 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27873 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027874 ;;
27875 :H)
27876 #
27877 # CONFIG_HEADER
27878 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027879_ACEOF
27880
27881# Transform confdefs.h into a sed script `conftest.defines', that
27882# substitutes the proper values into config.h.in to produce config.h.
27883rm -f conftest.defines conftest.tail
27884# First, append a space to every undef/define line, to ease matching.
27885echo 's/$/ /' >conftest.defines
27886# Then, protect against being on the right side of a sed subst, or in
27887# an unquoted here document, in config.status. If some macros were
27888# called several times there might be several #defines for the same
27889# symbol, which is useless. But do not sort them, since the last
27890# AC_DEFINE must be honored.
27891ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27892# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27893# NAME is the cpp macro being defined, VALUE is the value it is being given.
27894# PARAMS is the parameter list in the macro definition--in most cases, it's
27895# just an empty string.
27896ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27897ac_dB='\\)[ (].*,\\1define\\2'
27898ac_dC=' '
27899ac_dD=' ,'
27900
27901uniq confdefs.h |
27902 sed -n '
27903 t rset
27904 :rset
27905 s/^[ ]*#[ ]*define[ ][ ]*//
27906 t ok
27907 d
27908 :ok
27909 s/[\\&,]/\\&/g
27910 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27911 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27912 ' >>conftest.defines
27913
27914# Remove the space that was appended to ease matching.
27915# Then replace #undef with comments. This is necessary, for
27916# example, in the case of _POSIX_SOURCE, which is predefined and required
27917# on some systems where configure will not decide to define it.
27918# (The regexp can be short, since the line contains either #define or #undef.)
27919echo 's/ $//
27920s,^[ #]*u.*,/* & */,' >>conftest.defines
27921
27922# Break up conftest.defines:
27923ac_max_sed_lines=50
27924
27925# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27926# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27927# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27928# et cetera.
27929ac_in='$ac_file_inputs'
27930ac_out='"$tmp/out1"'
27931ac_nxt='"$tmp/out2"'
27932
27933while :
27934do
27935 # Write a here document:
27936 cat >>$CONFIG_STATUS <<_ACEOF
27937 # First, check the format of the line:
27938 cat >"\$tmp/defines.sed" <<\\CEOF
27939/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27940/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27941b
27942:def
27943_ACEOF
27944 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27945 echo 'CEOF
27946 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27947 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27948 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27949 grep . conftest.tail >/dev/null || break
27950 rm -f conftest.defines
27951 mv conftest.tail conftest.defines
27952done
27953rm -f conftest.defines conftest.tail
27954
27955echo "ac_result=$ac_in" >>$CONFIG_STATUS
27956cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027957 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027958 echo "/* $configure_input */" >"$tmp/config.h"
27959 cat "$ac_result" >>"$tmp/config.h"
27960 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27961 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27962echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027963 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027964 rm -f $ac_file
27965 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027966 fi
27967 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027968 echo "/* $configure_input */"
27969 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027970 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027971 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027972 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027974
27975 esac
27976
27977done # for ac_tag
27978
Guido van Rossum627b2d71993-12-24 10:39:16 +000027979
Martin v. Löwis11437992002-04-12 09:54:03 +000027980{ (exit 0); exit 0; }
27981_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027982chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027983ac_clean_files=$ac_clean_files_save
27984
27985
27986# configure is writing to config.log, and then calls config.status.
27987# config.status does its own redirection, appending to config.log.
27988# Unfortunately, on DOS this fails, as config.log is still kept open
27989# by configure, so config.status won't be able to write to it; its
27990# output is simply discarded. So we exec the FD to /dev/null,
27991# effectively closing config.log, so it can be properly (re)opened and
27992# appended to by config.status. When coming back to configure, we
27993# need to make the FD available again.
27994if test "$no_create" != yes; then
27995 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027996 ac_config_status_args=
27997 test "$silent" = yes &&
27998 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027999 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028000 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028001 exec 5>>config.log
28002 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28003 # would make configure fail if this is the last instruction.
28004 $ac_cs_success || { (exit 1); exit 1; }
28005fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028006
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028007
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028008echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028009if test ! -f Modules/Setup
28010then
28011 cp $srcdir/Modules/Setup.dist Modules/Setup
28012fi
28013
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028014echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028015if test ! -f Modules/Setup.local
28016then
28017 echo "# Edit this file for local setup changes" >Modules/Setup.local
28018fi
28019
28020echo "creating Makefile"
28021$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28022 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028023 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028024mv config.c Modules