blob: a875b5a5ab5ea4f05a00410538dc9479b51aea33 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002# From configure.in Revision: 74745 .
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
1355 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
1359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001363 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001364 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1365 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367Some influential environment variables:
1368 CC C compiler command
1369 CFLAGS C compiler flags
1370 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1371 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 LIBS libraries to pass to the linker, e.g. -l<library>
1373 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1374 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 CPP C preprocessor
1376
1377Use these variables to override the choices made by `configure' or to help
1378it to find libraries and programs with nonstandard names/locations.
1379
Georg Brandle2e15612009-05-20 18:25:10 +00001380Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001383fi
1384
1385if test "$ac_init_help" = "recursive"; then
1386 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001388 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_builddir=.
1390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001391case "$ac_dir" in
1392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 case $ac_top_builddir_sub in
1398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1400 esac ;;
1401esac
1402ac_abs_top_builddir=$ac_pwd
1403ac_abs_builddir=$ac_pwd$ac_dir_suffix
1404# for backward compatibility:
1405ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001408 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 ac_top_srcdir=$ac_top_builddir_sub
1411 ac_abs_top_srcdir=$ac_pwd ;;
1412 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 ac_top_srcdir=$srcdir
1415 ac_abs_top_srcdir=$srcdir ;;
1416 *) # Relative name.
1417 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1418 ac_top_srcdir=$ac_top_build_prefix$srcdir
1419 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001420esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423 cd "$ac_dir" || { ac_status=$?; continue; }
1424 # Check for guested configure.
1425 if test -f "$ac_srcdir/configure.gnu"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1428 elif test -f "$ac_srcdir/configure"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001432 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 fi || ac_status=$?
1434 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 done
1436fi
1437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001439if $ac_init_version; then
1440 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001441python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001442generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014452002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This configure script is free software; the Free Software Foundation
1447gives unlimited permission to copy, distribute and modify it.
1448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This file contains any messages produced by compilers while
1453running configure, to aid debugging if configure makes a mistake.
1454
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001455It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001456generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458 $ $0 $@
1459
1460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001462{
1463cat <<_ASUNAME
1464## --------- ##
1465## Platform. ##
1466## --------- ##
1467
1468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1469uname -m = `(uname -m) 2>/dev/null || echo unknown`
1470uname -r = `(uname -r) 2>/dev/null || echo unknown`
1471uname -s = `(uname -s) 2>/dev/null || echo unknown`
1472uname -v = `(uname -v) 2>/dev/null || echo unknown`
1473
1474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1476
1477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1484
1485_ASUNAME
1486
1487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1488for as_dir in $PATH
1489do
1490 IFS=$as_save_IFS
1491 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001492 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001493done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496} >&5
1497
1498cat >&5 <<_ACEOF
1499
1500
1501## ----------- ##
1502## Core tests. ##
1503## ----------- ##
1504
1505_ACEOF
1506
1507
1508# Keep a trace of the command line.
1509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001514ac_configure_args0=
1515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_must_keep_next=false
1517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001518do
Skip Montanaro6dead952003-09-25 14:50:04 +00001519 for ac_arg
1520 do
1521 case $ac_arg in
1522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1524 | -silent | --silent | --silen | --sile | --sil)
1525 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001527 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 esac
1529 case $ac_pass in
1530 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1531 2)
1532 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 case $ac_arg in
1537 *=* | --config-cache | -C | -disable-* | --disable-* \
1538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1540 | -with-* | --with-* | -without-* | --without-* | --x)
1541 case "$ac_configure_args0 " in
1542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1543 esac
1544 ;;
1545 -* ) ac_must_keep_next=true ;;
1546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 ;;
1550 esac
1551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001552done
Skip Montanaro6dead952003-09-25 14:50:04 +00001553$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1554$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
1556# When interrupted or exit'd, cleanup temporary files, and complete
1557# config.log. We remove comments because anyway the quotes in there
1558# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559# WARNING: Use '\'' to represent an apostrophe within the trap.
1560# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561trap 'exit_status=$?
1562 # Save into config.log some information that might help in debugging.
1563 {
1564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001565
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 cat <<\_ASBOX
1567## ---------------- ##
1568## Cache variables. ##
1569## ---------------- ##
1570_ASBOX
1571 echo
1572 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573(
1574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1575 eval ac_val=\$$ac_var
1576 case $ac_val in #(
1577 *${as_nl}*)
1578 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001579 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1580echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 esac
1582 case $ac_var in #(
1583 _ | IFS | as_nl) ;; #(
1584 *) $as_unset $ac_var ;;
1585 esac ;;
1586 esac
1587 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1590 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 "s/'\''/'\''\\\\'\'''\''/g;
1593 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1594 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001595 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 esac |
1599 sort
1600)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001602
1603 cat <<\_ASBOX
1604## ----------------- ##
1605## Output variables. ##
1606## ----------------- ##
1607_ASBOX
1608 echo
1609 for ac_var in $ac_subst_vars
1610 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 eval ac_val=\$$ac_var
1612 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001615 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001616 done | sort
1617 echo
1618
1619 if test -n "$ac_subst_files"; then
1620 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621## ------------------- ##
1622## File substitutions. ##
1623## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001624_ASBOX
1625 echo
1626 for ac_var in $ac_subst_files
1627 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 eval ac_val=\$$ac_var
1629 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001630 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001632 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001633 done | sort
1634 echo
1635 fi
1636
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 if test -s confdefs.h; then
1638 cat <<\_ASBOX
1639## ----------- ##
1640## confdefs.h. ##
1641## ----------- ##
1642_ASBOX
1643 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 echo
1646 fi
1647 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001648 echo "$as_me: caught signal $ac_signal"
1649 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 rm -f core *.core core.conftest.* &&
1652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001655for ac_signal in 1 2 13 15; do
1656 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1657done
1658ac_signal=0
1659
1660# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# Predefined preprocessor variables.
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_NAME "$PACKAGE_NAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_VERSION "$PACKAGE_VERSION"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_STRING "$PACKAGE_STRING"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1687_ACEOF
1688
1689
1690# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001691# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001693 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001695 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001697 set x "$ac_default_prefix/share/config.site" \
1698 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700shift
1701for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001704 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1705echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 . "$ac_site_file"
1708 fi
1709done
1710
1711if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 # Some versions of bash will fail to source /dev/null (special
1713 # files actually), so we avoid doing that.
1714 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001715 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1716echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 esac
1721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001723 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1724echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 >$cache_file
1726fi
1727
1728# Check that the precious variables saved in the cache have kept the same
1729# value.
1730ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1733 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 case $ac_old_set,$ac_new_set in
1737 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1739echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 ac_cache_corrupted=: ;;
1741 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_cache_corrupted=: ;;
1745 ,);;
1746 *)
1747 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1751echo "$as_me: former value: $ac_old_val" >&2;}
1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1753echo "$as_me: current value: $ac_new_val" >&2;}
1754 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 fi;;
1756 esac
1757 # Pass precious variables to config.status.
1758 if test "$ac_new_set" = set; then
1759 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 *) ac_arg=$ac_var=$ac_new_val ;;
1762 esac
1763 case " $ac_configure_args " in
1764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1765 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1766 esac
1767 fi
1768done
1769if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001774 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775fi
1776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
Guido van Rossum7f43da71994-08-01 12:15:30 +00001801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807
Michael W. Hudson54241132001-12-07 15:38:26 +00001808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001810
1811
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
Benjamin Petersond23f8222009-04-05 19:13:16 +00001813if test "$prefix" != "/"; then
1814 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1815fi
1816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
1819
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001821
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001822# We don't use PACKAGE_ variables, and they cause conflicts
1823# with other autoconf-based packages that include Python.h
1824grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1825rm confdefs.h
1826mv confdefs.h.new confdefs.h
1827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001829VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwis1142de32002-03-29 16:28:31 +00001831
1832SOVERSION=1.0
1833
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001834# The later defininition of _XOPEN_SOURCE disables certain features
1835# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1836
1837cat >>confdefs.h <<\_ACEOF
1838#define _GNU_SOURCE 1
1839_ACEOF
1840
1841
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001842# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1843# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1844# them.
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _NETBSD_SOURCE 1
1848_ACEOF
1849
1850
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define __BSD_VISIBLE 1
1857_ACEOF
1858
1859
Martin v. Löwisd6320502004-08-12 13:45:08 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1862
1863cat >>confdefs.h <<\_ACEOF
1864#define _BSD_TYPES 1
1865_ACEOF
1866
1867
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001868# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1869# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1870# them.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _DARWIN_C_SOURCE 1
1874_ACEOF
1875
1876
1877
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001878define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001879
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001880# Arguments passed to configure.
1881
1882CONFIG_ARGS="$ac_configure_args"
1883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001884# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001885if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887 case $enableval in
1888 yes)
1889 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1890 ;;
1891 esac
1892 case $enableval in
1893 no)
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896 ;;
1897 *)
1898 UNIVERSALSDK=$enableval
1899 ;;
1900 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001901
Thomas Wouters477c8d52006-05-27 19:21:47 +00001902else
1903
1904 UNIVERSALSDK=
1905 enable_universalsdk=
1906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001907fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908
1909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001910
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001911
1912
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001913UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001914{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1915echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001916
1917# Check whether --with-universal-archs was given.
1918if test "${with_universal_archs+set}" = set; then
1919 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001920 { echo "$as_me:$LINENO: result: $withval" >&5
1921echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001922 UNIVERSAL_ARCHS="$withval"
1923
1924else
1925
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001926 { echo "$as_me:$LINENO: result: 32-bit" >&5
1927echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001928
1929fi
1930
1931
1932
1933
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001934
1935# Check whether --with-framework-name was given.
1936if test "${with_framework_name+set}" = set; then
1937 withval=$with_framework_name;
1938 PYTHONFRAMEWORK=${withval}
1939 PYTHONFRAMEWORKDIR=${withval}.framework
1940 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1941
1942else
1943
1944 PYTHONFRAMEWORK=Python
1945 PYTHONFRAMEWORKDIR=Python.framework
1946 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1947
1948fi
1949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001950# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001951if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001952 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001953 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001955 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001956 esac
1957 case $enableval in
1958 no)
1959 PYTHONFRAMEWORK=
1960 PYTHONFRAMEWORKDIR=no-framework
1961 PYTHONFRAMEWORKPREFIX=
1962 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001963 FRAMEWORKINSTALLFIRST=
1964 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001965 FRAMEWORKALTINSTALLFIRST=
1966 FRAMEWORKALTINSTALLLAST=
1967 if test "x${prefix}" = "xNONE"; then
1968 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1969 else
1970 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1971 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001972 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001973 ;;
1974 *)
1975 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001977 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001978 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001979 if test "$UNIVERSAL_ARCHS" = "all"
1980 then
1981 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001982 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001983 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1986 fi
1987
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001988 if test "x${prefix}" = "xNONE" ; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001995 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001999 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002000
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
2017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024 if test "$UNIVERSAL_ARCHS" = "all"
2025 then
2026 FRAMEWORKINSTALLLAST=update4wayuniversal
2027 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2028 fi
2029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002030fi
2031
Thomas Wouters477c8d52006-05-27 19:21:47 +00002032
2033
Michael W. Hudson54241132001-12-07 15:38:26 +00002034
2035
2036
2037
Jack Jansene578a632001-08-15 01:27:14 +00002038
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002039
2040
2041
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002042
Jack Jansene578a632001-08-15 01:27:14 +00002043##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002044## AC_HELP_STRING(--with-dyld,
2045## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002046##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002047# Set name for machine-dependent library files
2048
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002049{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2050echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051if test -z "$MACHDEP"
2052then
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002054 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002055 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002056 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002060 ac_md_system=`echo $ac_sys_system |
2061 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2062 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002063 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002065
Guido van Rossum07397971997-04-29 21:49:50 +00002066 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002067 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002068 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002069 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002070 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002071 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072 esac
2073fi
Guido van Rossum91922671997-10-09 20:24:13 +00002074
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002075# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2076# disable features if it is defined, without any means to access these
2077# features as extensions. For these systems, we skip the definition of
2078# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2079# some feature, make sure there is no alternative way to access this
2080# feature. Also, when using wildcards, make sure you have verified the
2081# need for not defining _XOPEN_SOURCE on all systems matching the
2082# wildcard, and that the wildcard does not include future systems
2083# (which may remove their limitations).
2084case $ac_sys_system/$ac_sys_release in
2085 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2086 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002087 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002088 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002089 define_xopen_source=no
2090 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2091 # also defined. This can be overridden by defining _BSD_SOURCE
2092 # As this has a different meaning on Linux, only define it on OpenBSD
2093
2094cat >>confdefs.h <<\_ACEOF
2095#define _BSD_SOURCE 1
2096_ACEOF
2097
2098 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002099 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2100 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2101 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002102 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002103 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002104 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2105 # of union __?sigval. Reported by Stuart Bishop.
2106 SunOS/5.6)
2107 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002108 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2109 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002110 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002111 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002112 define_xopen_source=no;;
2113 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002115 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002116 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002117 # On FreeBSD 4, the math functions C89 does not cover are never defined
2118 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2119 FreeBSD/4.*)
2120 define_xopen_source=no;;
2121 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2122 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2123 # identifies itself as Darwin/7.*
2124 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # disables platform specific features beyond repair.
2126 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2127 # has no effect, don't bother defining them
2128 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002133 AIX/4)
2134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 AIX/5)
2136 if test `uname -r` -eq 1; then
2137 define_xopen_source=no
2138 fi
2139 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2141 # defining NI_NUMERICHOST.
2142 QNX/6.3.2)
2143 define_xopen_source=no
2144 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002146esac
2147
2148if test $define_xopen_source = yes
2149then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002150 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2151 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002152 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2153 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002155 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002156
2157cat >>confdefs.h <<\_ACEOF
2158#define _XOPEN_SOURCE 500
2159_ACEOF
2160
2161 ;;
2162 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002163
2164cat >>confdefs.h <<\_ACEOF
2165#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002166_ACEOF
2167
Skip Montanarof0d5f792004-08-15 14:08:23 +00002168 ;;
2169 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002170
2171 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2172 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2173 # several APIs are not declared. Since this is also needed in some
2174 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002175 # except for Solaris 10, where it must not be defined,
2176 # as it implies XPG4.2
2177 case $ac_sys_system/$ac_sys_release in
2178 SunOS/5.10)
2179 ;;
2180 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181
2182cat >>confdefs.h <<\_ACEOF
2183#define _XOPEN_SOURCE_EXTENDED 1
2184_ACEOF
2185
Martin v. Löwis7dece662005-11-26 11:38:24 +00002186 ;;
2187 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002189
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002190cat >>confdefs.h <<\_ACEOF
2191#define _POSIX_C_SOURCE 200112L
2192_ACEOF
2193
2194
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002195fi
2196
Guido van Rossum91922671997-10-09 20:24:13 +00002197#
2198# SGI compilers allow the specification of the both the ABI and the
2199# ISA on the command line. Depending on the values of these switches,
2200# different and often incompatable code will be generated.
2201#
2202# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2203# thus supply support for various ABI/ISA combinations. The MACHDEP
2204# variable is also adjusted.
2205#
2206
2207if test ! -z "$SGI_ABI"
2208then
2209 CC="cc $SGI_ABI"
2210 LDFLAGS="$SGI_ABI $LDFLAGS"
2211 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2212fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002213{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2214echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002215
Jack Jansen6b08a402004-06-03 12:41:45 +00002216# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2217# it may influence the way we can build extensions, so distutils
2218# needs to check it
2219
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220
Jack Jansen6b08a402004-06-03 12:41:45 +00002221CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002222EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002223
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002224{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2225echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002226ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002227{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2228echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002229
Guido van Rossum627b2d71993-12-24 10:39:16 +00002230# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002231
2232# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2233# for debug/optimization stuff. BASECFLAGS is for flags that are required
2234# just to get things to compile and link. Users are free to override OPT
2235# when running configure or make. The build should not break if they do.
2236# BASECFLAGS should generally not be messed with, however.
2237
2238# XXX shouldn't some/most/all of this code be merged with the stuff later
2239# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002240{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2241echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002243# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002244if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002245 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002246 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002247 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002248 without_gcc=yes;;
2249 yes) CC=gcc
2250 without_gcc=no;;
2251 *) CC=$withval
2252 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002253 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002254else
Martin v. Löwis11437992002-04-12 09:54:03 +00002255
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002256 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002257 AIX*) CC=cc_r
2258 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002259 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002260 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002261fi
2262
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002263{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2264echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002265
Guido van Rossum8b131c51995-03-09 14:10:13 +00002266# If the user switches compilers, we can't believe the cache
2267if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2268then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002269 { { echo "$as_me:$LINENO: 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)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002271echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002272(it is also a good idea to do 'make clean' before compiling)" >&2;}
2273 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002274fi
2275
Martin v. Löwis11437992002-04-12 09:54:03 +00002276ac_ext=c
2277ac_cpp='$CPP $CPPFLAGS'
2278ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2279ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2280ac_compiler_gnu=$ac_cv_c_compiler_gnu
2281if test -n "$ac_tool_prefix"; then
2282 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2283set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002284{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2285echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002286if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002288else
2289 if test -n "$CC"; then
2290 ac_cv_prog_CC="$CC" # Let the user override the test.
2291else
Martin v. Löwis11437992002-04-12 09:54:03 +00002292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2293for as_dir in $PATH
2294do
2295 IFS=$as_save_IFS
2296 test -z "$as_dir" && as_dir=.
2297 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002298 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 +00002299 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002301 break 2
2302 fi
2303done
2304done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002305IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002306
Jack Jansendd19cf82001-12-06 22:36:17 +00002307fi
2308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002309CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002310if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002311 { echo "$as_me:$LINENO: result: $CC" >&5
2312echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002313else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002314 { echo "$as_me:$LINENO: result: no" >&5
2315echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002316fi
2317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002318
Martin v. Löwis11437992002-04-12 09:54:03 +00002319fi
2320if test -z "$ac_cv_prog_CC"; then
2321 ac_ct_CC=$CC
2322 # Extract the first word of "gcc", so it can be a program name with args.
2323set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002326if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002327 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002328else
2329 if test -n "$ac_ct_CC"; then
2330 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2331else
2332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2333for as_dir in $PATH
2334do
2335 IFS=$as_save_IFS
2336 test -z "$as_dir" && as_dir=.
2337 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338 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 +00002339 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002341 break 2
2342 fi
2343done
2344done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347fi
2348fi
2349ac_ct_CC=$ac_cv_prog_ac_ct_CC
2350if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002351 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2352echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002353else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002354 { echo "$as_me:$LINENO: result: no" >&5
2355echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002356fi
2357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358 if test "x$ac_ct_CC" = x; then
2359 CC=""
2360 else
2361 case $cross_compiling:$ac_tool_warned in
2362yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002363{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2364whose name does not start with the host triplet. If you think this
2365configuration is useful to you, please write to autoconf@gnu.org." >&5
2366echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2367whose name does not start with the host triplet. If you think this
2368configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369ac_tool_warned=yes ;;
2370esac
2371 CC=$ac_ct_CC
2372 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002373else
2374 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002375fi
2376
Jack Jansendd19cf82001-12-06 22:36:17 +00002377if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378 if test -n "$ac_tool_prefix"; then
2379 # 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 +00002380set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002381{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002383if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002384 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002385else
2386 if test -n "$CC"; then
2387 ac_cv_prog_CC="$CC" # Let the user override the test.
2388else
Martin v. Löwis11437992002-04-12 09:54:03 +00002389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2390for as_dir in $PATH
2391do
2392 IFS=$as_save_IFS
2393 test -z "$as_dir" && as_dir=.
2394 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002395 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 +00002396 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002398 break 2
2399 fi
2400done
2401done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002403
2404fi
2405fi
2406CC=$ac_cv_prog_CC
2407if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002408 { echo "$as_me:$LINENO: result: $CC" >&5
2409echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002410else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002411 { echo "$as_me:$LINENO: result: no" >&5
2412echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413fi
2414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415
Martin v. Löwis11437992002-04-12 09:54:03 +00002416 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002417fi
2418if test -z "$CC"; then
2419 # Extract the first word of "cc", so it can be a program name with args.
2420set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002421{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2422echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002423if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002424 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002425else
2426 if test -n "$CC"; then
2427 ac_cv_prog_CC="$CC" # Let the user override the test.
2428else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002429 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2431for as_dir in $PATH
2432do
2433 IFS=$as_save_IFS
2434 test -z "$as_dir" && as_dir=.
2435 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436 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 +00002437 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2438 ac_prog_rejected=yes
2439 continue
2440 fi
2441 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002442 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002443 break 2
2444 fi
2445done
2446done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002448
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002449if test $ac_prog_rejected = yes; then
2450 # We found a bogon in the path, so make sure we never use it.
2451 set dummy $ac_cv_prog_CC
2452 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002454 # We chose a different compiler from the bogus one.
2455 # However, it has the same basename, so the bogon will be chosen
2456 # first if we set CC to just the basename; use the full file name.
2457 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002459 fi
2460fi
2461fi
2462fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002463CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002465 { echo "$as_me:$LINENO: result: $CC" >&5
2466echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002468 { echo "$as_me:$LINENO: result: no" >&5
2469echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002470fi
2471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472
Martin v. Löwis11437992002-04-12 09:54:03 +00002473fi
2474if test -z "$CC"; then
2475 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 do
2478 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2479set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002480{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2481echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002482if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002483 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002484else
2485 if test -n "$CC"; then
2486 ac_cv_prog_CC="$CC" # Let the user override the test.
2487else
Martin v. Löwis11437992002-04-12 09:54:03 +00002488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2489for as_dir in $PATH
2490do
2491 IFS=$as_save_IFS
2492 test -z "$as_dir" && as_dir=.
2493 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 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 +00002495 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002496 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002498 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002499done
2500done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002502
2503fi
2504fi
2505CC=$ac_cv_prog_CC
2506if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002507 { echo "$as_me:$LINENO: result: $CC" >&5
2508echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002509else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002510 { echo "$as_me:$LINENO: result: no" >&5
2511echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002512fi
2513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 test -n "$CC" && break
2516 done
2517fi
2518if test -z "$CC"; then
2519 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002521do
2522 # Extract the first word of "$ac_prog", so it can be a program name with args.
2523set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002524{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2525echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002526if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002527 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002528else
2529 if test -n "$ac_ct_CC"; then
2530 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2531else
2532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2533for as_dir in $PATH
2534do
2535 IFS=$as_save_IFS
2536 test -z "$as_dir" && as_dir=.
2537 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 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 +00002539 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002540 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 break 2
2542 fi
2543done
2544done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547fi
2548fi
2549ac_ct_CC=$ac_cv_prog_ac_ct_CC
2550if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002551 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2552echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002553else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002554 { echo "$as_me:$LINENO: result: no" >&5
2555echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002556fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 test -n "$ac_ct_CC" && break
2560done
Michael W. Hudson54241132001-12-07 15:38:26 +00002561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 if test "x$ac_ct_CC" = x; then
2563 CC=""
2564 else
2565 case $cross_compiling:$ac_tool_warned in
2566yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002567{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2568whose name does not start with the host triplet. If you think this
2569configuration is useful to you, please write to autoconf@gnu.org." >&5
2570echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2571whose name does not start with the host triplet. If you think this
2572configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573ac_tool_warned=yes ;;
2574esac
2575 CC=$ac_ct_CC
2576 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002577fi
2578
2579fi
2580
2581
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002582test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002583See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002584echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002585See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002586 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587
2588# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002589echo "$as_me:$LINENO: checking for C compiler version" >&5
2590ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591{ (ac_try="$ac_compiler --version >&5"
2592case "(($ac_try" in
2593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2594 *) ac_try_echo=$ac_try;;
2595esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601{ (ac_try="$ac_compiler -v >&5"
2602case "(($ac_try" in
2603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2604 *) ac_try_echo=$ac_try;;
2605esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611{ (ac_try="$ac_compiler -V >&5"
2612case "(($ac_try" in
2613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2614 *) ac_try_echo=$ac_try;;
2615esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 (exit $ac_status); }
2621
2622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002623/* confdefs.h. */
2624_ACEOF
2625cat confdefs.h >>conftest.$ac_ext
2626cat >>conftest.$ac_ext <<_ACEOF
2627/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629int
2630main ()
2631{
2632
2633 ;
2634 return 0;
2635}
2636_ACEOF
2637ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002638ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002639# Try to create an executable without -o first, disregard a.out.
2640# It will help us diagnose broken compilers, and finding out an intuition
2641# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002642{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2643echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2644ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2645#
2646# List of possible output files, starting from the most likely.
2647# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2648# only as a last resort. b.out is created by i960 compilers.
2649ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2650#
2651# The IRIX 6 linker writes into existing files which may not be
2652# executable, retaining their permissions. Remove them first so a
2653# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654ac_rmfiles=
2655for ac_file in $ac_files
2656do
2657 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002658 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002659 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2660 esac
2661done
2662rm -f $ac_rmfiles
2663
2664if { (ac_try="$ac_link_default"
2665case "(($ac_try" in
2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2667 *) ac_try_echo=$ac_try;;
2668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2675# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2676# in a Makefile. We should not override ac_cv_exeext if it was cached,
2677# so that the user can short-circuit this test for compilers unknown to
2678# Autoconf.
2679for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002680do
2681 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002683 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002684 ;;
2685 [ab].out )
2686 # We found the default executable, but exeext='' is most
2687 # certainly right.
2688 break;;
2689 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2691 then :; else
2692 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2693 fi
2694 # We set ac_cv_exeext here because the later test for it is not
2695 # safe: cross compilers may not add the suffix if given an `-o'
2696 # argument, so we may need to know it at that point already.
2697 # Even if this section looks crufty: it has the advantage of
2698 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002699 break;;
2700 * )
2701 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 esac
2703done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704test "$ac_cv_exeext" = no && ac_cv_exeext=
2705
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002706else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707 ac_file=''
2708fi
2709
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002710{ echo "$as_me:$LINENO: result: $ac_file" >&5
2711echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002714sed 's/^/| /' conftest.$ac_ext >&5
2715
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002716{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002717See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002718echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002719See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002720 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002721fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002722
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002723ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002726# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002727{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2728echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002729# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2730# If not cross compiling, check that we can run a simple program.
2731if test "$cross_compiling" != yes; then
2732 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733 { (case "(($ac_try" in
2734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2735 *) ac_try_echo=$ac_try;;
2736esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 (exit $ac_status); }; }; then
2742 cross_compiling=no
2743 else
2744 if test "$cross_compiling" = maybe; then
2745 cross_compiling=yes
2746 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002747 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002748If you meant to cross compile, use \`--host'.
2749See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002750echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002751If you meant to cross compile, use \`--host'.
2752See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002753 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 fi
2755 fi
2756fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002757{ echo "$as_me:$LINENO: result: yes" >&5
2758echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002760rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002761ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002763# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002764{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2765echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2766{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2767echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002768
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002769{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2770echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771if { (ac_try="$ac_link"
2772case "(($ac_try" in
2773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2774 *) ac_try_echo=$ac_try;;
2775esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002781 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2782# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2783# work properly (i.e., refer to `conftest.exe'), while it won't with
2784# `rm'.
2785for ac_file in conftest.exe conftest conftest.*; do
2786 test -f "$ac_file" || continue
2787 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002788 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002789 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2790 break;;
2791 * ) break;;
2792 esac
2793done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002795 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002796See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002797echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002798See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002799 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002800fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002801
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002802rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002803{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2804echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002805
2806rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002807EXEEXT=$ac_cv_exeext
2808ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002809{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2810echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002811if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002812 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002813else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002814 cat >conftest.$ac_ext <<_ACEOF
2815/* confdefs.h. */
2816_ACEOF
2817cat confdefs.h >>conftest.$ac_ext
2818cat >>conftest.$ac_ext <<_ACEOF
2819/* end confdefs.h. */
2820
2821int
2822main ()
2823{
2824
2825 ;
2826 return 0;
2827}
2828_ACEOF
2829rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830if { (ac_try="$ac_compile"
2831case "(($ac_try" in
2832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2833 *) ac_try_echo=$ac_try;;
2834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002836 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002840 for ac_file in conftest.o conftest.obj conftest.*; do
2841 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002843 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2845 break;;
2846 esac
2847done
2848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002850sed 's/^/| /' conftest.$ac_ext >&5
2851
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002852{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002854echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002855See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002856 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002857fi
2858
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002859rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002860fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002861{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2862echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002863OBJEXT=$ac_cv_objext
2864ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002865{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2866echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002867if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002868 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002869else
2870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002871/* confdefs.h. */
2872_ACEOF
2873cat confdefs.h >>conftest.$ac_ext
2874cat >>conftest.$ac_ext <<_ACEOF
2875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002876
Martin v. Löwis11437992002-04-12 09:54:03 +00002877int
2878main ()
2879{
2880#ifndef __GNUC__
2881 choke me
2882#endif
2883
2884 ;
2885 return 0;
2886}
2887_ACEOF
2888rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002889if { (ac_try="$ac_compile"
2890case "(($ac_try" in
2891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2892 *) ac_try_echo=$ac_try;;
2893esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002897 grep -v '^ *+' conftest.er1 >conftest.err
2898 rm -f conftest.er1
2899 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002901 (exit $ac_status); } && {
2902 test -z "$ac_c_werror_flag" ||
2903 test ! -s conftest.err
2904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 ac_compiler_gnu=yes
2906else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002908sed 's/^/| /' conftest.$ac_ext >&5
2909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002912
2913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002914ac_cv_c_compiler_gnu=$ac_compiler_gnu
2915
2916fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002917{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2918echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2919GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002920ac_test_CFLAGS=${CFLAGS+set}
2921ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002922{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2923echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002924if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002926else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002927 ac_save_c_werror_flag=$ac_c_werror_flag
2928 ac_c_werror_flag=yes
2929 ac_cv_prog_cc_g=no
2930 CFLAGS="-g"
2931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002932/* confdefs.h. */
2933_ACEOF
2934cat confdefs.h >>conftest.$ac_ext
2935cat >>conftest.$ac_ext <<_ACEOF
2936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Martin v. Löwis11437992002-04-12 09:54:03 +00002938int
2939main ()
2940{
2941
2942 ;
2943 return 0;
2944}
2945_ACEOF
2946rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002947if { (ac_try="$ac_compile"
2948case "(($ac_try" in
2949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2950 *) ac_try_echo=$ac_try;;
2951esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002955 grep -v '^ *+' conftest.er1 >conftest.err
2956 rm -f conftest.er1
2957 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002959 (exit $ac_status); } && {
2960 test -z "$ac_c_werror_flag" ||
2961 test ! -s conftest.err
2962 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002963 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002964else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002966sed 's/^/| /' conftest.$ac_ext >&5
2967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968 CFLAGS=""
2969 cat >conftest.$ac_ext <<_ACEOF
2970/* confdefs.h. */
2971_ACEOF
2972cat confdefs.h >>conftest.$ac_ext
2973cat >>conftest.$ac_ext <<_ACEOF
2974/* end confdefs.h. */
2975
2976int
2977main ()
2978{
2979
2980 ;
2981 return 0;
2982}
2983_ACEOF
2984rm -f conftest.$ac_objext
2985if { (ac_try="$ac_compile"
2986case "(($ac_try" in
2987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2988 *) ac_try_echo=$ac_try;;
2989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 (eval "$ac_compile") 2>conftest.er1
2992 ac_status=$?
2993 grep -v '^ *+' conftest.er1 >conftest.err
2994 rm -f conftest.er1
2995 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002997 (exit $ac_status); } && {
2998 test -z "$ac_c_werror_flag" ||
2999 test ! -s conftest.err
3000 } && test -s conftest.$ac_objext; then
3001 :
3002else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003003 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004sed 's/^/| /' conftest.$ac_ext >&5
3005
3006 ac_c_werror_flag=$ac_save_c_werror_flag
3007 CFLAGS="-g"
3008 cat >conftest.$ac_ext <<_ACEOF
3009/* confdefs.h. */
3010_ACEOF
3011cat confdefs.h >>conftest.$ac_ext
3012cat >>conftest.$ac_ext <<_ACEOF
3013/* end confdefs.h. */
3014
3015int
3016main ()
3017{
3018
3019 ;
3020 return 0;
3021}
3022_ACEOF
3023rm -f conftest.$ac_objext
3024if { (ac_try="$ac_compile"
3025case "(($ac_try" in
3026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3027 *) ac_try_echo=$ac_try;;
3028esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003030 (eval "$ac_compile") 2>conftest.er1
3031 ac_status=$?
3032 grep -v '^ *+' conftest.er1 >conftest.err
3033 rm -f conftest.er1
3034 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003036 (exit $ac_status); } && {
3037 test -z "$ac_c_werror_flag" ||
3038 test ! -s conftest.err
3039 } && test -s conftest.$ac_objext; then
3040 ac_cv_prog_cc_g=yes
3041else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003042 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043sed 's/^/| /' conftest.$ac_ext >&5
3044
3045
Guido van Rossum627b2d71993-12-24 10:39:16 +00003046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047
3048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
3051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3052fi
3053
3054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3055 ac_c_werror_flag=$ac_save_c_werror_flag
3056fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003057{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3058echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003060 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003061elif test $ac_cv_prog_cc_g = yes; then
3062 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003063 CFLAGS="-g -O2"
3064 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003065 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003066 fi
3067else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003068 if test "$GCC" = yes; then
3069 CFLAGS="-O2"
3070 else
3071 CFLAGS=
3072 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003073fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003074{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3075echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003077 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003078else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003080ac_save_CC=$CC
3081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003082/* confdefs.h. */
3083_ACEOF
3084cat confdefs.h >>conftest.$ac_ext
3085cat >>conftest.$ac_ext <<_ACEOF
3086/* end confdefs.h. */
3087#include <stdarg.h>
3088#include <stdio.h>
3089#include <sys/types.h>
3090#include <sys/stat.h>
3091/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3092struct buf { int x; };
3093FILE * (*rcsopen) (struct buf *, struct stat *, int);
3094static char *e (p, i)
3095 char **p;
3096 int i;
3097{
3098 return p[i];
3099}
3100static char *f (char * (*g) (char **, int), char **p, ...)
3101{
3102 char *s;
3103 va_list v;
3104 va_start (v,p);
3105 s = g (p, va_arg (v,int));
3106 va_end (v);
3107 return s;
3108}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003109
3110/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3111 function prototypes and stuff, but not '\xHH' hex character constants.
3112 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003114 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3115 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003117int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3120 inside strings and character constants. */
3121#define FOO(x) 'x'
3122int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3123
Skip Montanaro6dead952003-09-25 14:50:04 +00003124int test (int i, double x);
3125struct s1 {int (*f) (int a);};
3126struct s2 {int (*f) (double a);};
3127int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3128int argc;
3129char **argv;
3130int
3131main ()
3132{
3133return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3134 ;
3135 return 0;
3136}
3137_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3139 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003140do
3141 CC="$ac_save_CC $ac_arg"
3142 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143if { (ac_try="$ac_compile"
3144case "(($ac_try" in
3145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 *) ac_try_echo=$ac_try;;
3147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003151 grep -v '^ *+' conftest.er1 >conftest.err
3152 rm -f conftest.er1
3153 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003155 (exit $ac_status); } && {
3156 test -z "$ac_c_werror_flag" ||
3157 test ! -s conftest.err
3158 } && test -s conftest.$ac_objext; then
3159 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003162sed 's/^/| /' conftest.$ac_ext >&5
3163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164
Skip Montanaro6dead952003-09-25 14:50:04 +00003165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003166
3167rm -f core conftest.err conftest.$ac_objext
3168 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003169done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003171CC=$ac_save_CC
3172
3173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174# AC_CACHE_VAL
3175case "x$ac_cv_prog_cc_c89" in
3176 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003177 { echo "$as_me:$LINENO: result: none needed" >&5
3178echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003180 { echo "$as_me:$LINENO: result: unsupported" >&5
3181echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003182 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003184 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3185echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003186esac
3187
Skip Montanaro6dead952003-09-25 14:50:04 +00003188
Martin v. Löwis11437992002-04-12 09:54:03 +00003189ac_ext=c
3190ac_cpp='$CPP $CPPFLAGS'
3191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3193ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003194
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003195
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003196
3197
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003198{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3199echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003202if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003204
3205 case $withval in
3206 no) with_cxx_main=no
3207 MAINCC='$(CC)';;
3208 yes) with_cxx_main=yes
3209 MAINCC='$(CXX)';;
3210 *) with_cxx_main=yes
3211 MAINCC=$withval
3212 if test -z "$CXX"
3213 then
3214 CXX=$withval
3215 fi;;
3216 esac
3217else
3218
3219 with_cxx_main=no
3220 MAINCC='$(CC)'
3221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003222fi
3223
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003224{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3225echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003226
3227preset_cxx="$CXX"
3228if test -z "$CXX"
3229then
3230 case "$CC" in
3231 gcc) # Extract the first word of "g++", so it can be a program name with args.
3232set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003233{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3234echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003236 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003237else
3238 case $CXX in
3239 [\\/]* | ?:[\\/]*)
3240 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3241 ;;
3242 *)
3243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3244for as_dir in notfound
3245do
3246 IFS=$as_save_IFS
3247 test -z "$as_dir" && as_dir=.
3248 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003249 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 +00003250 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003251 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003252 break 2
3253 fi
3254done
3255done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003257
3258 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3259 ;;
3260esac
3261fi
3262CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003263if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003264 { echo "$as_me:$LINENO: result: $CXX" >&5
3265echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003266else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003267 { echo "$as_me:$LINENO: result: no" >&5
3268echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003271 ;;
3272 cc) # Extract the first word of "c++", so it can be a program name with args.
3273set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003274{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003277 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003278else
3279 case $CXX in
3280 [\\/]* | ?:[\\/]*)
3281 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3282 ;;
3283 *)
3284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3285for as_dir in notfound
3286do
3287 IFS=$as_save_IFS
3288 test -z "$as_dir" && as_dir=.
3289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 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 +00003291 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003293 break 2
3294 fi
3295done
3296done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003298
3299 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3300 ;;
3301esac
3302fi
3303CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003304if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003305 { echo "$as_me:$LINENO: result: $CXX" >&5
3306echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003307else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003308 { echo "$as_me:$LINENO: result: no" >&5
3309echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003312 ;;
3313 esac
3314 if test "$CXX" = "notfound"
3315 then
3316 CXX=""
3317 fi
3318fi
3319if test -z "$CXX"
3320then
3321 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3322do
3323 # Extract the first word of "$ac_prog", so it can be a program name with args.
3324set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003325{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003328 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003329else
3330 if test -n "$CXX"; then
3331 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3332else
3333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in $PATH
3335do
3336 IFS=$as_save_IFS
3337 test -z "$as_dir" && as_dir=.
3338 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339 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 +00003340 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003342 break 2
3343 fi
3344done
3345done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003347
3348fi
3349fi
3350CXX=$ac_cv_prog_CXX
3351if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003352 { echo "$as_me:$LINENO: result: $CXX" >&5
3353echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003354else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003355 { echo "$as_me:$LINENO: result: no" >&5
3356echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003357fi
3358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360 test -n "$CXX" && break
3361done
3362test -n "$CXX" || CXX="notfound"
3363
3364 if test "$CXX" = "notfound"
3365 then
3366 CXX=""
3367 fi
3368fi
3369if test "$preset_cxx" != "$CXX"
3370then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003371 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003372
3373 By default, distutils will build C++ extension modules with \"$CXX\".
3374 If this is not intended, then set CXX on the configure command line.
3375 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003376echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003377
3378 By default, distutils will build C++ extension modules with \"$CXX\".
3379 If this is not intended, then set CXX on the configure command line.
3380 " >&2;}
3381fi
3382
3383
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003384# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003385
3386ac_ext=c
3387ac_cpp='$CPP $CPPFLAGS'
3388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003391{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3392echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003393# On Suns, sometimes $CPP names a directory.
3394if test -n "$CPP" && test -d "$CPP"; then
3395 CPP=
3396fi
3397if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003399 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003400else
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 # Double quotes because CPP needs to be expanded
3402 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3403 do
3404 ac_preproc_ok=false
3405for ac_c_preproc_warn_flag in '' yes
3406do
3407 # Use a header file that comes with gcc, so configuring glibc
3408 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003409 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3410 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003411 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003412 # not just through cpp. "Syntax error" is here to catch this case.
3413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003414/* confdefs.h. */
3415_ACEOF
3416cat confdefs.h >>conftest.$ac_ext
3417cat >>conftest.$ac_ext <<_ACEOF
3418/* end confdefs.h. */
3419#ifdef __STDC__
3420# include <limits.h>
3421#else
3422# include <assert.h>
3423#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003424 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003425_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426if { (ac_try="$ac_cpp conftest.$ac_ext"
3427case "(($ac_try" in
3428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3429 *) ac_try_echo=$ac_try;;
3430esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003434 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003435 rm -f conftest.er1
3436 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003438 (exit $ac_status); } >/dev/null && {
3439 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3440 test ! -s conftest.err
3441 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442 :
3443else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003445sed 's/^/| /' conftest.$ac_ext >&5
3446
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 # Broken: fails on valid input.
3448continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450
Martin v. Löwis11437992002-04-12 09:54:03 +00003451rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 # can be detected and how.
3455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003456/* confdefs.h. */
3457_ACEOF
3458cat confdefs.h >>conftest.$ac_ext
3459cat >>conftest.$ac_ext <<_ACEOF
3460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003461#include <ac_nonexistent.h>
3462_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463if { (ac_try="$ac_cpp conftest.$ac_ext"
3464case "(($ac_try" in
3465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3466 *) ac_try_echo=$ac_try;;
3467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003471 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003472 rm -f conftest.er1
3473 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 (exit $ac_status); } >/dev/null && {
3476 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3477 test ! -s conftest.err
3478 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 # Broken: success on invalid input.
3480continue
3481else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003483sed 's/^/| /' conftest.$ac_ext >&5
3484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 # Passes both tests.
3486ac_preproc_ok=:
3487break
3488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489
Martin v. Löwis11437992002-04-12 09:54:03 +00003490rm -f conftest.err conftest.$ac_ext
3491
3492done
3493# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3494rm -f conftest.err conftest.$ac_ext
3495if $ac_preproc_ok; then
3496 break
3497fi
3498
3499 done
3500 ac_cv_prog_CPP=$CPP
3501
3502fi
3503 CPP=$ac_cv_prog_CPP
3504else
3505 ac_cv_prog_CPP=$CPP
3506fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003507{ echo "$as_me:$LINENO: result: $CPP" >&5
3508echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003509ac_preproc_ok=false
3510for ac_c_preproc_warn_flag in '' yes
3511do
3512 # Use a header file that comes with gcc, so configuring glibc
3513 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003514 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3515 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 # On the NeXT, cc -E runs the code through the compiler's parser,
3517 # not just through cpp. "Syntax error" is here to catch this case.
3518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003519/* confdefs.h. */
3520_ACEOF
3521cat confdefs.h >>conftest.$ac_ext
3522cat >>conftest.$ac_ext <<_ACEOF
3523/* end confdefs.h. */
3524#ifdef __STDC__
3525# include <limits.h>
3526#else
3527# include <assert.h>
3528#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003529 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003530_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531if { (ac_try="$ac_cpp conftest.$ac_ext"
3532case "(($ac_try" in
3533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3534 *) ac_try_echo=$ac_try;;
3535esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003539 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 rm -f conftest.er1
3541 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 (exit $ac_status); } >/dev/null && {
3544 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3545 test ! -s conftest.err
3546 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 :
3548else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003550sed 's/^/| /' conftest.$ac_ext >&5
3551
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 # Broken: fails on valid input.
3553continue
3554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555
Martin v. Löwis11437992002-04-12 09:54:03 +00003556rm -f conftest.err conftest.$ac_ext
3557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 # can be detected and how.
3560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003561/* confdefs.h. */
3562_ACEOF
3563cat confdefs.h >>conftest.$ac_ext
3564cat >>conftest.$ac_ext <<_ACEOF
3565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003566#include <ac_nonexistent.h>
3567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568if { (ac_try="$ac_cpp conftest.$ac_ext"
3569case "(($ac_try" in
3570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3571 *) ac_try_echo=$ac_try;;
3572esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003576 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 rm -f conftest.er1
3578 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 (exit $ac_status); } >/dev/null && {
3581 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3582 test ! -s conftest.err
3583 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # Broken: success on invalid input.
3585continue
3586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003588sed 's/^/| /' conftest.$ac_ext >&5
3589
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # Passes both tests.
3591ac_preproc_ok=:
3592break
3593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594
Martin v. Löwis11437992002-04-12 09:54:03 +00003595rm -f conftest.err conftest.$ac_ext
3596
3597done
3598# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3599rm -f conftest.err conftest.$ac_ext
3600if $ac_preproc_ok; then
3601 :
3602else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003603 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003604See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003605echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003606See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003607 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609
3610ac_ext=c
3611ac_cpp='$CPP $CPPFLAGS'
3612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3614ac_compiler_gnu=$ac_cv_c_compiler_gnu
3615
3616
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003617{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3618echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003620 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003621else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003622 # Extract the first word of "grep ggrep" to use in msg output
3623if test -z "$GREP"; then
3624set dummy grep ggrep; ac_prog_name=$2
3625if test "${ac_cv_path_GREP+set}" = set; then
3626 echo $ECHO_N "(cached) $ECHO_C" >&6
3627else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003629# Loop through the user's path and test for each of PROGNAME-LIST
3630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3632do
3633 IFS=$as_save_IFS
3634 test -z "$as_dir" && as_dir=.
3635 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003636 for ac_exec_ext in '' $ac_executable_extensions; do
3637 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3638 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3639 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640 # Check for GNU $ac_path_GREP
3641case `"$ac_path_GREP" --version 2>&1` in
3642*GNU*)
3643 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3644*)
3645 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003646 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647 while :
3648 do
3649 cat "conftest.in" "conftest.in" >"conftest.tmp"
3650 mv "conftest.tmp" "conftest.in"
3651 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003652 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3654 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3655 ac_count=`expr $ac_count + 1`
3656 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3657 # Best one so far, save it but keep looking for a better one
3658 ac_cv_path_GREP="$ac_path_GREP"
3659 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003660 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661 # 10*(2^10) chars as input seems more than enough
3662 test $ac_count -gt 10 && break
3663 done
3664 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3665esac
3666
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003667
3668 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 done
3670done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003671
3672done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003674
3675
3676fi
3677
3678GREP="$ac_cv_path_GREP"
3679if test -z "$GREP"; then
3680 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3681echo "$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 +00003682 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685else
3686 ac_cv_path_GREP=$GREP
3687fi
3688
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003691{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3692echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 GREP="$ac_cv_path_GREP"
3694
3695
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003696{ echo "$as_me:$LINENO: checking for egrep" >&5
3697echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003699 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700else
3701 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3702 then ac_cv_path_EGREP="$GREP -E"
3703 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003704 # Extract the first word of "egrep" to use in msg output
3705if test -z "$EGREP"; then
3706set dummy egrep; ac_prog_name=$2
3707if test "${ac_cv_path_EGREP+set}" = set; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3709else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003711# Loop through the user's path and test for each of PROGNAME-LIST
3712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
3717 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
3719 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3720 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3721 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722 # Check for GNU $ac_path_EGREP
3723case `"$ac_path_EGREP" --version 2>&1` in
3724*GNU*)
3725 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3726*)
3727 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003728 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 while :
3730 do
3731 cat "conftest.in" "conftest.in" >"conftest.tmp"
3732 mv "conftest.tmp" "conftest.in"
3733 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003734 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3736 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3737 ac_count=`expr $ac_count + 1`
3738 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3739 # Best one so far, save it but keep looking for a better one
3740 ac_cv_path_EGREP="$ac_path_EGREP"
3741 ac_path_EGREP_max=$ac_count
3742 fi
3743 # 10*(2^10) chars as input seems more than enough
3744 test $ac_count -gt 10 && break
3745 done
3746 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3747esac
3748
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003749
3750 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 done
3752done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003753
3754done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003756
3757
3758fi
3759
3760EGREP="$ac_cv_path_EGREP"
3761if test -z "$EGREP"; then
3762 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3763echo "$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 +00003764 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003765fi
3766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767else
3768 ac_cv_path_EGREP=$EGREP
3769fi
3770
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772 fi
3773fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003774{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3775echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003777
3778
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003779
3780{ echo "$as_me:$LINENO: checking for AIX" >&5
3781echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3782cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003783/* confdefs.h. */
3784_ACEOF
3785cat confdefs.h >>conftest.$ac_ext
3786cat >>conftest.$ac_ext <<_ACEOF
3787/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003788#ifdef _AIX
3789 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003790#endif
3791
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003792_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3794 $EGREP "yes" >/dev/null 2>&1; then
3795 { echo "$as_me:$LINENO: result: yes" >&5
3796echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003797cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003798#define _ALL_SOURCE 1
3799_ACEOF
3800
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003801else
3802 { echo "$as_me:$LINENO: result: no" >&5
3803echo "${ECHO_T}no" >&6; }
3804fi
3805rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003806
3807
3808
3809# Check for unsupported systems
3810case $ac_sys_system/$ac_sys_release in
3811atheos*|Linux*/1*)
3812 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3813 echo See README for details.
3814 exit 1;;
3815esac
3816
3817
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003818{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3819echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003820
3821# Check whether --with-suffix was given.
3822if test "${with_suffix+set}" = set; then
3823 withval=$with_suffix;
3824 case $withval in
3825 no) EXEEXT=;;
3826 yes) EXEEXT=.exe;;
3827 *) EXEEXT=$withval;;
3828 esac
3829fi
3830
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003831{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3832echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003833
3834# Test whether we're running on a non-case-sensitive system, in which
3835# case we give a warning if no ext is given
3836
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003837{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3838echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003839if test ! -d CaseSensitiveTestDir; then
3840mkdir CaseSensitiveTestDir
3841fi
3842
3843if test -d casesensitivetestdir
3844then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003845 { echo "$as_me:$LINENO: result: yes" >&5
3846echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003847 BUILDEXEEXT=.exe
3848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003849 { echo "$as_me:$LINENO: result: no" >&5
3850echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003851 BUILDEXEEXT=$EXEEXT
3852fi
3853rmdir CaseSensitiveTestDir
3854
3855case $MACHDEP in
3856bsdos*)
3857 case $CC in
3858 gcc) CC="$CC -D_HAVE_BSDI";;
3859 esac;;
3860esac
3861
3862case $ac_sys_system in
3863hp*|HP*)
3864 case $CC in
3865 cc|*/cc) CC="$CC -Ae";;
3866 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003867SunOS*)
3868 # Some functions have a prototype only with that define, e.g. confstr
3869
3870cat >>confdefs.h <<\_ACEOF
3871#define __EXTENSIONS__ 1
3872_ACEOF
3873
3874 ;;
3875esac
3876
3877
3878
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003879{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3880echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003881if test -z "$LIBRARY"
3882then
3883 LIBRARY='libpython$(VERSION).a'
3884fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003885{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3886echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003887
3888# LDLIBRARY is the name of the library to link against (as opposed to the
3889# name of the library into which to insert object files). BLDLIBRARY is also
3890# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3891# is blank as the main program is not linked directly against LDLIBRARY.
3892# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3893# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3894# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3895# DLLLIBRARY is the shared (i.e., DLL) library.
3896#
3897# RUNSHARED is used to run shared python without installed libraries
3898#
3899# INSTSONAME is the name of the shared library that will be use to install
3900# on the system - some systems like version suffix, others don't
3901
3902
3903
3904
3905
3906
3907LDLIBRARY="$LIBRARY"
3908BLDLIBRARY='$(LDLIBRARY)'
3909INSTSONAME='$(LDLIBRARY)'
3910DLLLIBRARY=''
3911LDLIBRARYDIR=''
3912RUNSHARED=''
3913
3914# LINKCC is the command that links the python executable -- default is $(CC).
3915# If CXX is set, and if it is needed to link a main function that was
3916# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3917# python might then depend on the C++ runtime
3918# This is altered for AIX in order to build the export list before
3919# linking.
3920
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003921{ echo "$as_me:$LINENO: checking LINKCC" >&5
3922echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003923if test -z "$LINKCC"
3924then
3925 LINKCC='$(PURIFY) $(MAINCC)'
3926 case $ac_sys_system in
3927 AIX*)
3928 exp_extra="\"\""
3929 if test $ac_sys_release -ge 5 -o \
3930 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3931 exp_extra="."
3932 fi
3933 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003934 QNX*)
3935 # qcc must be used because the other compilers do not
3936 # support -N.
3937 LINKCC=qcc;;
3938 esac
3939fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003940{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3941echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003942
3943# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3944# make sure we default having it set to "no": this is used by
3945# distutils.unixccompiler to know if it should add --enable-new-dtags
3946# to linker command lines, and failing to detect GNU ld simply results
3947# in the same bahaviour as before.
3948
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003949{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3950echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003951ac_prog=ld
3952if test "$GCC" = yes; then
3953 ac_prog=`$CC -print-prog-name=ld`
3954fi
3955case `"$ac_prog" -V 2>&1 < /dev/null` in
3956 *GNU*)
3957 GNULD=yes;;
3958 *)
3959 GNULD=no;;
3960esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003961{ echo "$as_me:$LINENO: result: $GNULD" >&5
3962echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003963
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003964{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3965echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003966# Check whether --enable-shared was given.
3967if test "${enable_shared+set}" = set; then
3968 enableval=$enable_shared;
3969fi
3970
3971
3972if test -z "$enable_shared"
3973then
3974 case $ac_sys_system in
3975 CYGWIN* | atheos*)
3976 enable_shared="yes";;
3977 *)
3978 enable_shared="no";;
3979 esac
3980fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003981{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3982echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003983
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003984{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3985echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003986# Check whether --enable-profiling was given.
3987if test "${enable_profiling+set}" = set; then
3988 enableval=$enable_profiling; ac_save_cc="$CC"
3989 CC="$CC -pg"
3990 if test "$cross_compiling" = yes; then
3991 ac_enable_profiling="no"
3992else
3993 cat >conftest.$ac_ext <<_ACEOF
3994/* confdefs.h. */
3995_ACEOF
3996cat confdefs.h >>conftest.$ac_ext
3997cat >>conftest.$ac_ext <<_ACEOF
3998/* end confdefs.h. */
3999int main() { return 0; }
4000_ACEOF
4001rm -f conftest$ac_exeext
4002if { (ac_try="$ac_link"
4003case "(($ac_try" in
4004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005 *) ac_try_echo=$ac_try;;
4006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004008 (eval "$ac_link") 2>&5
4009 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4012 { (case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004017 (eval "$ac_try") 2>&5
4018 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004020 (exit $ac_status); }; }; then
4021 ac_enable_profiling="yes"
4022else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004023 echo "$as_me: program exited with status $ac_status" >&5
4024echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004025sed 's/^/| /' conftest.$ac_ext >&5
4026
4027( exit $ac_status )
4028ac_enable_profiling="no"
4029fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4031fi
4032
4033
4034 CC="$ac_save_cc"
4035fi
4036
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004037{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4038echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004039
4040case "$ac_enable_profiling" in
4041 "yes")
4042 BASECFLAGS="-pg $BASECFLAGS"
4043 LDFLAGS="-pg $LDFLAGS"
4044 ;;
4045esac
4046
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004047{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4048echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004049
4050# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4051# library that we build, but we do not want to link against it (we
4052# will find it with a -framework option). For this reason there is an
4053# extra variable BLDLIBRARY against which Python and the extension
4054# modules are linked, BLDLIBRARY. This is normally the same as
4055# LDLIBRARY, but empty for MacOSX framework builds.
4056if test "$enable_framework"
4057then
4058 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4059 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4060 BLDLIBRARY=''
4061else
4062 BLDLIBRARY='$(LDLIBRARY)'
4063fi
4064
4065# Other platforms follow
4066if test $enable_shared = "yes"; then
4067
4068cat >>confdefs.h <<\_ACEOF
4069#define Py_ENABLE_SHARED 1
4070_ACEOF
4071
4072 case $ac_sys_system in
4073 CYGWIN*)
4074 LDLIBRARY='libpython$(VERSION).dll.a'
4075 DLLLIBRARY='libpython$(VERSION).dll'
4076 ;;
4077 SunOS*)
4078 LDLIBRARY='libpython$(VERSION).so'
4079 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4080 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4081 INSTSONAME="$LDLIBRARY".$SOVERSION
4082 ;;
4083 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4084 LDLIBRARY='libpython$(VERSION).so'
4085 BLDLIBRARY='-L. -lpython$(VERSION)'
4086 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4087 case $ac_sys_system in
4088 FreeBSD*)
4089 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4090 ;;
4091 esac
4092 INSTSONAME="$LDLIBRARY".$SOVERSION
4093 ;;
4094 hp*|HP*)
4095 case `uname -m` in
4096 ia64)
4097 LDLIBRARY='libpython$(VERSION).so'
4098 ;;
4099 *)
4100 LDLIBRARY='libpython$(VERSION).sl'
4101 ;;
4102 esac
4103 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4104 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4105 ;;
4106 OSF*)
4107 LDLIBRARY='libpython$(VERSION).so'
4108 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4109 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4110 ;;
4111 atheos*)
4112 LDLIBRARY='libpython$(VERSION).so'
4113 BLDLIBRARY='-L. -lpython$(VERSION)'
4114 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4115 ;;
4116 Darwin*)
4117 LDLIBRARY='libpython$(VERSION).dylib'
4118 BLDLIBRARY='-L. -lpython$(VERSION)'
4119 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4120 ;;
4121
4122 esac
4123else # shared is disabled
4124 case $ac_sys_system in
4125 CYGWIN*)
4126 BLDLIBRARY='$(LIBRARY)'
4127 LDLIBRARY='libpython$(VERSION).dll.a'
4128 ;;
4129 esac
4130fi
4131
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004132{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4133echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004134
4135if test -n "$ac_tool_prefix"; then
4136 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4137set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004138{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4139echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004140if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004141 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004142else
4143 if test -n "$RANLIB"; then
4144 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4145else
4146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4147for as_dir in $PATH
4148do
4149 IFS=$as_save_IFS
4150 test -z "$as_dir" && as_dir=.
4151 for ac_exec_ext in '' $ac_executable_extensions; do
4152 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4153 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004154 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004155 break 2
4156 fi
4157done
4158done
4159IFS=$as_save_IFS
4160
4161fi
4162fi
4163RANLIB=$ac_cv_prog_RANLIB
4164if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004165 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4166echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004167else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004168 { echo "$as_me:$LINENO: result: no" >&5
4169echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004170fi
4171
4172
4173fi
4174if test -z "$ac_cv_prog_RANLIB"; then
4175 ac_ct_RANLIB=$RANLIB
4176 # Extract the first word of "ranlib", so it can be a program name with args.
4177set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004178{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4179echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004180if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004181 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004182else
4183 if test -n "$ac_ct_RANLIB"; then
4184 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4185else
4186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189 IFS=$as_save_IFS
4190 test -z "$as_dir" && as_dir=.
4191 for ac_exec_ext in '' $ac_executable_extensions; do
4192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4193 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004194 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004195 break 2
4196 fi
4197done
4198done
4199IFS=$as_save_IFS
4200
4201fi
4202fi
4203ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4204if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004205 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4206echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004208 { echo "$as_me:$LINENO: result: no" >&5
4209echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004210fi
4211
4212 if test "x$ac_ct_RANLIB" = x; then
4213 RANLIB=":"
4214 else
4215 case $cross_compiling:$ac_tool_warned in
4216yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004217{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4218whose name does not start with the host triplet. If you think this
4219configuration is useful to you, please write to autoconf@gnu.org." >&5
4220echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4221whose name does not start with the host triplet. If you think this
4222configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004223ac_tool_warned=yes ;;
4224esac
4225 RANLIB=$ac_ct_RANLIB
4226 fi
4227else
4228 RANLIB="$ac_cv_prog_RANLIB"
4229fi
4230
4231
4232for ac_prog in ar aal
4233do
4234 # Extract the first word of "$ac_prog", so it can be a program name with args.
4235set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004236{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004238if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004239 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004240else
4241 if test -n "$AR"; then
4242 ac_cv_prog_AR="$AR" # Let the user override the test.
4243else
4244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247 IFS=$as_save_IFS
4248 test -z "$as_dir" && as_dir=.
4249 for ac_exec_ext in '' $ac_executable_extensions; do
4250 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004252 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004253 break 2
4254 fi
4255done
4256done
4257IFS=$as_save_IFS
4258
4259fi
4260fi
4261AR=$ac_cv_prog_AR
4262if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004263 { echo "$as_me:$LINENO: result: $AR" >&5
4264echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004265else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004266 { echo "$as_me:$LINENO: result: no" >&5
4267echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004268fi
4269
4270
4271 test -n "$AR" && break
4272done
4273test -n "$AR" || AR="ar"
4274
4275
4276# tweak ARFLAGS only if the user didn't set it on the command line
4277
4278if test -z "$ARFLAGS"
4279then
4280 ARFLAGS="rc"
4281fi
4282
4283
4284# Extract the first word of "svnversion", so it can be a program name with args.
4285set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004286{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4287echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004288if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004289 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004290else
4291 if test -n "$SVNVERSION"; then
4292 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4293else
4294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4295for as_dir in $PATH
4296do
4297 IFS=$as_save_IFS
4298 test -z "$as_dir" && as_dir=.
4299 for ac_exec_ext in '' $ac_executable_extensions; do
4300 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4301 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004303 break 2
4304 fi
4305done
4306done
4307IFS=$as_save_IFS
4308
4309 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4310fi
4311fi
4312SVNVERSION=$ac_cv_prog_SVNVERSION
4313if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004314 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4315echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004316else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004317 { echo "$as_me:$LINENO: result: no" >&5
4318echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004319fi
4320
4321
4322if test $SVNVERSION = found
4323then
4324 SVNVERSION="svnversion \$(srcdir)"
4325else
4326 SVNVERSION="echo Unversioned directory"
4327fi
4328
4329case $MACHDEP in
4330bsdos*|hp*|HP*)
4331 # install -d does not work on BSDI or HP-UX
4332 if test -z "$INSTALL"
4333 then
4334 INSTALL="${srcdir}/install-sh -c"
4335 fi
4336esac
4337ac_aux_dir=
4338for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4339 if test -f "$ac_dir/install-sh"; then
4340 ac_aux_dir=$ac_dir
4341 ac_install_sh="$ac_aux_dir/install-sh -c"
4342 break
4343 elif test -f "$ac_dir/install.sh"; then
4344 ac_aux_dir=$ac_dir
4345 ac_install_sh="$ac_aux_dir/install.sh -c"
4346 break
4347 elif test -f "$ac_dir/shtool"; then
4348 ac_aux_dir=$ac_dir
4349 ac_install_sh="$ac_aux_dir/shtool install -c"
4350 break
4351 fi
4352done
4353if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004354 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4355echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004356 { (exit 1); exit 1; }; }
4357fi
4358
4359# These three variables are undocumented and unsupported,
4360# and are intended to be withdrawn in a future Autoconf release.
4361# They can cause serious problems if a builder's source tree is in a directory
4362# whose full name contains unusual characters.
4363ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4364ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4365ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4366
4367
4368# Find a good install program. We prefer a C program (faster),
4369# so one script is as good as another. But avoid the broken or
4370# incompatible versions:
4371# SysV /etc/install, /usr/sbin/install
4372# SunOS /usr/etc/install
4373# IRIX /sbin/install
4374# AIX /bin/install
4375# AmigaOS /C/install, which installs bootblocks on floppy discs
4376# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4377# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4378# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4379# OS/2's system install, which has a completely different semantic
4380# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004381{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4382echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004383if test -z "$INSTALL"; then
4384if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004385 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004386else
4387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4388for as_dir in $PATH
4389do
4390 IFS=$as_save_IFS
4391 test -z "$as_dir" && as_dir=.
4392 # Account for people who put trailing slashes in PATH elements.
4393case $as_dir/ in
4394 ./ | .// | /cC/* | \
4395 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4396 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4397 /usr/ucb/* ) ;;
4398 *)
4399 # OSF1 and SCO ODT 3.0 have their own names for install.
4400 # Don't use installbsd from OSF since it installs stuff as root
4401 # by default.
4402 for ac_prog in ginstall scoinst install; do
4403 for ac_exec_ext in '' $ac_executable_extensions; do
4404 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4405 if test $ac_prog = install &&
4406 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4407 # AIX install. It has an incompatible calling convention.
4408 :
4409 elif test $ac_prog = install &&
4410 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4411 # program-specific install script used by HP pwplus--don't use.
4412 :
4413 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004414 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4415 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004416 fi
4417 fi
4418 done
4419 done
4420 ;;
4421esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004422done
4423IFS=$as_save_IFS
4424
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004425
4426fi
4427 if test "${ac_cv_path_install+set}" = set; then
4428 INSTALL=$ac_cv_path_install
4429 else
4430 # As a last resort, use the slow shell script. Don't cache a
4431 # value for INSTALL within a source directory, because that will
4432 # break other packages using the cache if that directory is
4433 # removed, or if the value is a relative name.
4434 INSTALL=$ac_install_sh
4435 fi
4436fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004437{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4438echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004439
4440# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4441# It thinks the first close brace ends the variable substitution.
4442test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4443
4444test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4445
4446test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4447
4448
4449# Not every filesystem supports hard links
4450
4451if test -z "$LN" ; then
4452 case $ac_sys_system in
4453 CYGWIN*) LN="ln -s";;
4454 atheos*) LN="ln -s";;
4455 *) LN=ln;;
4456 esac
4457fi
4458
4459# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004460{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4461echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004462
4463# Check whether --with-pydebug was given.
4464if test "${with_pydebug+set}" = set; then
4465 withval=$with_pydebug;
4466if test "$withval" != no
4467then
4468
4469cat >>confdefs.h <<\_ACEOF
4470#define Py_DEBUG 1
4471_ACEOF
4472
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004473 { echo "$as_me:$LINENO: result: yes" >&5
4474echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004475 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004476else { echo "$as_me:$LINENO: result: no" >&5
4477echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004478fi
4479else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004480 { echo "$as_me:$LINENO: result: no" >&5
4481echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004482fi
4483
4484
4485# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4486# merged with this chunk of code?
4487
4488# Optimizer/debugger flags
4489# ------------------------
4490# (The following bit of code is complicated enough - please keep things
4491# indented properly. Just pretend you're editing Python code. ;-)
4492
4493# There are two parallel sets of case statements below, one that checks to
4494# see if OPT was set and one that does BASECFLAGS setting based upon
4495# compiler and platform. BASECFLAGS tweaks need to be made even if the
4496# user set OPT.
4497
4498# tweak OPT based on compiler and platform, only if the user didn't set
4499# it on the command line
4500
4501if test -z "$OPT"
4502then
4503 case $GCC in
4504 yes)
4505 if test "$CC" != 'g++' ; then
4506 STRICT_PROTO="-Wstrict-prototypes"
4507 fi
4508 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4509 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4510 WRAP="-fwrapv"
4511 fi
4512 case $ac_cv_prog_cc_g in
4513 yes)
4514 if test "$Py_DEBUG" = 'true' ; then
4515 # Optimization messes up debuggers, so turn it off for
4516 # debug builds.
4517 OPT="-g -Wall $STRICT_PROTO"
4518 else
4519 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4520 fi
4521 ;;
4522 *)
4523 OPT="-O3 -Wall $STRICT_PROTO"
4524 ;;
4525 esac
4526 case $ac_sys_system in
4527 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4528 ;;
4529 esac
4530 ;;
4531
4532 *)
4533 OPT="-O"
4534 ;;
4535 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004536fi
4537
4538
4539
4540# The -arch flags for universal builds on OSX
4541UNIVERSAL_ARCH_FLAGS=
4542
4543
4544# tweak BASECFLAGS based on compiler and platform
4545case $GCC in
4546yes)
4547 # Python violates C99 rules, by casting between incompatible
4548 # pointer types. GCC may generate bad code as a result of that,
4549 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004550 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4551echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004552 ac_save_cc="$CC"
4553 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004554 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004555 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004556else
4557 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004558 ac_cv_no_strict_aliasing_ok=no
4559else
4560 cat >conftest.$ac_ext <<_ACEOF
4561/* confdefs.h. */
4562_ACEOF
4563cat confdefs.h >>conftest.$ac_ext
4564cat >>conftest.$ac_ext <<_ACEOF
4565/* end confdefs.h. */
4566int main() { return 0; }
4567_ACEOF
4568rm -f conftest$ac_exeext
4569if { (ac_try="$ac_link"
4570case "(($ac_try" in
4571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4572 *) ac_try_echo=$ac_try;;
4573esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004575 (eval "$ac_link") 2>&5
4576 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004578 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4579 { (case "(($ac_try" in
4580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4581 *) ac_try_echo=$ac_try;;
4582esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004584 (eval "$ac_try") 2>&5
4585 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004587 (exit $ac_status); }; }; then
4588 ac_cv_no_strict_aliasing_ok=yes
4589else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004590 echo "$as_me: program exited with status $ac_status" >&5
4591echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004592sed 's/^/| /' conftest.$ac_ext >&5
4593
4594( exit $ac_status )
4595ac_cv_no_strict_aliasing_ok=no
4596fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4598fi
4599
4600
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004601fi
4602
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004603 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004604 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4605echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004606 if test $ac_cv_no_strict_aliasing_ok = yes
4607 then
4608 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4609 fi
4610
4611 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4612 # support. Without this, treatment of subnormals doesn't follow
4613 # the standard.
4614 case $ac_sys_machine in
4615 alpha*)
4616 BASECFLAGS="$BASECFLAGS -mieee"
4617 ;;
4618 esac
4619
4620 case $ac_sys_system in
4621 SCO_SV*)
4622 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4623 ;;
4624 # is there any other compiler on Darwin besides gcc?
4625 Darwin*)
4626 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4627 # used to be here, but non-Apple gcc doesn't accept them.
4628
4629
4630 if test "${enable_universalsdk}"; then
4631 UNIVERSAL_ARCH_FLAGS=""
4632 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4633 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4634 ARCH_RUN_32BIT=""
4635
4636 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4637 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004638 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004639
4640 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4641 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4642 ARCH_RUN_32BIT="arch -i386 -ppc"
4643
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004644 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4645 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4646 ARCH_RUN_32BIT="arch -i386"
4647
4648 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4649 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4650 ARCH_RUN_32BIT="arch -i386 -ppc"
4651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004653 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4654echo "$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 +00004655 { (exit 1); exit 1; }; }
4656
4657 fi
4658
4659
4660 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4661 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4662 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4663 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4664 fi
4665 fi
4666
4667 # Calculate the right deployment target for this build.
4668 #
4669 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4670 if test ${cur_target} '>' 10.2; then
4671 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004672 if test ${enable_universalsdk}; then
4673 if test "${UNIVERSAL_ARCHS}" = "all"; then
4674 # Ensure that the default platform for a
4675 # 4-way universal build is OSX 10.5,
4676 # that's the first OS release where
4677 # 4-way builds make sense.
4678 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004679
4680 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4681 cur_target='10.5'
4682
4683 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4684 cur_target='10.5'
4685
4686 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4687 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004688 fi
4689 else
4690 if test `arch` = "i386"; then
4691 # On Intel macs default to a deployment
4692 # target of 10.4, that's the first OSX
4693 # release with Intel support.
4694 cur_target="10.4"
4695 fi
4696 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004697 fi
4698 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4699
4700 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4701 # environment with a value that is the same as what we'll use
4702 # in the Makefile to ensure that we'll get the same compiler
4703 # environment during configure and build time.
4704 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4705 export MACOSX_DEPLOYMENT_TARGET
4706 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4707
4708 ;;
4709 OSF*)
4710 BASECFLAGS="$BASECFLAGS -mieee"
4711 ;;
4712 esac
4713 ;;
4714
4715*)
4716 case $ac_sys_system in
4717 OpenUNIX*|UnixWare*)
4718 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4719 ;;
4720 OSF*)
4721 BASECFLAGS="$BASECFLAGS -ieee -std"
4722 ;;
4723 SCO_SV*)
4724 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4725 ;;
4726 esac
4727 ;;
4728esac
4729
4730if test "$Py_DEBUG" = 'true'; then
4731 :
4732else
4733 OPT="-DNDEBUG $OPT"
4734fi
4735
4736if test "$ac_arch_flags"
4737then
4738 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4739fi
4740
4741# disable check for icc since it seems to pass, but generates a warning
4742if test "$CC" = icc
4743then
4744 ac_cv_opt_olimit_ok=no
4745fi
4746
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004747{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4748echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004749if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004750 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751else
4752 ac_save_cc="$CC"
4753CC="$CC -OPT:Olimit=0"
4754if test "$cross_compiling" = yes; then
4755 ac_cv_opt_olimit_ok=no
4756else
4757 cat >conftest.$ac_ext <<_ACEOF
4758/* confdefs.h. */
4759_ACEOF
4760cat confdefs.h >>conftest.$ac_ext
4761cat >>conftest.$ac_ext <<_ACEOF
4762/* end confdefs.h. */
4763int main() { return 0; }
4764_ACEOF
4765rm -f conftest$ac_exeext
4766if { (ac_try="$ac_link"
4767case "(($ac_try" in
4768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4769 *) ac_try_echo=$ac_try;;
4770esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772 (eval "$ac_link") 2>&5
4773 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4776 { (case "(($ac_try" in
4777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4778 *) ac_try_echo=$ac_try;;
4779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781 (eval "$ac_try") 2>&5
4782 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784 (exit $ac_status); }; }; then
4785 ac_cv_opt_olimit_ok=yes
4786else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004787 echo "$as_me: program exited with status $ac_status" >&5
4788echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789sed 's/^/| /' conftest.$ac_ext >&5
4790
4791( exit $ac_status )
4792ac_cv_opt_olimit_ok=no
4793fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4795fi
4796
4797
4798CC="$ac_save_cc"
4799fi
4800
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004801{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4802echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004803if test $ac_cv_opt_olimit_ok = yes; then
4804 case $ac_sys_system in
4805 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4806 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4807 # environment?
4808 Darwin*)
4809 ;;
4810 *)
4811 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4812 ;;
4813 esac
4814else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004815 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4816echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004817 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004818 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004819else
4820 ac_save_cc="$CC"
4821 CC="$CC -Olimit 1500"
4822 if test "$cross_compiling" = yes; then
4823 ac_cv_olimit_ok=no
4824else
4825 cat >conftest.$ac_ext <<_ACEOF
4826/* confdefs.h. */
4827_ACEOF
4828cat confdefs.h >>conftest.$ac_ext
4829cat >>conftest.$ac_ext <<_ACEOF
4830/* end confdefs.h. */
4831int main() { return 0; }
4832_ACEOF
4833rm -f conftest$ac_exeext
4834if { (ac_try="$ac_link"
4835case "(($ac_try" in
4836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4837 *) ac_try_echo=$ac_try;;
4838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840 (eval "$ac_link") 2>&5
4841 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4844 { (case "(($ac_try" in
4845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4846 *) ac_try_echo=$ac_try;;
4847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849 (eval "$ac_try") 2>&5
4850 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852 (exit $ac_status); }; }; then
4853 ac_cv_olimit_ok=yes
4854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004855 echo "$as_me: program exited with status $ac_status" >&5
4856echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857sed 's/^/| /' conftest.$ac_ext >&5
4858
4859( exit $ac_status )
4860ac_cv_olimit_ok=no
4861fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4863fi
4864
4865
4866 CC="$ac_save_cc"
4867fi
4868
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004869 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4870echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871 if test $ac_cv_olimit_ok = yes; then
4872 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4873 fi
4874fi
4875
4876# Check whether GCC supports PyArg_ParseTuple format
4877if test "$GCC" = "yes"
4878then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004879 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4880echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004881 save_CFLAGS=$CFLAGS
4882 CFLAGS="$CFLAGS -Werror"
4883 cat >conftest.$ac_ext <<_ACEOF
4884/* confdefs.h. */
4885_ACEOF
4886cat confdefs.h >>conftest.$ac_ext
4887cat >>conftest.$ac_ext <<_ACEOF
4888/* end confdefs.h. */
4889
4890 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4891
4892int
4893main ()
4894{
4895
4896 ;
4897 return 0;
4898}
4899_ACEOF
4900rm -f conftest.$ac_objext
4901if { (ac_try="$ac_compile"
4902case "(($ac_try" in
4903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4904 *) ac_try_echo=$ac_try;;
4905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907 (eval "$ac_compile") 2>conftest.er1
4908 ac_status=$?
4909 grep -v '^ *+' conftest.er1 >conftest.err
4910 rm -f conftest.er1
4911 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913 (exit $ac_status); } && {
4914 test -z "$ac_c_werror_flag" ||
4915 test ! -s conftest.err
4916 } && test -s conftest.$ac_objext; then
4917
4918cat >>confdefs.h <<\_ACEOF
4919#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4920_ACEOF
4921
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004922 { echo "$as_me:$LINENO: result: yes" >&5
4923echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004925 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926sed 's/^/| /' conftest.$ac_ext >&5
4927
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004928 { echo "$as_me:$LINENO: result: no" >&5
4929echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930
4931fi
4932
4933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934 CFLAGS=$save_CFLAGS
4935fi
4936
4937# On some compilers, pthreads are available without further options
4938# (e.g. MacOS X). On some of these systems, the compiler will not
4939# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4940# So we have to see first whether pthreads are available without
4941# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004942{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4943echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004945 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946else
4947 if test "$cross_compiling" = yes; then
4948 ac_cv_pthread_is_default=no
4949else
4950 cat >conftest.$ac_ext <<_ACEOF
4951/* confdefs.h. */
4952_ACEOF
4953cat confdefs.h >>conftest.$ac_ext
4954cat >>conftest.$ac_ext <<_ACEOF
4955/* end confdefs.h. */
4956
4957#include <pthread.h>
4958
4959void* routine(void* p){return NULL;}
4960
4961int main(){
4962 pthread_t p;
4963 if(pthread_create(&p,NULL,routine,NULL)!=0)
4964 return 1;
4965 (void)pthread_detach(p);
4966 return 0;
4967}
4968
4969_ACEOF
4970rm -f conftest$ac_exeext
4971if { (ac_try="$ac_link"
4972case "(($ac_try" in
4973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4974 *) ac_try_echo=$ac_try;;
4975esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977 (eval "$ac_link") 2>&5
4978 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4981 { (case "(($ac_try" in
4982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4983 *) ac_try_echo=$ac_try;;
4984esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986 (eval "$ac_try") 2>&5
4987 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004989 (exit $ac_status); }; }; then
4990
4991 ac_cv_pthread_is_default=yes
4992 ac_cv_kthread=no
4993 ac_cv_pthread=no
4994
4995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004996 echo "$as_me: program exited with status $ac_status" >&5
4997echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004998sed 's/^/| /' conftest.$ac_ext >&5
4999
5000( exit $ac_status )
5001ac_cv_pthread_is_default=no
5002fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5004fi
5005
5006
5007
5008fi
5009
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005010{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5011echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012
5013
5014if test $ac_cv_pthread_is_default = yes
5015then
5016 ac_cv_kpthread=no
5017else
5018# -Kpthread, if available, provides the right #defines
5019# and linker options to make pthread_create available
5020# Some compilers won't report that they do not support -Kpthread,
5021# so we need to run a program to see whether it really made the
5022# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005023{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5024echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005025if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005026 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005027else
5028 ac_save_cc="$CC"
5029CC="$CC -Kpthread"
5030if test "$cross_compiling" = yes; then
5031 ac_cv_kpthread=no
5032else
5033 cat >conftest.$ac_ext <<_ACEOF
5034/* confdefs.h. */
5035_ACEOF
5036cat confdefs.h >>conftest.$ac_ext
5037cat >>conftest.$ac_ext <<_ACEOF
5038/* end confdefs.h. */
5039
5040#include <pthread.h>
5041
5042void* routine(void* p){return NULL;}
5043
5044int main(){
5045 pthread_t p;
5046 if(pthread_create(&p,NULL,routine,NULL)!=0)
5047 return 1;
5048 (void)pthread_detach(p);
5049 return 0;
5050}
5051
5052_ACEOF
5053rm -f conftest$ac_exeext
5054if { (ac_try="$ac_link"
5055case "(($ac_try" in
5056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5057 *) ac_try_echo=$ac_try;;
5058esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060 (eval "$ac_link") 2>&5
5061 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005063 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5064 { (case "(($ac_try" in
5065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5066 *) ac_try_echo=$ac_try;;
5067esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069 (eval "$ac_try") 2>&5
5070 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072 (exit $ac_status); }; }; then
5073 ac_cv_kpthread=yes
5074else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005075 echo "$as_me: program exited with status $ac_status" >&5
5076echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077sed 's/^/| /' conftest.$ac_ext >&5
5078
5079( exit $ac_status )
5080ac_cv_kpthread=no
5081fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5083fi
5084
5085
5086CC="$ac_save_cc"
5087fi
5088
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005089{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5090echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091fi
5092
5093if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5094then
5095# -Kthread, if available, provides the right #defines
5096# and linker options to make pthread_create available
5097# Some compilers won't report that they do not support -Kthread,
5098# so we need to run a program to see whether it really made the
5099# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005100{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5101echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005103 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104else
5105 ac_save_cc="$CC"
5106CC="$CC -Kthread"
5107if test "$cross_compiling" = yes; then
5108 ac_cv_kthread=no
5109else
5110 cat >conftest.$ac_ext <<_ACEOF
5111/* confdefs.h. */
5112_ACEOF
5113cat confdefs.h >>conftest.$ac_ext
5114cat >>conftest.$ac_ext <<_ACEOF
5115/* end confdefs.h. */
5116
5117#include <pthread.h>
5118
5119void* routine(void* p){return NULL;}
5120
5121int main(){
5122 pthread_t p;
5123 if(pthread_create(&p,NULL,routine,NULL)!=0)
5124 return 1;
5125 (void)pthread_detach(p);
5126 return 0;
5127}
5128
5129_ACEOF
5130rm -f conftest$ac_exeext
5131if { (ac_try="$ac_link"
5132case "(($ac_try" in
5133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5134 *) ac_try_echo=$ac_try;;
5135esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137 (eval "$ac_link") 2>&5
5138 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5141 { (case "(($ac_try" in
5142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5143 *) ac_try_echo=$ac_try;;
5144esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005146 (eval "$ac_try") 2>&5
5147 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005149 (exit $ac_status); }; }; then
5150 ac_cv_kthread=yes
5151else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005152 echo "$as_me: program exited with status $ac_status" >&5
5153echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005154sed 's/^/| /' conftest.$ac_ext >&5
5155
5156( exit $ac_status )
5157ac_cv_kthread=no
5158fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5160fi
5161
5162
5163CC="$ac_save_cc"
5164fi
5165
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005166{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5167echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168fi
5169
5170if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5171then
5172# -pthread, if available, provides the right #defines
5173# and linker options to make pthread_create available
5174# Some compilers won't report that they do not support -pthread,
5175# so we need to run a program to see whether it really made the
5176# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005177{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5178echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005179if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005180 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181else
5182 ac_save_cc="$CC"
5183CC="$CC -pthread"
5184if test "$cross_compiling" = yes; then
5185 ac_cv_pthread=no
5186else
5187 cat >conftest.$ac_ext <<_ACEOF
5188/* confdefs.h. */
5189_ACEOF
5190cat confdefs.h >>conftest.$ac_ext
5191cat >>conftest.$ac_ext <<_ACEOF
5192/* end confdefs.h. */
5193
5194#include <pthread.h>
5195
5196void* routine(void* p){return NULL;}
5197
5198int main(){
5199 pthread_t p;
5200 if(pthread_create(&p,NULL,routine,NULL)!=0)
5201 return 1;
5202 (void)pthread_detach(p);
5203 return 0;
5204}
5205
5206_ACEOF
5207rm -f conftest$ac_exeext
5208if { (ac_try="$ac_link"
5209case "(($ac_try" in
5210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5211 *) ac_try_echo=$ac_try;;
5212esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005214 (eval "$ac_link") 2>&5
5215 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5218 { (case "(($ac_try" in
5219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5220 *) ac_try_echo=$ac_try;;
5221esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005223 (eval "$ac_try") 2>&5
5224 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005226 (exit $ac_status); }; }; then
5227 ac_cv_pthread=yes
5228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005229 echo "$as_me: program exited with status $ac_status" >&5
5230echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005231sed 's/^/| /' conftest.$ac_ext >&5
5232
5233( exit $ac_status )
5234ac_cv_pthread=no
5235fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5237fi
5238
5239
5240CC="$ac_save_cc"
5241fi
5242
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005243{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5244echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005245fi
5246
5247# If we have set a CC compiler flag for thread support then
5248# check if it works for CXX, too.
5249ac_cv_cxx_thread=no
5250if test ! -z "$CXX"
5251then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005252{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5253echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005254ac_save_cxx="$CXX"
5255
5256if test "$ac_cv_kpthread" = "yes"
5257then
5258 CXX="$CXX -Kpthread"
5259 ac_cv_cxx_thread=yes
5260elif test "$ac_cv_kthread" = "yes"
5261then
5262 CXX="$CXX -Kthread"
5263 ac_cv_cxx_thread=yes
5264elif test "$ac_cv_pthread" = "yes"
5265then
5266 CXX="$CXX -pthread"
5267 ac_cv_cxx_thread=yes
5268fi
5269
5270if test $ac_cv_cxx_thread = yes
5271then
5272 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5273 $CXX -c conftest.$ac_ext 2>&5
5274 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5275 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5276 then
5277 ac_cv_cxx_thread=yes
5278 else
5279 ac_cv_cxx_thread=no
5280 fi
5281 rm -fr conftest*
5282fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005283{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5284echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005285fi
5286CXX="$ac_save_cxx"
5287
5288
5289# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005290{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5291echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005293 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294else
5295 cat >conftest.$ac_ext <<_ACEOF
5296/* confdefs.h. */
5297_ACEOF
5298cat confdefs.h >>conftest.$ac_ext
5299cat >>conftest.$ac_ext <<_ACEOF
5300/* end confdefs.h. */
5301#include <stdlib.h>
5302#include <stdarg.h>
5303#include <string.h>
5304#include <float.h>
5305
5306int
5307main ()
5308{
5309
5310 ;
5311 return 0;
5312}
5313_ACEOF
5314rm -f conftest.$ac_objext
5315if { (ac_try="$ac_compile"
5316case "(($ac_try" in
5317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5318 *) ac_try_echo=$ac_try;;
5319esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 (eval "$ac_compile") 2>conftest.er1
5322 ac_status=$?
5323 grep -v '^ *+' conftest.er1 >conftest.err
5324 rm -f conftest.er1
5325 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327 (exit $ac_status); } && {
5328 test -z "$ac_c_werror_flag" ||
5329 test ! -s conftest.err
5330 } && test -s conftest.$ac_objext; then
5331 ac_cv_header_stdc=yes
5332else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005333 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334sed 's/^/| /' conftest.$ac_ext >&5
5335
5336 ac_cv_header_stdc=no
5337fi
5338
5339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5340
5341if test $ac_cv_header_stdc = yes; then
5342 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5343 cat >conftest.$ac_ext <<_ACEOF
5344/* confdefs.h. */
5345_ACEOF
5346cat confdefs.h >>conftest.$ac_ext
5347cat >>conftest.$ac_ext <<_ACEOF
5348/* end confdefs.h. */
5349#include <string.h>
5350
5351_ACEOF
5352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5353 $EGREP "memchr" >/dev/null 2>&1; then
5354 :
5355else
5356 ac_cv_header_stdc=no
5357fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005358rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359
5360fi
5361
5362if test $ac_cv_header_stdc = yes; then
5363 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5364 cat >conftest.$ac_ext <<_ACEOF
5365/* confdefs.h. */
5366_ACEOF
5367cat confdefs.h >>conftest.$ac_ext
5368cat >>conftest.$ac_ext <<_ACEOF
5369/* end confdefs.h. */
5370#include <stdlib.h>
5371
5372_ACEOF
5373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5374 $EGREP "free" >/dev/null 2>&1; then
5375 :
5376else
5377 ac_cv_header_stdc=no
5378fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005379rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380
5381fi
5382
5383if test $ac_cv_header_stdc = yes; then
5384 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5385 if test "$cross_compiling" = yes; then
5386 :
5387else
5388 cat >conftest.$ac_ext <<_ACEOF
5389/* confdefs.h. */
5390_ACEOF
5391cat confdefs.h >>conftest.$ac_ext
5392cat >>conftest.$ac_ext <<_ACEOF
5393/* end confdefs.h. */
5394#include <ctype.h>
5395#include <stdlib.h>
5396#if ((' ' & 0x0FF) == 0x020)
5397# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5398# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5399#else
5400# define ISLOWER(c) \
5401 (('a' <= (c) && (c) <= 'i') \
5402 || ('j' <= (c) && (c) <= 'r') \
5403 || ('s' <= (c) && (c) <= 'z'))
5404# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5405#endif
5406
5407#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5408int
5409main ()
5410{
5411 int i;
5412 for (i = 0; i < 256; i++)
5413 if (XOR (islower (i), ISLOWER (i))
5414 || toupper (i) != TOUPPER (i))
5415 return 2;
5416 return 0;
5417}
5418_ACEOF
5419rm -f conftest$ac_exeext
5420if { (ac_try="$ac_link"
5421case "(($ac_try" in
5422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5423 *) ac_try_echo=$ac_try;;
5424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426 (eval "$ac_link") 2>&5
5427 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5430 { (case "(($ac_try" in
5431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5432 *) ac_try_echo=$ac_try;;
5433esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005435 (eval "$ac_try") 2>&5
5436 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005438 (exit $ac_status); }; }; then
5439 :
5440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005441 echo "$as_me: program exited with status $ac_status" >&5
5442echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443sed 's/^/| /' conftest.$ac_ext >&5
5444
5445( exit $ac_status )
5446ac_cv_header_stdc=no
5447fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5449fi
5450
5451
5452fi
5453fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005454{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5455echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456if test $ac_cv_header_stdc = yes; then
5457
5458cat >>confdefs.h <<\_ACEOF
5459#define STDC_HEADERS 1
5460_ACEOF
5461
5462fi
5463
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005464# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5475 inttypes.h stdint.h unistd.h
5476do
5477as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5478{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5479echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5480if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5481 echo $ECHO_N "(cached) $ECHO_C" >&6
5482else
5483 cat >conftest.$ac_ext <<_ACEOF
5484/* confdefs.h. */
5485_ACEOF
5486cat confdefs.h >>conftest.$ac_ext
5487cat >>conftest.$ac_ext <<_ACEOF
5488/* end confdefs.h. */
5489$ac_includes_default
5490
5491#include <$ac_header>
5492_ACEOF
5493rm -f conftest.$ac_objext
5494if { (ac_try="$ac_compile"
5495case "(($ac_try" in
5496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5497 *) ac_try_echo=$ac_try;;
5498esac
5499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5500 (eval "$ac_compile") 2>conftest.er1
5501 ac_status=$?
5502 grep -v '^ *+' conftest.er1 >conftest.err
5503 rm -f conftest.er1
5504 cat conftest.err >&5
5505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5506 (exit $ac_status); } && {
5507 test -z "$ac_c_werror_flag" ||
5508 test ! -s conftest.err
5509 } && test -s conftest.$ac_objext; then
5510 eval "$as_ac_Header=yes"
5511else
5512 echo "$as_me: failed program was:" >&5
5513sed 's/^/| /' conftest.$ac_ext >&5
5514
5515 eval "$as_ac_Header=no"
5516fi
5517
5518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5519fi
5520ac_res=`eval echo '${'$as_ac_Header'}'`
5521 { echo "$as_me:$LINENO: result: $ac_res" >&5
5522echo "${ECHO_T}$ac_res" >&6; }
5523if test `eval echo '${'$as_ac_Header'}'` = yes; then
5524 cat >>confdefs.h <<_ACEOF
5525#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5526_ACEOF
5527
5528fi
5529
5530done
5531
5532
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533
Martin v. Löwis11437992002-04-12 09:54:03 +00005534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
Anthony Baxter8a560de2004-10-13 15:30:56 +00005569
Martin v. Löwisc3001752005-01-23 09:27:24 +00005570
Martin v. Löwis11017b12006-01-14 18:12:57 +00005571
Thomas Wouters477c8d52006-05-27 19:21:47 +00005572
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005573
5574
5575
5576
5577
5578
5579
5580
Thomas Wouters89f507f2006-12-13 04:49:30 +00005581
Christian Heimes043d6f62008-01-07 17:19:16 +00005582
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005583
5584
Christian Heimesbbe741d2008-03-28 10:53:29 +00005585
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005586
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005587for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5588fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005589ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005590shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005591unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005592sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5593sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005594sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005595sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005596sys/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 +00005597sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005598bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005599do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005600as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005601if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005602 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5603echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005604if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005605 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005606fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005607ac_res=`eval echo '${'$as_ac_Header'}'`
5608 { echo "$as_me:$LINENO: result: $ac_res" >&5
5609echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005610else
Martin v. Löwis11437992002-04-12 09:54:03 +00005611 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005612{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5613echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005615/* confdefs.h. */
5616_ACEOF
5617cat confdefs.h >>conftest.$ac_ext
5618cat >>conftest.$ac_ext <<_ACEOF
5619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005620$ac_includes_default
5621#include <$ac_header>
5622_ACEOF
5623rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005624if { (ac_try="$ac_compile"
5625case "(($ac_try" in
5626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5627 *) ac_try_echo=$ac_try;;
5628esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005632 grep -v '^ *+' conftest.er1 >conftest.err
5633 rm -f conftest.er1
5634 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005636 (exit $ac_status); } && {
5637 test -z "$ac_c_werror_flag" ||
5638 test ! -s conftest.err
5639 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005640 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005641else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005643sed 's/^/| /' conftest.$ac_ext >&5
5644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005645 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005647
5648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005649{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5650echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005651
5652# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005653{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5654echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005656/* confdefs.h. */
5657_ACEOF
5658cat confdefs.h >>conftest.$ac_ext
5659cat >>conftest.$ac_ext <<_ACEOF
5660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005661#include <$ac_header>
5662_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005663if { (ac_try="$ac_cpp conftest.$ac_ext"
5664case "(($ac_try" in
5665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5666 *) ac_try_echo=$ac_try;;
5667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005669 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005671 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005672 rm -f conftest.er1
5673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005675 (exit $ac_status); } >/dev/null && {
5676 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5677 test ! -s conftest.err
5678 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 ac_header_preproc=yes
5680else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005682sed 's/^/| /' conftest.$ac_ext >&5
5683
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005686
Martin v. Löwis11437992002-04-12 09:54:03 +00005687rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005688{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5689echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005690
5691# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005692case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5693 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005694 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5695echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5696 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5697echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005698 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005699 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005700 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005701 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5702echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5703 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5704echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5705 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5706echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5707 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5708echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5709 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5710echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5711 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5712echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005713 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005714## -------------------------------------- ##
5715## Report this to http://bugs.python.org/ ##
5716## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005717_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005718 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005719 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005720esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005721{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5722echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005723if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005724 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005725else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005726 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005727fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005728ac_res=`eval echo '${'$as_ac_Header'}'`
5729 { echo "$as_me:$LINENO: result: $ac_res" >&5
5730echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005731
5732fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005733if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005734 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005735#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005736_ACEOF
5737
5738fi
5739
Guido van Rossum627b2d71993-12-24 10:39:16 +00005740done
5741
Martin v. Löwis11437992002-04-12 09:54:03 +00005742
5743
5744
5745
5746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005747ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005748for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005749 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5750{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5751echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005752if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005753 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005754else
Martin v. Löwis11437992002-04-12 09:54:03 +00005755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005756/* confdefs.h. */
5757_ACEOF
5758cat confdefs.h >>conftest.$ac_ext
5759cat >>conftest.$ac_ext <<_ACEOF
5760/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005761#include <sys/types.h>
5762#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005763
Martin v. Löwis11437992002-04-12 09:54:03 +00005764int
5765main ()
5766{
5767if ((DIR *) 0)
5768return 0;
5769 ;
5770 return 0;
5771}
5772_ACEOF
5773rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005774if { (ac_try="$ac_compile"
5775case "(($ac_try" in
5776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5777 *) ac_try_echo=$ac_try;;
5778esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005782 grep -v '^ *+' conftest.er1 >conftest.err
5783 rm -f conftest.er1
5784 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005786 (exit $ac_status); } && {
5787 test -z "$ac_c_werror_flag" ||
5788 test ! -s conftest.err
5789 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005791else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005793sed 's/^/| /' conftest.$ac_ext >&5
5794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005795 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005797
5798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005799fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005800ac_res=`eval echo '${'$as_ac_Header'}'`
5801 { echo "$as_me:$LINENO: result: $ac_res" >&5
5802echo "${ECHO_T}$ac_res" >&6; }
5803if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005804 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005805#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005806_ACEOF
5807
5808ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005809fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005810
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005811done
5812# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5813if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005814 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5815echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005816if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005817 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005818else
Martin v. Löwis11437992002-04-12 09:54:03 +00005819 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005820cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005821/* confdefs.h. */
5822_ACEOF
5823cat confdefs.h >>conftest.$ac_ext
5824cat >>conftest.$ac_ext <<_ACEOF
5825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005827/* Override any GCC internal prototype to avoid an error.
5828 Use char because int might match the return type of a GCC
5829 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005830#ifdef __cplusplus
5831extern "C"
5832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005833char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005834int
5835main ()
5836{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005837return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005838 ;
5839 return 0;
5840}
5841_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005842for ac_lib in '' dir; do
5843 if test -z "$ac_lib"; then
5844 ac_res="none required"
5845 else
5846 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005847 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005848 fi
5849 rm -f conftest.$ac_objext conftest$ac_exeext
5850if { (ac_try="$ac_link"
5851case "(($ac_try" in
5852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5853 *) ac_try_echo=$ac_try;;
5854esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005856 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005857 ac_status=$?
5858 grep -v '^ *+' conftest.er1 >conftest.err
5859 rm -f conftest.er1
5860 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005862 (exit $ac_status); } && {
5863 test -z "$ac_c_werror_flag" ||
5864 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005865 } && test -s conftest$ac_exeext &&
5866 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005867 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005868else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005869 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005870sed 's/^/| /' conftest.$ac_ext >&5
5871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005872
Thomas Wouters477c8d52006-05-27 19:21:47 +00005873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005874
5875rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5876 conftest$ac_exeext
5877 if test "${ac_cv_search_opendir+set}" = set; then
5878 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005880done
5881if test "${ac_cv_search_opendir+set}" = set; then
5882 :
5883else
5884 ac_cv_search_opendir=no
5885fi
5886rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005887LIBS=$ac_func_search_save_LIBS
5888fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005889{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5890echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005891ac_res=$ac_cv_search_opendir
5892if test "$ac_res" != no; then
5893 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005894
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005896
Michael W. Hudson54241132001-12-07 15:38:26 +00005897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005898 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5899echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005900if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005901 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005902else
5903 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005904cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005905/* confdefs.h. */
5906_ACEOF
5907cat confdefs.h >>conftest.$ac_ext
5908cat >>conftest.$ac_ext <<_ACEOF
5909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005911/* Override any GCC internal prototype to avoid an error.
5912 Use char because int might match the return type of a GCC
5913 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005914#ifdef __cplusplus
5915extern "C"
5916#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005917char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005918int
5919main ()
5920{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005921return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005922 ;
5923 return 0;
5924}
5925_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005926for ac_lib in '' x; do
5927 if test -z "$ac_lib"; then
5928 ac_res="none required"
5929 else
5930 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005931 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005932 fi
5933 rm -f conftest.$ac_objext conftest$ac_exeext
5934if { (ac_try="$ac_link"
5935case "(($ac_try" in
5936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5937 *) ac_try_echo=$ac_try;;
5938esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005940 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005941 ac_status=$?
5942 grep -v '^ *+' conftest.er1 >conftest.err
5943 rm -f conftest.er1
5944 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005946 (exit $ac_status); } && {
5947 test -z "$ac_c_werror_flag" ||
5948 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005949 } && test -s conftest$ac_exeext &&
5950 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005951 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005952else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005953 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005954sed 's/^/| /' conftest.$ac_ext >&5
5955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005956
Thomas Wouters477c8d52006-05-27 19:21:47 +00005957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005958
5959rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5960 conftest$ac_exeext
5961 if test "${ac_cv_search_opendir+set}" = set; then
5962 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005964done
5965if test "${ac_cv_search_opendir+set}" = set; then
5966 :
5967else
5968 ac_cv_search_opendir=no
5969fi
5970rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005971LIBS=$ac_func_search_save_LIBS
5972fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005973{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5974echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005975ac_res=$ac_cv_search_opendir
5976if test "$ac_res" != no; then
5977 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005978
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005979fi
5980
5981fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005982
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005983{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5984echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005985if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005986 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005987else
5988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005989/* confdefs.h. */
5990_ACEOF
5991cat confdefs.h >>conftest.$ac_ext
5992cat >>conftest.$ac_ext <<_ACEOF
5993/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005994#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005995int
5996main ()
5997{
5998return makedev(0, 0);
5999 ;
6000 return 0;
6001}
6002_ACEOF
6003rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006004if { (ac_try="$ac_link"
6005case "(($ac_try" in
6006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6007 *) ac_try_echo=$ac_try;;
6008esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006010 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006012 grep -v '^ *+' conftest.er1 >conftest.err
6013 rm -f conftest.er1
6014 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006016 (exit $ac_status); } && {
6017 test -z "$ac_c_werror_flag" ||
6018 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006019 } && test -s conftest$ac_exeext &&
6020 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006021 ac_cv_header_sys_types_h_makedev=yes
6022else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006024sed 's/^/| /' conftest.$ac_ext >&5
6025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006026 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006028
6029rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031
6032fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006033{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6034echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035
6036if test $ac_cv_header_sys_types_h_makedev = no; then
6037if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006038 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6039echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006041 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006043{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6044echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045else
6046 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006047{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6048echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006050/* confdefs.h. */
6051_ACEOF
6052cat confdefs.h >>conftest.$ac_ext
6053cat >>conftest.$ac_ext <<_ACEOF
6054/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006055$ac_includes_default
6056#include <sys/mkdev.h>
6057_ACEOF
6058rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006059if { (ac_try="$ac_compile"
6060case "(($ac_try" in
6061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6062 *) ac_try_echo=$ac_try;;
6063esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006065 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006067 grep -v '^ *+' conftest.er1 >conftest.err
6068 rm -f conftest.er1
6069 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006071 (exit $ac_status); } && {
6072 test -z "$ac_c_werror_flag" ||
6073 test ! -s conftest.err
6074 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075 ac_header_compiler=yes
6076else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006078sed 's/^/| /' conftest.$ac_ext >&5
6079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006080 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006082
6083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006084{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6085echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086
6087# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006088{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6089echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006091/* confdefs.h. */
6092_ACEOF
6093cat confdefs.h >>conftest.$ac_ext
6094cat >>conftest.$ac_ext <<_ACEOF
6095/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006096#include <sys/mkdev.h>
6097_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006098if { (ac_try="$ac_cpp conftest.$ac_ext"
6099case "(($ac_try" in
6100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6101 *) ac_try_echo=$ac_try;;
6102esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006104 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006106 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107 rm -f conftest.er1
6108 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006110 (exit $ac_status); } >/dev/null && {
6111 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6112 test ! -s conftest.err
6113 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114 ac_header_preproc=yes
6115else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006117sed 's/^/| /' conftest.$ac_ext >&5
6118
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 ac_header_preproc=no
6120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006121
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006122rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006123{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6124echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125
6126# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006127case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6128 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006129 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6130echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6131 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6132echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006133 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006134 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006135 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6138 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6139echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6140 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6141echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6142 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6143echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6144 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6145echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6146 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6147echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006148 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006149## -------------------------------------- ##
6150## Report this to http://bugs.python.org/ ##
6151## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006152_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006154 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006156{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6157echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006159 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160else
6161 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6162fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006163{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6164echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165
6166fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006167if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006168
6169cat >>confdefs.h <<\_ACEOF
6170#define MAJOR_IN_MKDEV 1
6171_ACEOF
6172
6173fi
6174
6175
6176
6177 if test $ac_cv_header_sys_mkdev_h = no; then
6178 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006179 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6180echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006182 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006184{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6185echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186else
6187 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006188{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6189echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006191/* confdefs.h. */
6192_ACEOF
6193cat confdefs.h >>conftest.$ac_ext
6194cat >>conftest.$ac_ext <<_ACEOF
6195/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006196$ac_includes_default
6197#include <sys/sysmacros.h>
6198_ACEOF
6199rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006200if { (ac_try="$ac_compile"
6201case "(($ac_try" in
6202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6203 *) ac_try_echo=$ac_try;;
6204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006208 grep -v '^ *+' conftest.er1 >conftest.err
6209 rm -f conftest.er1
6210 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212 (exit $ac_status); } && {
6213 test -z "$ac_c_werror_flag" ||
6214 test ! -s conftest.err
6215 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216 ac_header_compiler=yes
6217else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006219sed 's/^/| /' conftest.$ac_ext >&5
6220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006223
6224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006225{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6226echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227
6228# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006229{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6230echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006232/* confdefs.h. */
6233_ACEOF
6234cat confdefs.h >>conftest.$ac_ext
6235cat >>conftest.$ac_ext <<_ACEOF
6236/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237#include <sys/sysmacros.h>
6238_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239if { (ac_try="$ac_cpp conftest.$ac_ext"
6240case "(($ac_try" in
6241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6242 *) ac_try_echo=$ac_try;;
6243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006245 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006247 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248 rm -f conftest.er1
6249 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251 (exit $ac_status); } >/dev/null && {
6252 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6253 test ! -s conftest.err
6254 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255 ac_header_preproc=yes
6256else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006258sed 's/^/| /' conftest.$ac_ext >&5
6259
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 ac_header_preproc=no
6261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006262
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006264{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6265echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266
6267# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006268case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6269 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006270 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6271echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6272 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6273echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006274 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006275 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006276 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006277 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6278echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6279 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6280echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6281 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6282echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6283 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6284echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6285 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6286echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6287 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6288echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006289 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006290## -------------------------------------- ##
6291## Report this to http://bugs.python.org/ ##
6292## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006293_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006294 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006295 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006297{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6298echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006300 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301else
6302 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6303fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006304{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6305echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006306
6307fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006308if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006309
6310cat >>confdefs.h <<\_ACEOF
6311#define MAJOR_IN_SYSMACROS 1
6312_ACEOF
6313
6314fi
6315
6316
6317 fi
6318fi
6319
Michael W. Hudson54241132001-12-07 15:38:26 +00006320
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006321# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006322
6323for ac_header in term.h
6324do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006325as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6326{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6327echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006328if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006329 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006330else
6331 cat >conftest.$ac_ext <<_ACEOF
6332/* confdefs.h. */
6333_ACEOF
6334cat confdefs.h >>conftest.$ac_ext
6335cat >>conftest.$ac_ext <<_ACEOF
6336/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006337
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006338#ifdef HAVE_CURSES_H
6339#include <curses.h>
6340#endif
6341
6342
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006343#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006344_ACEOF
6345rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006346if { (ac_try="$ac_compile"
6347case "(($ac_try" in
6348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6349 *) ac_try_echo=$ac_try;;
6350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353 ac_status=$?
6354 grep -v '^ *+' conftest.er1 >conftest.err
6355 rm -f conftest.er1
6356 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006358 (exit $ac_status); } && {
6359 test -z "$ac_c_werror_flag" ||
6360 test ! -s conftest.err
6361 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006362 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006364 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006365sed 's/^/| /' conftest.$ac_ext >&5
6366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006367 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006369
6370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006371fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006372ac_res=`eval echo '${'$as_ac_Header'}'`
6373 { echo "$as_me:$LINENO: result: $ac_res" >&5
6374echo "${ECHO_T}$ac_res" >&6; }
6375if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006376 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006377#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006378_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006379
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006380fi
6381
6382done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006383
6384
Martin v. Löwis11017b12006-01-14 18:12:57 +00006385# On Linux, netlink.h requires asm/types.h
6386
6387for ac_header in linux/netlink.h
6388do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006389as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6390{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6391echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006392if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006394else
6395 cat >conftest.$ac_ext <<_ACEOF
6396/* confdefs.h. */
6397_ACEOF
6398cat confdefs.h >>conftest.$ac_ext
6399cat >>conftest.$ac_ext <<_ACEOF
6400/* end confdefs.h. */
6401
6402#ifdef HAVE_ASM_TYPES_H
6403#include <asm/types.h>
6404#endif
6405#ifdef HAVE_SYS_SOCKET_H
6406#include <sys/socket.h>
6407#endif
6408
6409
6410#include <$ac_header>
6411_ACEOF
6412rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006413if { (ac_try="$ac_compile"
6414case "(($ac_try" in
6415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6416 *) ac_try_echo=$ac_try;;
6417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006420 ac_status=$?
6421 grep -v '^ *+' conftest.er1 >conftest.err
6422 rm -f conftest.er1
6423 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006425 (exit $ac_status); } && {
6426 test -z "$ac_c_werror_flag" ||
6427 test ! -s conftest.err
6428 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006429 eval "$as_ac_Header=yes"
6430else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006431 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006432sed 's/^/| /' conftest.$ac_ext >&5
6433
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006434 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006436
6437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006439ac_res=`eval echo '${'$as_ac_Header'}'`
6440 { echo "$as_me:$LINENO: result: $ac_res" >&5
6441echo "${ECHO_T}$ac_res" >&6; }
6442if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006443 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006444#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006445_ACEOF
6446
6447fi
6448
6449done
6450
6451
Guido van Rossum627b2d71993-12-24 10:39:16 +00006452# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006453was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006454{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6455echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006456cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006457/* confdefs.h. */
6458_ACEOF
6459cat confdefs.h >>conftest.$ac_ext
6460cat >>conftest.$ac_ext <<_ACEOF
6461/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006463
6464_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006466 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006467 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006468else
Martin v. Löwis11437992002-04-12 09:54:03 +00006469
6470
6471cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006472#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006473_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006474
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006475
Guido van Rossum627b2d71993-12-24 10:39:16 +00006476fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006477rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006478
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006479{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6480echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006481
Neal Norwitz11690112002-07-30 01:08:28 +00006482# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006483{ echo "$as_me:$LINENO: checking for makedev" >&5
6484echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006486/* confdefs.h. */
6487_ACEOF
6488cat confdefs.h >>conftest.$ac_ext
6489cat >>conftest.$ac_ext <<_ACEOF
6490/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006491#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006492int
6493main ()
6494{
6495 makedev(0, 0)
6496 ;
6497 return 0;
6498}
6499_ACEOF
6500rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006501if { (ac_try="$ac_link"
6502case "(($ac_try" in
6503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6504 *) ac_try_echo=$ac_try;;
6505esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006509 grep -v '^ *+' conftest.er1 >conftest.err
6510 rm -f conftest.er1
6511 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006513 (exit $ac_status); } && {
6514 test -z "$ac_c_werror_flag" ||
6515 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006516 } && test -s conftest$ac_exeext &&
6517 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006518 ac_cv_has_makedev=yes
6519else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006521sed 's/^/| /' conftest.$ac_ext >&5
6522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006523 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006525
6526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006527 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006528if test "$ac_cv_has_makedev" = "no"; then
6529 # we didn't link, try if _OSF_SOURCE will allow us to link
6530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006531/* confdefs.h. */
6532_ACEOF
6533cat confdefs.h >>conftest.$ac_ext
6534cat >>conftest.$ac_ext <<_ACEOF
6535/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006536
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006537#define _OSF_SOURCE 1
6538#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006539
Neal Norwitz11690112002-07-30 01:08:28 +00006540int
6541main ()
6542{
6543 makedev(0, 0)
6544 ;
6545 return 0;
6546}
6547_ACEOF
6548rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006549if { (ac_try="$ac_link"
6550case "(($ac_try" in
6551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6552 *) ac_try_echo=$ac_try;;
6553esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006557 grep -v '^ *+' conftest.er1 >conftest.err
6558 rm -f conftest.er1
6559 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006561 (exit $ac_status); } && {
6562 test -z "$ac_c_werror_flag" ||
6563 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006564 } && test -s conftest$ac_exeext &&
6565 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006566 ac_cv_has_makedev=yes
6567else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006569sed 's/^/| /' conftest.$ac_ext >&5
6570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006571 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006573
6574rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006575 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006576 if test "$ac_cv_has_makedev" = "yes"; then
6577
6578cat >>confdefs.h <<\_ACEOF
6579#define _OSF_SOURCE 1
6580_ACEOF
6581
6582 fi
6583fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006584{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6585echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006586if test "$ac_cv_has_makedev" = "yes"; then
6587
6588cat >>confdefs.h <<\_ACEOF
6589#define HAVE_MAKEDEV 1
6590_ACEOF
6591
6592fi
6593
Martin v. Löwis399a6892002-10-04 10:22:02 +00006594# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6595# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6596# defined, but the compiler does not support pragma redefine_extname,
6597# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6598# structures (such as rlimit64) without declaring them. As a
6599# work-around, disable LFS on such configurations
6600
6601use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006602{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6603echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006604cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006605/* confdefs.h. */
6606_ACEOF
6607cat confdefs.h >>conftest.$ac_ext
6608cat >>conftest.$ac_ext <<_ACEOF
6609/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006610
6611#define _LARGEFILE_SOURCE 1
6612#define _FILE_OFFSET_BITS 64
6613#include <sys/resource.h>
6614
Martin v. Löwis399a6892002-10-04 10:22:02 +00006615int
6616main ()
6617{
6618struct rlimit foo;
6619 ;
6620 return 0;
6621}
6622_ACEOF
6623rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006624if { (ac_try="$ac_compile"
6625case "(($ac_try" in
6626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6627 *) ac_try_echo=$ac_try;;
6628esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006632 grep -v '^ *+' conftest.er1 >conftest.err
6633 rm -f conftest.er1
6634 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006636 (exit $ac_status); } && {
6637 test -z "$ac_c_werror_flag" ||
6638 test ! -s conftest.err
6639 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006640 sol_lfs_bug=no
6641else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006643sed 's/^/| /' conftest.$ac_ext >&5
6644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006645 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006647
6648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006649{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6650echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651if test "$sol_lfs_bug" = "yes"; then
6652 use_lfs=no
6653fi
6654
6655if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006656# Two defines needed to enable largefile support on various platforms
6657# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006658
Martin v. Löwis11437992002-04-12 09:54:03 +00006659cat >>confdefs.h <<\_ACEOF
6660#define _LARGEFILE_SOURCE 1
6661_ACEOF
6662
6663
6664cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006665#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006666_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006667
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006669
Guido van Rossum84e7b241996-08-19 21:59:00 +00006670# Add some code to confdefs.h so that the test for off_t works on SCO
6671cat >> confdefs.h <<\EOF
6672#if defined(SCO_DS)
6673#undef _OFF_T
6674#endif
6675EOF
6676
Guido van Rossumef2255b2000-03-10 22:30:29 +00006677# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006678{ echo "$as_me:$LINENO: checking for mode_t" >&5
6679echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006680if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006681 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006682else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006683 cat >conftest.$ac_ext <<_ACEOF
6684/* confdefs.h. */
6685_ACEOF
6686cat confdefs.h >>conftest.$ac_ext
6687cat >>conftest.$ac_ext <<_ACEOF
6688/* end confdefs.h. */
6689$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006690typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006691int
6692main ()
6693{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006694if ((ac__type_new_ *) 0)
6695 return 0;
6696if (sizeof (ac__type_new_))
6697 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006698 ;
6699 return 0;
6700}
6701_ACEOF
6702rm -f conftest.$ac_objext
6703if { (ac_try="$ac_compile"
6704case "(($ac_try" in
6705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6706 *) ac_try_echo=$ac_try;;
6707esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006709 (eval "$ac_compile") 2>conftest.er1
6710 ac_status=$?
6711 grep -v '^ *+' conftest.er1 >conftest.err
6712 rm -f conftest.er1
6713 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006715 (exit $ac_status); } && {
6716 test -z "$ac_c_werror_flag" ||
6717 test ! -s conftest.err
6718 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006719 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006720else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006722sed 's/^/| /' conftest.$ac_ext >&5
6723
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006724 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006726
6727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006728fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006729{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6730echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6731if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006732 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006733else
Martin v. Löwis11437992002-04-12 09:54:03 +00006734
6735cat >>confdefs.h <<_ACEOF
6736#define mode_t int
6737_ACEOF
6738
6739fi
6740
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006741{ echo "$as_me:$LINENO: checking for off_t" >&5
6742echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006743if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006744 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006745else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006746 cat >conftest.$ac_ext <<_ACEOF
6747/* confdefs.h. */
6748_ACEOF
6749cat confdefs.h >>conftest.$ac_ext
6750cat >>conftest.$ac_ext <<_ACEOF
6751/* end confdefs.h. */
6752$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006753typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006754int
6755main ()
6756{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006757if ((ac__type_new_ *) 0)
6758 return 0;
6759if (sizeof (ac__type_new_))
6760 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006761 ;
6762 return 0;
6763}
6764_ACEOF
6765rm -f conftest.$ac_objext
6766if { (ac_try="$ac_compile"
6767case "(($ac_try" in
6768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6769 *) ac_try_echo=$ac_try;;
6770esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006772 (eval "$ac_compile") 2>conftest.er1
6773 ac_status=$?
6774 grep -v '^ *+' conftest.er1 >conftest.err
6775 rm -f conftest.er1
6776 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006778 (exit $ac_status); } && {
6779 test -z "$ac_c_werror_flag" ||
6780 test ! -s conftest.err
6781 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006782 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006783else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006785sed 's/^/| /' conftest.$ac_ext >&5
6786
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006787 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006789
6790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006791fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006792{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6793echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6794if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006795 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006796else
Martin v. Löwis11437992002-04-12 09:54:03 +00006797
6798cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006800_ACEOF
6801
6802fi
6803
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006804{ echo "$as_me:$LINENO: checking for pid_t" >&5
6805echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006806if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006807 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006808else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006809 cat >conftest.$ac_ext <<_ACEOF
6810/* confdefs.h. */
6811_ACEOF
6812cat confdefs.h >>conftest.$ac_ext
6813cat >>conftest.$ac_ext <<_ACEOF
6814/* end confdefs.h. */
6815$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006816typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006817int
6818main ()
6819{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006820if ((ac__type_new_ *) 0)
6821 return 0;
6822if (sizeof (ac__type_new_))
6823 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006824 ;
6825 return 0;
6826}
6827_ACEOF
6828rm -f conftest.$ac_objext
6829if { (ac_try="$ac_compile"
6830case "(($ac_try" in
6831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6832 *) ac_try_echo=$ac_try;;
6833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006835 (eval "$ac_compile") 2>conftest.er1
6836 ac_status=$?
6837 grep -v '^ *+' conftest.er1 >conftest.err
6838 rm -f conftest.er1
6839 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006841 (exit $ac_status); } && {
6842 test -z "$ac_c_werror_flag" ||
6843 test ! -s conftest.err
6844 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006845 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006848sed 's/^/| /' conftest.$ac_ext >&5
6849
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006850 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006852
6853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006854fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006855{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6856echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6857if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006858 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006859else
Martin v. Löwis11437992002-04-12 09:54:03 +00006860
6861cat >>confdefs.h <<_ACEOF
6862#define pid_t int
6863_ACEOF
6864
6865fi
6866
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006867{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6868echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006869if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006870 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006871else
6872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006873/* confdefs.h. */
6874_ACEOF
6875cat confdefs.h >>conftest.$ac_ext
6876cat >>conftest.$ac_ext <<_ACEOF
6877/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006878#include <sys/types.h>
6879#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006880
Martin v. Löwis11437992002-04-12 09:54:03 +00006881int
6882main ()
6883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006884return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006885 ;
6886 return 0;
6887}
6888_ACEOF
6889rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006890if { (ac_try="$ac_compile"
6891case "(($ac_try" in
6892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6893 *) ac_try_echo=$ac_try;;
6894esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006898 grep -v '^ *+' conftest.er1 >conftest.err
6899 rm -f conftest.er1
6900 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006902 (exit $ac_status); } && {
6903 test -z "$ac_c_werror_flag" ||
6904 test ! -s conftest.err
6905 } && test -s conftest.$ac_objext; then
6906 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006909sed 's/^/| /' conftest.$ac_ext >&5
6910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006911 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006913
6914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006915fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006916{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6917echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006918
Martin v. Löwis11437992002-04-12 09:54:03 +00006919cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006920#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006921_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006922
Michael W. Hudson54241132001-12-07 15:38:26 +00006923
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006924{ echo "$as_me:$LINENO: checking for size_t" >&5
6925echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006926if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006928else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006929 cat >conftest.$ac_ext <<_ACEOF
6930/* confdefs.h. */
6931_ACEOF
6932cat confdefs.h >>conftest.$ac_ext
6933cat >>conftest.$ac_ext <<_ACEOF
6934/* end confdefs.h. */
6935$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006936typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006937int
6938main ()
6939{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006940if ((ac__type_new_ *) 0)
6941 return 0;
6942if (sizeof (ac__type_new_))
6943 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006944 ;
6945 return 0;
6946}
6947_ACEOF
6948rm -f conftest.$ac_objext
6949if { (ac_try="$ac_compile"
6950case "(($ac_try" in
6951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6952 *) ac_try_echo=$ac_try;;
6953esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006955 (eval "$ac_compile") 2>conftest.er1
6956 ac_status=$?
6957 grep -v '^ *+' conftest.er1 >conftest.err
6958 rm -f conftest.er1
6959 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006961 (exit $ac_status); } && {
6962 test -z "$ac_c_werror_flag" ||
6963 test ! -s conftest.err
6964 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006965 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006966else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006968sed 's/^/| /' conftest.$ac_ext >&5
6969
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006970 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006972
6973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006974fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006975{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6976echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6977if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006978 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006979else
Martin v. Löwis11437992002-04-12 09:54:03 +00006980
6981cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006982#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006983_ACEOF
6984
6985fi
6986
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006987{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6988echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006989if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006990 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006991else
6992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006993/* confdefs.h. */
6994_ACEOF
6995cat confdefs.h >>conftest.$ac_ext
6996cat >>conftest.$ac_ext <<_ACEOF
6997/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006998#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006999
7000_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007002 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003 ac_cv_type_uid_t=yes
7004else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007005 ac_cv_type_uid_t=no
7006fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007007rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007009fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007010{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7011echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007012if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007013
Martin v. Löwis11437992002-04-12 09:54:03 +00007014cat >>confdefs.h <<\_ACEOF
7015#define uid_t int
7016_ACEOF
7017
7018
7019cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007020#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007021_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007022
7023fi
7024
Mark Dickinsonbd792642009-03-18 20:06:12 +00007025
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007026 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7027echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007028if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007029 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007030else
7031 ac_cv_c_uint32_t=no
7032 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7033 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7034 cat >conftest.$ac_ext <<_ACEOF
7035/* confdefs.h. */
7036_ACEOF
7037cat confdefs.h >>conftest.$ac_ext
7038cat >>conftest.$ac_ext <<_ACEOF
7039/* end confdefs.h. */
7040$ac_includes_default
7041int
7042main ()
7043{
7044static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7045test_array [0] = 0
7046
7047 ;
7048 return 0;
7049}
7050_ACEOF
7051rm -f conftest.$ac_objext
7052if { (ac_try="$ac_compile"
7053case "(($ac_try" in
7054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7055 *) ac_try_echo=$ac_try;;
7056esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007058 (eval "$ac_compile") 2>conftest.er1
7059 ac_status=$?
7060 grep -v '^ *+' conftest.er1 >conftest.err
7061 rm -f conftest.er1
7062 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007064 (exit $ac_status); } && {
7065 test -z "$ac_c_werror_flag" ||
7066 test ! -s conftest.err
7067 } && test -s conftest.$ac_objext; then
7068 case $ac_type in
7069 uint32_t) ac_cv_c_uint32_t=yes ;;
7070 *) ac_cv_c_uint32_t=$ac_type ;;
7071esac
7072
7073else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007074 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007075sed 's/^/| /' conftest.$ac_ext >&5
7076
7077
7078fi
7079
7080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7081 test "$ac_cv_c_uint32_t" != no && break
7082 done
7083fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007084{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7085echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007086 case $ac_cv_c_uint32_t in #(
7087 no|yes) ;; #(
7088 *)
7089
7090cat >>confdefs.h <<\_ACEOF
7091#define _UINT32_T 1
7092_ACEOF
7093
7094
7095cat >>confdefs.h <<_ACEOF
7096#define uint32_t $ac_cv_c_uint32_t
7097_ACEOF
7098;;
7099 esac
7100
7101
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007102 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7103echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007104if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007105 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007106else
7107 ac_cv_c_uint64_t=no
7108 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7109 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7110 cat >conftest.$ac_ext <<_ACEOF
7111/* confdefs.h. */
7112_ACEOF
7113cat confdefs.h >>conftest.$ac_ext
7114cat >>conftest.$ac_ext <<_ACEOF
7115/* end confdefs.h. */
7116$ac_includes_default
7117int
7118main ()
7119{
7120static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7121test_array [0] = 0
7122
7123 ;
7124 return 0;
7125}
7126_ACEOF
7127rm -f conftest.$ac_objext
7128if { (ac_try="$ac_compile"
7129case "(($ac_try" in
7130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7131 *) ac_try_echo=$ac_try;;
7132esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007134 (eval "$ac_compile") 2>conftest.er1
7135 ac_status=$?
7136 grep -v '^ *+' conftest.er1 >conftest.err
7137 rm -f conftest.er1
7138 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007140 (exit $ac_status); } && {
7141 test -z "$ac_c_werror_flag" ||
7142 test ! -s conftest.err
7143 } && test -s conftest.$ac_objext; then
7144 case $ac_type in
7145 uint64_t) ac_cv_c_uint64_t=yes ;;
7146 *) ac_cv_c_uint64_t=$ac_type ;;
7147esac
7148
7149else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007150 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007151sed 's/^/| /' conftest.$ac_ext >&5
7152
7153
7154fi
7155
7156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7157 test "$ac_cv_c_uint64_t" != no && break
7158 done
7159fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007160{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7161echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007162 case $ac_cv_c_uint64_t in #(
7163 no|yes) ;; #(
7164 *)
7165
7166cat >>confdefs.h <<\_ACEOF
7167#define _UINT64_T 1
7168_ACEOF
7169
7170
7171cat >>confdefs.h <<_ACEOF
7172#define uint64_t $ac_cv_c_uint64_t
7173_ACEOF
7174;;
7175 esac
7176
7177
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007178 { echo "$as_me:$LINENO: checking for int32_t" >&5
7179echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007180if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007181 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007182else
7183 ac_cv_c_int32_t=no
7184 for ac_type in 'int32_t' 'int' 'long int' \
7185 'long long int' 'short int' 'signed char'; do
7186 cat >conftest.$ac_ext <<_ACEOF
7187/* confdefs.h. */
7188_ACEOF
7189cat confdefs.h >>conftest.$ac_ext
7190cat >>conftest.$ac_ext <<_ACEOF
7191/* end confdefs.h. */
7192$ac_includes_default
7193int
7194main ()
7195{
7196static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7197test_array [0] = 0
7198
7199 ;
7200 return 0;
7201}
7202_ACEOF
7203rm -f conftest.$ac_objext
7204if { (ac_try="$ac_compile"
7205case "(($ac_try" in
7206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7207 *) ac_try_echo=$ac_try;;
7208esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007210 (eval "$ac_compile") 2>conftest.er1
7211 ac_status=$?
7212 grep -v '^ *+' conftest.er1 >conftest.err
7213 rm -f conftest.er1
7214 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007216 (exit $ac_status); } && {
7217 test -z "$ac_c_werror_flag" ||
7218 test ! -s conftest.err
7219 } && test -s conftest.$ac_objext; then
7220 cat >conftest.$ac_ext <<_ACEOF
7221/* confdefs.h. */
7222_ACEOF
7223cat confdefs.h >>conftest.$ac_ext
7224cat >>conftest.$ac_ext <<_ACEOF
7225/* end confdefs.h. */
7226$ac_includes_default
7227int
7228main ()
7229{
7230static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007231 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007232test_array [0] = 0
7233
7234 ;
7235 return 0;
7236}
7237_ACEOF
7238rm -f conftest.$ac_objext
7239if { (ac_try="$ac_compile"
7240case "(($ac_try" in
7241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7242 *) ac_try_echo=$ac_try;;
7243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007245 (eval "$ac_compile") 2>conftest.er1
7246 ac_status=$?
7247 grep -v '^ *+' conftest.er1 >conftest.err
7248 rm -f conftest.er1
7249 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007251 (exit $ac_status); } && {
7252 test -z "$ac_c_werror_flag" ||
7253 test ! -s conftest.err
7254 } && test -s conftest.$ac_objext; then
7255 :
7256else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007257 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007258sed 's/^/| /' conftest.$ac_ext >&5
7259
7260 case $ac_type in
7261 int32_t) ac_cv_c_int32_t=yes ;;
7262 *) ac_cv_c_int32_t=$ac_type ;;
7263esac
7264
7265fi
7266
7267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7268else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007269 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007270sed 's/^/| /' conftest.$ac_ext >&5
7271
7272
7273fi
7274
7275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7276 test "$ac_cv_c_int32_t" != no && break
7277 done
7278fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007279{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7280echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007281 case $ac_cv_c_int32_t in #(
7282 no|yes) ;; #(
7283 *)
7284
7285cat >>confdefs.h <<_ACEOF
7286#define int32_t $ac_cv_c_int32_t
7287_ACEOF
7288;;
7289 esac
7290
7291
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007292 { echo "$as_me:$LINENO: checking for int64_t" >&5
7293echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007294if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007295 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007296else
7297 ac_cv_c_int64_t=no
7298 for ac_type in 'int64_t' 'int' 'long int' \
7299 'long long int' 'short int' 'signed char'; do
7300 cat >conftest.$ac_ext <<_ACEOF
7301/* confdefs.h. */
7302_ACEOF
7303cat confdefs.h >>conftest.$ac_ext
7304cat >>conftest.$ac_ext <<_ACEOF
7305/* end confdefs.h. */
7306$ac_includes_default
7307int
7308main ()
7309{
7310static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7311test_array [0] = 0
7312
7313 ;
7314 return 0;
7315}
7316_ACEOF
7317rm -f conftest.$ac_objext
7318if { (ac_try="$ac_compile"
7319case "(($ac_try" in
7320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7321 *) ac_try_echo=$ac_try;;
7322esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007324 (eval "$ac_compile") 2>conftest.er1
7325 ac_status=$?
7326 grep -v '^ *+' conftest.er1 >conftest.err
7327 rm -f conftest.er1
7328 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007330 (exit $ac_status); } && {
7331 test -z "$ac_c_werror_flag" ||
7332 test ! -s conftest.err
7333 } && test -s conftest.$ac_objext; then
7334 cat >conftest.$ac_ext <<_ACEOF
7335/* confdefs.h. */
7336_ACEOF
7337cat confdefs.h >>conftest.$ac_ext
7338cat >>conftest.$ac_ext <<_ACEOF
7339/* end confdefs.h. */
7340$ac_includes_default
7341int
7342main ()
7343{
7344static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007345 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007346test_array [0] = 0
7347
7348 ;
7349 return 0;
7350}
7351_ACEOF
7352rm -f conftest.$ac_objext
7353if { (ac_try="$ac_compile"
7354case "(($ac_try" in
7355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7356 *) ac_try_echo=$ac_try;;
7357esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007359 (eval "$ac_compile") 2>conftest.er1
7360 ac_status=$?
7361 grep -v '^ *+' conftest.er1 >conftest.err
7362 rm -f conftest.er1
7363 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007365 (exit $ac_status); } && {
7366 test -z "$ac_c_werror_flag" ||
7367 test ! -s conftest.err
7368 } && test -s conftest.$ac_objext; then
7369 :
7370else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007371 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007372sed 's/^/| /' conftest.$ac_ext >&5
7373
7374 case $ac_type in
7375 int64_t) ac_cv_c_int64_t=yes ;;
7376 *) ac_cv_c_int64_t=$ac_type ;;
7377esac
7378
7379fi
7380
7381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007383 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007384sed 's/^/| /' conftest.$ac_ext >&5
7385
7386
7387fi
7388
7389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7390 test "$ac_cv_c_int64_t" != no && break
7391 done
7392fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007393{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7394echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007395 case $ac_cv_c_int64_t in #(
7396 no|yes) ;; #(
7397 *)
7398
7399cat >>confdefs.h <<_ACEOF
7400#define int64_t $ac_cv_c_int64_t
7401_ACEOF
7402;;
7403 esac
7404
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007405{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7406echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007407if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007408 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007409else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007410 cat >conftest.$ac_ext <<_ACEOF
7411/* confdefs.h. */
7412_ACEOF
7413cat confdefs.h >>conftest.$ac_ext
7414cat >>conftest.$ac_ext <<_ACEOF
7415/* end confdefs.h. */
7416$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007417typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007418int
7419main ()
7420{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007421if ((ac__type_new_ *) 0)
7422 return 0;
7423if (sizeof (ac__type_new_))
7424 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007425 ;
7426 return 0;
7427}
7428_ACEOF
7429rm -f conftest.$ac_objext
7430if { (ac_try="$ac_compile"
7431case "(($ac_try" in
7432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7433 *) ac_try_echo=$ac_try;;
7434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007436 (eval "$ac_compile") 2>conftest.er1
7437 ac_status=$?
7438 grep -v '^ *+' conftest.er1 >conftest.err
7439 rm -f conftest.er1
7440 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007442 (exit $ac_status); } && {
7443 test -z "$ac_c_werror_flag" ||
7444 test ! -s conftest.err
7445 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007446 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007447else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007448 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007449sed 's/^/| /' conftest.$ac_ext >&5
7450
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007451 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007453
7454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007455fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007456{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7457echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7458if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007459
7460cat >>confdefs.h <<\_ACEOF
7461#define HAVE_SSIZE_T 1
7462_ACEOF
7463
7464fi
7465
Jack Jansendd19cf82001-12-06 22:36:17 +00007466
Michael W. Hudson54241132001-12-07 15:38:26 +00007467# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007468# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007469{ echo "$as_me:$LINENO: checking for int" >&5
7470echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7471if test "${ac_cv_type_int+set}" = set; then
7472 echo $ECHO_N "(cached) $ECHO_C" >&6
7473else
7474 cat >conftest.$ac_ext <<_ACEOF
7475/* confdefs.h. */
7476_ACEOF
7477cat confdefs.h >>conftest.$ac_ext
7478cat >>conftest.$ac_ext <<_ACEOF
7479/* end confdefs.h. */
7480$ac_includes_default
7481typedef int ac__type_new_;
7482int
7483main ()
7484{
7485if ((ac__type_new_ *) 0)
7486 return 0;
7487if (sizeof (ac__type_new_))
7488 return 0;
7489 ;
7490 return 0;
7491}
7492_ACEOF
7493rm -f conftest.$ac_objext
7494if { (ac_try="$ac_compile"
7495case "(($ac_try" in
7496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7497 *) ac_try_echo=$ac_try;;
7498esac
7499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7500 (eval "$ac_compile") 2>conftest.er1
7501 ac_status=$?
7502 grep -v '^ *+' conftest.er1 >conftest.err
7503 rm -f conftest.er1
7504 cat conftest.err >&5
7505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7506 (exit $ac_status); } && {
7507 test -z "$ac_c_werror_flag" ||
7508 test ! -s conftest.err
7509 } && test -s conftest.$ac_objext; then
7510 ac_cv_type_int=yes
7511else
7512 echo "$as_me: failed program was:" >&5
7513sed 's/^/| /' conftest.$ac_ext >&5
7514
7515 ac_cv_type_int=no
7516fi
7517
7518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7519fi
7520{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7521echo "${ECHO_T}$ac_cv_type_int" >&6; }
7522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007523# The cast to long int works around a bug in the HP C Compiler
7524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7526# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007527{ echo "$as_me:$LINENO: checking size of int" >&5
7528echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007529if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007530 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007531else
Martin v. Löwis11437992002-04-12 09:54:03 +00007532 if test "$cross_compiling" = yes; then
7533 # Depending upon the size, compute the lo and hi bounds.
7534cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007535/* confdefs.h. */
7536_ACEOF
7537cat confdefs.h >>conftest.$ac_ext
7538cat >>conftest.$ac_ext <<_ACEOF
7539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007540$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007541 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007542int
7543main ()
7544{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007545static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007546test_array [0] = 0
7547
7548 ;
7549 return 0;
7550}
7551_ACEOF
7552rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007553if { (ac_try="$ac_compile"
7554case "(($ac_try" in
7555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7556 *) ac_try_echo=$ac_try;;
7557esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007561 grep -v '^ *+' conftest.er1 >conftest.err
7562 rm -f conftest.er1
7563 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007565 (exit $ac_status); } && {
7566 test -z "$ac_c_werror_flag" ||
7567 test ! -s conftest.err
7568 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007569 ac_lo=0 ac_mid=0
7570 while :; do
7571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007572/* confdefs.h. */
7573_ACEOF
7574cat confdefs.h >>conftest.$ac_ext
7575cat >>conftest.$ac_ext <<_ACEOF
7576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007577$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007578 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007579int
7580main ()
7581{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007582static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007583test_array [0] = 0
7584
7585 ;
7586 return 0;
7587}
7588_ACEOF
7589rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007590if { (ac_try="$ac_compile"
7591case "(($ac_try" in
7592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7593 *) ac_try_echo=$ac_try;;
7594esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007596 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007598 grep -v '^ *+' conftest.er1 >conftest.err
7599 rm -f conftest.er1
7600 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602 (exit $ac_status); } && {
7603 test -z "$ac_c_werror_flag" ||
7604 test ! -s conftest.err
7605 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 ac_hi=$ac_mid; break
7607else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007609sed 's/^/| /' conftest.$ac_ext >&5
7610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611 ac_lo=`expr $ac_mid + 1`
7612 if test $ac_lo -le $ac_mid; then
7613 ac_lo= ac_hi=
7614 break
7615 fi
7616 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618
7619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 done
7621else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007623sed 's/^/| /' conftest.$ac_ext >&5
7624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007626/* confdefs.h. */
7627_ACEOF
7628cat confdefs.h >>conftest.$ac_ext
7629cat >>conftest.$ac_ext <<_ACEOF
7630/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007631$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007632 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007633int
7634main ()
7635{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007636static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007637test_array [0] = 0
7638
7639 ;
7640 return 0;
7641}
7642_ACEOF
7643rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007644if { (ac_try="$ac_compile"
7645case "(($ac_try" in
7646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7647 *) ac_try_echo=$ac_try;;
7648esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007652 grep -v '^ *+' conftest.er1 >conftest.err
7653 rm -f conftest.er1
7654 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007656 (exit $ac_status); } && {
7657 test -z "$ac_c_werror_flag" ||
7658 test ! -s conftest.err
7659 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 ac_hi=-1 ac_mid=-1
7661 while :; do
7662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007663/* confdefs.h. */
7664_ACEOF
7665cat confdefs.h >>conftest.$ac_ext
7666cat >>conftest.$ac_ext <<_ACEOF
7667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007668$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007669 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007670int
7671main ()
7672{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007673static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007674test_array [0] = 0
7675
7676 ;
7677 return 0;
7678}
7679_ACEOF
7680rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681if { (ac_try="$ac_compile"
7682case "(($ac_try" in
7683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7684 *) ac_try_echo=$ac_try;;
7685esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007689 grep -v '^ *+' conftest.er1 >conftest.err
7690 rm -f conftest.er1
7691 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693 (exit $ac_status); } && {
7694 test -z "$ac_c_werror_flag" ||
7695 test ! -s conftest.err
7696 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 ac_lo=$ac_mid; break
7698else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007700sed 's/^/| /' conftest.$ac_ext >&5
7701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702 ac_hi=`expr '(' $ac_mid ')' - 1`
7703 if test $ac_mid -le $ac_hi; then
7704 ac_lo= ac_hi=
7705 break
7706 fi
7707 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007709
7710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 done
7712else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007714sed 's/^/| /' conftest.$ac_ext >&5
7715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007718
7719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721
7722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007723# Binary search between lo and hi bounds.
7724while test "x$ac_lo" != "x$ac_hi"; do
7725 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007727/* confdefs.h. */
7728_ACEOF
7729cat confdefs.h >>conftest.$ac_ext
7730cat >>conftest.$ac_ext <<_ACEOF
7731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007732$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007733 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007734int
7735main ()
7736{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007737static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007738test_array [0] = 0
7739
7740 ;
7741 return 0;
7742}
7743_ACEOF
7744rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745if { (ac_try="$ac_compile"
7746case "(($ac_try" in
7747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7748 *) ac_try_echo=$ac_try;;
7749esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007753 grep -v '^ *+' conftest.er1 >conftest.err
7754 rm -f conftest.er1
7755 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757 (exit $ac_status); } && {
7758 test -z "$ac_c_werror_flag" ||
7759 test ! -s conftest.err
7760 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 ac_hi=$ac_mid
7762else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007764sed 's/^/| /' conftest.$ac_ext >&5
7765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007766 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768
7769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007770done
7771case $ac_lo in
7772?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007774 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007775See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007776echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007777See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007778 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007779 else
7780 ac_cv_sizeof_int=0
7781 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007782esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007783else
Martin v. Löwis11437992002-04-12 09:54:03 +00007784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007785/* confdefs.h. */
7786_ACEOF
7787cat confdefs.h >>conftest.$ac_ext
7788cat >>conftest.$ac_ext <<_ACEOF
7789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007791 typedef int ac__type_sizeof_;
7792static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7793static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007794#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007795#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007796int
7797main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007798{
Martin v. Löwis11437992002-04-12 09:54:03 +00007799
7800 FILE *f = fopen ("conftest.val", "w");
7801 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007803 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007804 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007806 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007808 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 }
7810 else
7811 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007813 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007815 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007818
7819 ;
7820 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007821}
Martin v. Löwis11437992002-04-12 09:54:03 +00007822_ACEOF
7823rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824if { (ac_try="$ac_link"
7825case "(($ac_try" in
7826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7827 *) ac_try_echo=$ac_try;;
7828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834 { (case "(($ac_try" in
7835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7836 *) ac_try_echo=$ac_try;;
7837esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 (exit $ac_status); }; }; then
7843 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007844else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007845 echo "$as_me: program exited with status $ac_status" >&5
7846echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007847sed 's/^/| /' conftest.$ac_ext >&5
7848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007851 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007852See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007853echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007854See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007855 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856 else
7857 ac_cv_sizeof_int=0
7858 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860rm -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 +00007861fi
7862rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007863fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007864{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7865echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866
7867
7868
Martin v. Löwis11437992002-04-12 09:54:03 +00007869cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007870#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007871_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007872
7873
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007874{ echo "$as_me:$LINENO: checking for long" >&5
7875echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7876if test "${ac_cv_type_long+set}" = set; then
7877 echo $ECHO_N "(cached) $ECHO_C" >&6
7878else
7879 cat >conftest.$ac_ext <<_ACEOF
7880/* confdefs.h. */
7881_ACEOF
7882cat confdefs.h >>conftest.$ac_ext
7883cat >>conftest.$ac_ext <<_ACEOF
7884/* end confdefs.h. */
7885$ac_includes_default
7886typedef long ac__type_new_;
7887int
7888main ()
7889{
7890if ((ac__type_new_ *) 0)
7891 return 0;
7892if (sizeof (ac__type_new_))
7893 return 0;
7894 ;
7895 return 0;
7896}
7897_ACEOF
7898rm -f conftest.$ac_objext
7899if { (ac_try="$ac_compile"
7900case "(($ac_try" in
7901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7902 *) ac_try_echo=$ac_try;;
7903esac
7904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7905 (eval "$ac_compile") 2>conftest.er1
7906 ac_status=$?
7907 grep -v '^ *+' conftest.er1 >conftest.err
7908 rm -f conftest.er1
7909 cat conftest.err >&5
7910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7911 (exit $ac_status); } && {
7912 test -z "$ac_c_werror_flag" ||
7913 test ! -s conftest.err
7914 } && test -s conftest.$ac_objext; then
7915 ac_cv_type_long=yes
7916else
7917 echo "$as_me: failed program was:" >&5
7918sed 's/^/| /' conftest.$ac_ext >&5
7919
7920 ac_cv_type_long=no
7921fi
7922
7923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7924fi
7925{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7926echo "${ECHO_T}$ac_cv_type_long" >&6; }
7927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007928# The cast to long int works around a bug in the HP C Compiler
7929# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7930# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7931# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007932{ echo "$as_me:$LINENO: checking size of long" >&5
7933echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007934if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007935 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007936else
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 if test "$cross_compiling" = yes; then
7938 # Depending upon the size, compute the lo and hi bounds.
7939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007940/* confdefs.h. */
7941_ACEOF
7942cat confdefs.h >>conftest.$ac_ext
7943cat >>conftest.$ac_ext <<_ACEOF
7944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007945$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007946 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007947int
7948main ()
7949{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007950static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007951test_array [0] = 0
7952
7953 ;
7954 return 0;
7955}
7956_ACEOF
7957rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958if { (ac_try="$ac_compile"
7959case "(($ac_try" in
7960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7961 *) ac_try_echo=$ac_try;;
7962esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007966 grep -v '^ *+' conftest.er1 >conftest.err
7967 rm -f conftest.er1
7968 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970 (exit $ac_status); } && {
7971 test -z "$ac_c_werror_flag" ||
7972 test ! -s conftest.err
7973 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 ac_lo=0 ac_mid=0
7975 while :; do
7976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007977/* confdefs.h. */
7978_ACEOF
7979cat confdefs.h >>conftest.$ac_ext
7980cat >>conftest.$ac_ext <<_ACEOF
7981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007982$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007983 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007984int
7985main ()
7986{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007987static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007988test_array [0] = 0
7989
7990 ;
7991 return 0;
7992}
7993_ACEOF
7994rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995if { (ac_try="$ac_compile"
7996case "(($ac_try" in
7997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7998 *) ac_try_echo=$ac_try;;
7999esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008003 grep -v '^ *+' conftest.er1 >conftest.err
8004 rm -f conftest.er1
8005 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007 (exit $ac_status); } && {
8008 test -z "$ac_c_werror_flag" ||
8009 test ! -s conftest.err
8010 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 ac_hi=$ac_mid; break
8012else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008014sed 's/^/| /' conftest.$ac_ext >&5
8015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016 ac_lo=`expr $ac_mid + 1`
8017 if test $ac_lo -le $ac_mid; then
8018 ac_lo= ac_hi=
8019 break
8020 fi
8021 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023
8024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 done
8026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008028sed 's/^/| /' conftest.$ac_ext >&5
8029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008031/* confdefs.h. */
8032_ACEOF
8033cat confdefs.h >>conftest.$ac_ext
8034cat >>conftest.$ac_ext <<_ACEOF
8035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008036$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008037 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008038int
8039main ()
8040{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008041static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008042test_array [0] = 0
8043
8044 ;
8045 return 0;
8046}
8047_ACEOF
8048rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049if { (ac_try="$ac_compile"
8050case "(($ac_try" in
8051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8052 *) ac_try_echo=$ac_try;;
8053esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008057 grep -v '^ *+' conftest.er1 >conftest.err
8058 rm -f conftest.er1
8059 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061 (exit $ac_status); } && {
8062 test -z "$ac_c_werror_flag" ||
8063 test ! -s conftest.err
8064 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 ac_hi=-1 ac_mid=-1
8066 while :; do
8067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008068/* confdefs.h. */
8069_ACEOF
8070cat confdefs.h >>conftest.$ac_ext
8071cat >>conftest.$ac_ext <<_ACEOF
8072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008073$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008074 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008075int
8076main ()
8077{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008078static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008079test_array [0] = 0
8080
8081 ;
8082 return 0;
8083}
8084_ACEOF
8085rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008086if { (ac_try="$ac_compile"
8087case "(($ac_try" in
8088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8089 *) ac_try_echo=$ac_try;;
8090esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008094 grep -v '^ *+' conftest.er1 >conftest.err
8095 rm -f conftest.er1
8096 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098 (exit $ac_status); } && {
8099 test -z "$ac_c_werror_flag" ||
8100 test ! -s conftest.err
8101 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 ac_lo=$ac_mid; break
8103else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008105sed 's/^/| /' conftest.$ac_ext >&5
8106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107 ac_hi=`expr '(' $ac_mid ')' - 1`
8108 if test $ac_mid -le $ac_hi; then
8109 ac_lo= ac_hi=
8110 break
8111 fi
8112 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114
8115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 done
8117else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008119sed 's/^/| /' conftest.$ac_ext >&5
8120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123
8124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008126
8127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008128# Binary search between lo and hi bounds.
8129while test "x$ac_lo" != "x$ac_hi"; do
8130 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008132/* confdefs.h. */
8133_ACEOF
8134cat confdefs.h >>conftest.$ac_ext
8135cat >>conftest.$ac_ext <<_ACEOF
8136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008137$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008138 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008139int
8140main ()
8141{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008142static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008143test_array [0] = 0
8144
8145 ;
8146 return 0;
8147}
8148_ACEOF
8149rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008150if { (ac_try="$ac_compile"
8151case "(($ac_try" in
8152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8153 *) ac_try_echo=$ac_try;;
8154esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008158 grep -v '^ *+' conftest.er1 >conftest.err
8159 rm -f conftest.er1
8160 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162 (exit $ac_status); } && {
8163 test -z "$ac_c_werror_flag" ||
8164 test ! -s conftest.err
8165 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 ac_hi=$ac_mid
8167else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008169sed 's/^/| /' conftest.$ac_ext >&5
8170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173
8174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008175done
8176case $ac_lo in
8177?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008179 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008180See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008181echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008182See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008183 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008184 else
8185 ac_cv_sizeof_long=0
8186 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008187esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008188else
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* confdefs.h. */
8191_ACEOF
8192cat confdefs.h >>conftest.$ac_ext
8193cat >>conftest.$ac_ext <<_ACEOF
8194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008196 typedef long ac__type_sizeof_;
8197static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8198static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008199#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008200#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008201int
8202main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008203{
Martin v. Löwis11437992002-04-12 09:54:03 +00008204
8205 FILE *f = fopen ("conftest.val", "w");
8206 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008208 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008211 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008213 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 }
8215 else
8216 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008218 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008220 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008223
8224 ;
8225 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008226}
Martin v. Löwis11437992002-04-12 09:54:03 +00008227_ACEOF
8228rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229if { (ac_try="$ac_link"
8230case "(($ac_try" in
8231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8232 *) ac_try_echo=$ac_try;;
8233esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008236 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239 { (case "(($ac_try" in
8240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8241 *) ac_try_echo=$ac_try;;
8242esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008245 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008247 (exit $ac_status); }; }; then
8248 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008249else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008250 echo "$as_me: program exited with status $ac_status" >&5
8251echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008252sed 's/^/| /' conftest.$ac_ext >&5
8253
Martin v. Löwis11437992002-04-12 09:54:03 +00008254( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008256 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008257See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008258echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008259See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008260 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261 else
8262 ac_cv_sizeof_long=0
8263 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265rm -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 +00008266fi
8267rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008268fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008269{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8270echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271
8272
8273
Martin v. Löwis11437992002-04-12 09:54:03 +00008274cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008275#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008276_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008277
8278
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008279{ echo "$as_me:$LINENO: checking for void *" >&5
8280echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8281if test "${ac_cv_type_void_p+set}" = set; then
8282 echo $ECHO_N "(cached) $ECHO_C" >&6
8283else
8284 cat >conftest.$ac_ext <<_ACEOF
8285/* confdefs.h. */
8286_ACEOF
8287cat confdefs.h >>conftest.$ac_ext
8288cat >>conftest.$ac_ext <<_ACEOF
8289/* end confdefs.h. */
8290$ac_includes_default
8291typedef void * ac__type_new_;
8292int
8293main ()
8294{
8295if ((ac__type_new_ *) 0)
8296 return 0;
8297if (sizeof (ac__type_new_))
8298 return 0;
8299 ;
8300 return 0;
8301}
8302_ACEOF
8303rm -f conftest.$ac_objext
8304if { (ac_try="$ac_compile"
8305case "(($ac_try" in
8306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8307 *) ac_try_echo=$ac_try;;
8308esac
8309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8310 (eval "$ac_compile") 2>conftest.er1
8311 ac_status=$?
8312 grep -v '^ *+' conftest.er1 >conftest.err
8313 rm -f conftest.er1
8314 cat conftest.err >&5
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); } && {
8317 test -z "$ac_c_werror_flag" ||
8318 test ! -s conftest.err
8319 } && test -s conftest.$ac_objext; then
8320 ac_cv_type_void_p=yes
8321else
8322 echo "$as_me: failed program was:" >&5
8323sed 's/^/| /' conftest.$ac_ext >&5
8324
8325 ac_cv_type_void_p=no
8326fi
8327
8328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8329fi
8330{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8331echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008333# The cast to long int works around a bug in the HP C Compiler
8334# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8335# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8336# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008337{ echo "$as_me:$LINENO: checking size of void *" >&5
8338echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008339if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008340 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008341else
Martin v. Löwis11437992002-04-12 09:54:03 +00008342 if test "$cross_compiling" = yes; then
8343 # Depending upon the size, compute the lo and hi bounds.
8344cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008345/* confdefs.h. */
8346_ACEOF
8347cat confdefs.h >>conftest.$ac_ext
8348cat >>conftest.$ac_ext <<_ACEOF
8349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008350$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008351 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008352int
8353main ()
8354{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008356test_array [0] = 0
8357
8358 ;
8359 return 0;
8360}
8361_ACEOF
8362rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363if { (ac_try="$ac_compile"
8364case "(($ac_try" in
8365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8366 *) ac_try_echo=$ac_try;;
8367esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008371 grep -v '^ *+' conftest.er1 >conftest.err
8372 rm -f conftest.er1
8373 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375 (exit $ac_status); } && {
8376 test -z "$ac_c_werror_flag" ||
8377 test ! -s conftest.err
8378 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008379 ac_lo=0 ac_mid=0
8380 while :; do
8381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008382/* confdefs.h. */
8383_ACEOF
8384cat confdefs.h >>conftest.$ac_ext
8385cat >>conftest.$ac_ext <<_ACEOF
8386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008387$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008388 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008389int
8390main ()
8391{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008392static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008393test_array [0] = 0
8394
8395 ;
8396 return 0;
8397}
8398_ACEOF
8399rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400if { (ac_try="$ac_compile"
8401case "(($ac_try" in
8402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8403 *) ac_try_echo=$ac_try;;
8404esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008408 grep -v '^ *+' conftest.er1 >conftest.err
8409 rm -f conftest.er1
8410 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412 (exit $ac_status); } && {
8413 test -z "$ac_c_werror_flag" ||
8414 test ! -s conftest.err
8415 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008416 ac_hi=$ac_mid; break
8417else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008419sed 's/^/| /' conftest.$ac_ext >&5
8420
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421 ac_lo=`expr $ac_mid + 1`
8422 if test $ac_lo -le $ac_mid; then
8423 ac_lo= ac_hi=
8424 break
8425 fi
8426 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428
8429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 done
8431else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008433sed 's/^/| /' conftest.$ac_ext >&5
8434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008436/* confdefs.h. */
8437_ACEOF
8438cat confdefs.h >>conftest.$ac_ext
8439cat >>conftest.$ac_ext <<_ACEOF
8440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008441$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008442 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008443int
8444main ()
8445{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008446static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008447test_array [0] = 0
8448
8449 ;
8450 return 0;
8451}
8452_ACEOF
8453rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008454if { (ac_try="$ac_compile"
8455case "(($ac_try" in
8456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8457 *) ac_try_echo=$ac_try;;
8458esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008462 grep -v '^ *+' conftest.er1 >conftest.err
8463 rm -f conftest.er1
8464 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466 (exit $ac_status); } && {
8467 test -z "$ac_c_werror_flag" ||
8468 test ! -s conftest.err
8469 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ac_hi=-1 ac_mid=-1
8471 while :; do
8472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008473/* confdefs.h. */
8474_ACEOF
8475cat confdefs.h >>conftest.$ac_ext
8476cat >>conftest.$ac_ext <<_ACEOF
8477/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008478$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008479 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008480int
8481main ()
8482{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008483static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008484test_array [0] = 0
8485
8486 ;
8487 return 0;
8488}
8489_ACEOF
8490rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491if { (ac_try="$ac_compile"
8492case "(($ac_try" in
8493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8494 *) ac_try_echo=$ac_try;;
8495esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008499 grep -v '^ *+' conftest.er1 >conftest.err
8500 rm -f conftest.er1
8501 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503 (exit $ac_status); } && {
8504 test -z "$ac_c_werror_flag" ||
8505 test ! -s conftest.err
8506 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_lo=$ac_mid; break
8508else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008510sed 's/^/| /' conftest.$ac_ext >&5
8511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512 ac_hi=`expr '(' $ac_mid ')' - 1`
8513 if test $ac_mid -le $ac_hi; then
8514 ac_lo= ac_hi=
8515 break
8516 fi
8517 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519
8520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 done
8522else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008524sed 's/^/| /' conftest.$ac_ext >&5
8525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528
8529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531
8532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008533# Binary search between lo and hi bounds.
8534while test "x$ac_lo" != "x$ac_hi"; do
8535 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008537/* confdefs.h. */
8538_ACEOF
8539cat confdefs.h >>conftest.$ac_ext
8540cat >>conftest.$ac_ext <<_ACEOF
8541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008542$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008543 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008544int
8545main ()
8546{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008547static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008548test_array [0] = 0
8549
8550 ;
8551 return 0;
8552}
8553_ACEOF
8554rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008555if { (ac_try="$ac_compile"
8556case "(($ac_try" in
8557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8558 *) ac_try_echo=$ac_try;;
8559esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008563 grep -v '^ *+' conftest.er1 >conftest.err
8564 rm -f conftest.er1
8565 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567 (exit $ac_status); } && {
8568 test -z "$ac_c_werror_flag" ||
8569 test ! -s conftest.err
8570 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ac_hi=$ac_mid
8572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008574sed 's/^/| /' conftest.$ac_ext >&5
8575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578
8579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008580done
8581case $ac_lo in
8582?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008584 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008585See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008586echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008587See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008588 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589 else
8590 ac_cv_sizeof_void_p=0
8591 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008592esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008593else
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008595/* confdefs.h. */
8596_ACEOF
8597cat confdefs.h >>conftest.$ac_ext
8598cat >>conftest.$ac_ext <<_ACEOF
8599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008600$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008601 typedef void * ac__type_sizeof_;
8602static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8603static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008604#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008605#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008606int
8607main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008608{
Martin v. Löwis11437992002-04-12 09:54:03 +00008609
8610 FILE *f = fopen ("conftest.val", "w");
8611 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008613 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008616 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008618 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 }
8620 else
8621 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008623 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008625 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008628
8629 ;
8630 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008631}
Martin v. Löwis11437992002-04-12 09:54:03 +00008632_ACEOF
8633rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634if { (ac_try="$ac_link"
8635case "(($ac_try" in
8636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8637 *) ac_try_echo=$ac_try;;
8638esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008641 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644 { (case "(($ac_try" in
8645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8646 *) ac_try_echo=$ac_try;;
8647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008650 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008652 (exit $ac_status); }; }; then
8653 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008654else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008655 echo "$as_me: program exited with status $ac_status" >&5
8656echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008657sed 's/^/| /' conftest.$ac_ext >&5
8658
Martin v. Löwis11437992002-04-12 09:54:03 +00008659( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008661 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008662See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008663echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008664See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008665 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666 else
8667 ac_cv_sizeof_void_p=0
8668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670rm -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 +00008671fi
8672rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008673fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008674{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8675echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676
8677
8678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008680#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008681_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008682
8683
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008684{ echo "$as_me:$LINENO: checking for short" >&5
8685echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8686if test "${ac_cv_type_short+set}" = set; then
8687 echo $ECHO_N "(cached) $ECHO_C" >&6
8688else
8689 cat >conftest.$ac_ext <<_ACEOF
8690/* confdefs.h. */
8691_ACEOF
8692cat confdefs.h >>conftest.$ac_ext
8693cat >>conftest.$ac_ext <<_ACEOF
8694/* end confdefs.h. */
8695$ac_includes_default
8696typedef short ac__type_new_;
8697int
8698main ()
8699{
8700if ((ac__type_new_ *) 0)
8701 return 0;
8702if (sizeof (ac__type_new_))
8703 return 0;
8704 ;
8705 return 0;
8706}
8707_ACEOF
8708rm -f conftest.$ac_objext
8709if { (ac_try="$ac_compile"
8710case "(($ac_try" in
8711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8712 *) ac_try_echo=$ac_try;;
8713esac
8714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8715 (eval "$ac_compile") 2>conftest.er1
8716 ac_status=$?
8717 grep -v '^ *+' conftest.er1 >conftest.err
8718 rm -f conftest.er1
8719 cat conftest.err >&5
8720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8721 (exit $ac_status); } && {
8722 test -z "$ac_c_werror_flag" ||
8723 test ! -s conftest.err
8724 } && test -s conftest.$ac_objext; then
8725 ac_cv_type_short=yes
8726else
8727 echo "$as_me: failed program was:" >&5
8728sed 's/^/| /' conftest.$ac_ext >&5
8729
8730 ac_cv_type_short=no
8731fi
8732
8733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8734fi
8735{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8736echo "${ECHO_T}$ac_cv_type_short" >&6; }
8737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008738# The cast to long int works around a bug in the HP C Compiler
8739# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8740# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8741# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008742{ echo "$as_me:$LINENO: checking size of short" >&5
8743echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008744if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008745 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008746else
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 if test "$cross_compiling" = yes; then
8748 # Depending upon the size, compute the lo and hi bounds.
8749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008750/* confdefs.h. */
8751_ACEOF
8752cat confdefs.h >>conftest.$ac_ext
8753cat >>conftest.$ac_ext <<_ACEOF
8754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008755$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008756 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008757int
8758main ()
8759{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008761test_array [0] = 0
8762
8763 ;
8764 return 0;
8765}
8766_ACEOF
8767rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008768if { (ac_try="$ac_compile"
8769case "(($ac_try" in
8770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8771 *) ac_try_echo=$ac_try;;
8772esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008776 grep -v '^ *+' conftest.er1 >conftest.err
8777 rm -f conftest.er1
8778 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008780 (exit $ac_status); } && {
8781 test -z "$ac_c_werror_flag" ||
8782 test ! -s conftest.err
8783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 ac_lo=0 ac_mid=0
8785 while :; do
8786 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008787/* confdefs.h. */
8788_ACEOF
8789cat confdefs.h >>conftest.$ac_ext
8790cat >>conftest.$ac_ext <<_ACEOF
8791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008792$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008793 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008794int
8795main ()
8796{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008797static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008798test_array [0] = 0
8799
8800 ;
8801 return 0;
8802}
8803_ACEOF
8804rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008805if { (ac_try="$ac_compile"
8806case "(($ac_try" in
8807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8808 *) ac_try_echo=$ac_try;;
8809esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008813 grep -v '^ *+' conftest.er1 >conftest.err
8814 rm -f conftest.er1
8815 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817 (exit $ac_status); } && {
8818 test -z "$ac_c_werror_flag" ||
8819 test ! -s conftest.err
8820 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 ac_hi=$ac_mid; break
8822else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008824sed 's/^/| /' conftest.$ac_ext >&5
8825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826 ac_lo=`expr $ac_mid + 1`
8827 if test $ac_lo -le $ac_mid; then
8828 ac_lo= ac_hi=
8829 break
8830 fi
8831 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833
8834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 done
8836else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008838sed 's/^/| /' conftest.$ac_ext >&5
8839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008841/* confdefs.h. */
8842_ACEOF
8843cat confdefs.h >>conftest.$ac_ext
8844cat >>conftest.$ac_ext <<_ACEOF
8845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008846$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008847 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008848int
8849main ()
8850{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008851static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008852test_array [0] = 0
8853
8854 ;
8855 return 0;
8856}
8857_ACEOF
8858rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008859if { (ac_try="$ac_compile"
8860case "(($ac_try" in
8861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8862 *) ac_try_echo=$ac_try;;
8863esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008865 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008867 grep -v '^ *+' conftest.er1 >conftest.err
8868 rm -f conftest.er1
8869 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871 (exit $ac_status); } && {
8872 test -z "$ac_c_werror_flag" ||
8873 test ! -s conftest.err
8874 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 ac_hi=-1 ac_mid=-1
8876 while :; do
8877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008878/* confdefs.h. */
8879_ACEOF
8880cat confdefs.h >>conftest.$ac_ext
8881cat >>conftest.$ac_ext <<_ACEOF
8882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008883$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008884 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008885int
8886main ()
8887{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008888static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008889test_array [0] = 0
8890
8891 ;
8892 return 0;
8893}
8894_ACEOF
8895rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008896if { (ac_try="$ac_compile"
8897case "(($ac_try" in
8898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8899 *) ac_try_echo=$ac_try;;
8900esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008904 grep -v '^ *+' conftest.er1 >conftest.err
8905 rm -f conftest.er1
8906 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908 (exit $ac_status); } && {
8909 test -z "$ac_c_werror_flag" ||
8910 test ! -s conftest.err
8911 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 ac_lo=$ac_mid; break
8913else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008915sed 's/^/| /' conftest.$ac_ext >&5
8916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917 ac_hi=`expr '(' $ac_mid ')' - 1`
8918 if test $ac_mid -le $ac_hi; then
8919 ac_lo= ac_hi=
8920 break
8921 fi
8922 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924
8925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 done
8927else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008929sed 's/^/| /' conftest.$ac_ext >&5
8930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008933
8934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008936
8937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008938# Binary search between lo and hi bounds.
8939while test "x$ac_lo" != "x$ac_hi"; do
8940 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008942/* confdefs.h. */
8943_ACEOF
8944cat confdefs.h >>conftest.$ac_ext
8945cat >>conftest.$ac_ext <<_ACEOF
8946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008947$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008948 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008949int
8950main ()
8951{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008952static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008953test_array [0] = 0
8954
8955 ;
8956 return 0;
8957}
8958_ACEOF
8959rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008960if { (ac_try="$ac_compile"
8961case "(($ac_try" in
8962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8963 *) ac_try_echo=$ac_try;;
8964esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008968 grep -v '^ *+' conftest.er1 >conftest.err
8969 rm -f conftest.er1
8970 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972 (exit $ac_status); } && {
8973 test -z "$ac_c_werror_flag" ||
8974 test ! -s conftest.err
8975 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 ac_hi=$ac_mid
8977else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008979sed 's/^/| /' conftest.$ac_ext >&5
8980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008981 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983
8984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008985done
8986case $ac_lo in
8987?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008989 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008990See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008991echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008992See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008993 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008994 else
8995 ac_cv_sizeof_short=0
8996 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008997esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008998else
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009000/* confdefs.h. */
9001_ACEOF
9002cat confdefs.h >>conftest.$ac_ext
9003cat >>conftest.$ac_ext <<_ACEOF
9004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009005$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009006 typedef short ac__type_sizeof_;
9007static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9008static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009009#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009010#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009011int
9012main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009013{
Martin v. Löwis11437992002-04-12 09:54:03 +00009014
9015 FILE *f = fopen ("conftest.val", "w");
9016 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009018 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009020 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009021 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009023 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 }
9025 else
9026 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009028 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009030 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009033
9034 ;
9035 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009036}
Martin v. Löwis11437992002-04-12 09:54:03 +00009037_ACEOF
9038rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009039if { (ac_try="$ac_link"
9040case "(($ac_try" in
9041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9042 *) ac_try_echo=$ac_try;;
9043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009045 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049 { (case "(($ac_try" in
9050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9051 *) ac_try_echo=$ac_try;;
9052esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009054 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 (exit $ac_status); }; }; then
9058 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009059else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009060 echo "$as_me: program exited with status $ac_status" >&5
9061echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009062sed 's/^/| /' conftest.$ac_ext >&5
9063
Martin v. Löwis11437992002-04-12 09:54:03 +00009064( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009065if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009066 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009067See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009068echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009069See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009070 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009071 else
9072 ac_cv_sizeof_short=0
9073 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009075rm -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 +00009076fi
9077rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009078fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009079{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9080echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009081
9082
9083
Martin v. Löwis11437992002-04-12 09:54:03 +00009084cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009085#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009086_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009087
9088
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009089{ echo "$as_me:$LINENO: checking for float" >&5
9090echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9091if test "${ac_cv_type_float+set}" = set; then
9092 echo $ECHO_N "(cached) $ECHO_C" >&6
9093else
9094 cat >conftest.$ac_ext <<_ACEOF
9095/* confdefs.h. */
9096_ACEOF
9097cat confdefs.h >>conftest.$ac_ext
9098cat >>conftest.$ac_ext <<_ACEOF
9099/* end confdefs.h. */
9100$ac_includes_default
9101typedef float ac__type_new_;
9102int
9103main ()
9104{
9105if ((ac__type_new_ *) 0)
9106 return 0;
9107if (sizeof (ac__type_new_))
9108 return 0;
9109 ;
9110 return 0;
9111}
9112_ACEOF
9113rm -f conftest.$ac_objext
9114if { (ac_try="$ac_compile"
9115case "(($ac_try" in
9116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9117 *) ac_try_echo=$ac_try;;
9118esac
9119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9120 (eval "$ac_compile") 2>conftest.er1
9121 ac_status=$?
9122 grep -v '^ *+' conftest.er1 >conftest.err
9123 rm -f conftest.er1
9124 cat conftest.err >&5
9125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126 (exit $ac_status); } && {
9127 test -z "$ac_c_werror_flag" ||
9128 test ! -s conftest.err
9129 } && test -s conftest.$ac_objext; then
9130 ac_cv_type_float=yes
9131else
9132 echo "$as_me: failed program was:" >&5
9133sed 's/^/| /' conftest.$ac_ext >&5
9134
9135 ac_cv_type_float=no
9136fi
9137
9138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9139fi
9140{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9141echo "${ECHO_T}$ac_cv_type_float" >&6; }
9142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009143# The cast to long int works around a bug in the HP C Compiler
9144# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9145# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9146# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009147{ echo "$as_me:$LINENO: checking size of float" >&5
9148echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009149if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009150 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009151else
Martin v. Löwis11437992002-04-12 09:54:03 +00009152 if test "$cross_compiling" = yes; then
9153 # Depending upon the size, compute the lo and hi bounds.
9154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009155/* confdefs.h. */
9156_ACEOF
9157cat confdefs.h >>conftest.$ac_ext
9158cat >>conftest.$ac_ext <<_ACEOF
9159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009160$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009161 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009162int
9163main ()
9164{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009165static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009166test_array [0] = 0
9167
9168 ;
9169 return 0;
9170}
9171_ACEOF
9172rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009173if { (ac_try="$ac_compile"
9174case "(($ac_try" in
9175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9176 *) ac_try_echo=$ac_try;;
9177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009181 grep -v '^ *+' conftest.er1 >conftest.err
9182 rm -f conftest.er1
9183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185 (exit $ac_status); } && {
9186 test -z "$ac_c_werror_flag" ||
9187 test ! -s conftest.err
9188 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 ac_lo=0 ac_mid=0
9190 while :; do
9191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009192/* confdefs.h. */
9193_ACEOF
9194cat confdefs.h >>conftest.$ac_ext
9195cat >>conftest.$ac_ext <<_ACEOF
9196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009197$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009198 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009199int
9200main ()
9201{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009202static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009203test_array [0] = 0
9204
9205 ;
9206 return 0;
9207}
9208_ACEOF
9209rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009210if { (ac_try="$ac_compile"
9211case "(($ac_try" in
9212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9213 *) ac_try_echo=$ac_try;;
9214esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009218 grep -v '^ *+' conftest.er1 >conftest.err
9219 rm -f conftest.er1
9220 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222 (exit $ac_status); } && {
9223 test -z "$ac_c_werror_flag" ||
9224 test ! -s conftest.err
9225 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 ac_hi=$ac_mid; break
9227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009229sed 's/^/| /' conftest.$ac_ext >&5
9230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009231 ac_lo=`expr $ac_mid + 1`
9232 if test $ac_lo -le $ac_mid; then
9233 ac_lo= ac_hi=
9234 break
9235 fi
9236 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238
9239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 done
9241else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009243sed 's/^/| /' conftest.$ac_ext >&5
9244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009246/* confdefs.h. */
9247_ACEOF
9248cat confdefs.h >>conftest.$ac_ext
9249cat >>conftest.$ac_ext <<_ACEOF
9250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009251$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009252 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009253int
9254main ()
9255{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009256static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009257test_array [0] = 0
9258
9259 ;
9260 return 0;
9261}
9262_ACEOF
9263rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264if { (ac_try="$ac_compile"
9265case "(($ac_try" in
9266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9267 *) ac_try_echo=$ac_try;;
9268esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009272 grep -v '^ *+' conftest.er1 >conftest.err
9273 rm -f conftest.er1
9274 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009276 (exit $ac_status); } && {
9277 test -z "$ac_c_werror_flag" ||
9278 test ! -s conftest.err
9279 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 ac_hi=-1 ac_mid=-1
9281 while :; do
9282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009283/* confdefs.h. */
9284_ACEOF
9285cat confdefs.h >>conftest.$ac_ext
9286cat >>conftest.$ac_ext <<_ACEOF
9287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009288$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009289 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009290int
9291main ()
9292{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009293static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009294test_array [0] = 0
9295
9296 ;
9297 return 0;
9298}
9299_ACEOF
9300rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009301if { (ac_try="$ac_compile"
9302case "(($ac_try" in
9303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9304 *) ac_try_echo=$ac_try;;
9305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009307 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009309 grep -v '^ *+' conftest.er1 >conftest.err
9310 rm -f conftest.er1
9311 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009313 (exit $ac_status); } && {
9314 test -z "$ac_c_werror_flag" ||
9315 test ! -s conftest.err
9316 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009317 ac_lo=$ac_mid; break
9318else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009320sed 's/^/| /' conftest.$ac_ext >&5
9321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009322 ac_hi=`expr '(' $ac_mid ')' - 1`
9323 if test $ac_mid -le $ac_hi; then
9324 ac_lo= ac_hi=
9325 break
9326 fi
9327 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329
9330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 done
9332else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009334sed 's/^/| /' conftest.$ac_ext >&5
9335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009336 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009338
9339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009341
9342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009343# Binary search between lo and hi bounds.
9344while test "x$ac_lo" != "x$ac_hi"; do
9345 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009347/* confdefs.h. */
9348_ACEOF
9349cat confdefs.h >>conftest.$ac_ext
9350cat >>conftest.$ac_ext <<_ACEOF
9351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009352$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009353 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009354int
9355main ()
9356{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009357static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009358test_array [0] = 0
9359
9360 ;
9361 return 0;
9362}
9363_ACEOF
9364rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009365if { (ac_try="$ac_compile"
9366case "(($ac_try" in
9367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9368 *) ac_try_echo=$ac_try;;
9369esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009373 grep -v '^ *+' conftest.er1 >conftest.err
9374 rm -f conftest.er1
9375 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377 (exit $ac_status); } && {
9378 test -z "$ac_c_werror_flag" ||
9379 test ! -s conftest.err
9380 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_hi=$ac_mid
9382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009384sed 's/^/| /' conftest.$ac_ext >&5
9385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009386 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009388
9389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009390done
9391case $ac_lo in
9392?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009394 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009395See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009396echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009397See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009398 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399 else
9400 ac_cv_sizeof_float=0
9401 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009402esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009403else
Martin v. Löwis11437992002-04-12 09:54:03 +00009404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009405/* confdefs.h. */
9406_ACEOF
9407cat confdefs.h >>conftest.$ac_ext
9408cat >>conftest.$ac_ext <<_ACEOF
9409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009410$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009411 typedef float ac__type_sizeof_;
9412static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9413static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009414#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009415#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009416int
9417main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009418{
Martin v. Löwis11437992002-04-12 09:54:03 +00009419
9420 FILE *f = fopen ("conftest.val", "w");
9421 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009423 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009426 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009428 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 }
9430 else
9431 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009433 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009435 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009438
9439 ;
9440 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009441}
Martin v. Löwis11437992002-04-12 09:54:03 +00009442_ACEOF
9443rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009444if { (ac_try="$ac_link"
9445case "(($ac_try" in
9446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9447 *) ac_try_echo=$ac_try;;
9448esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454 { (case "(($ac_try" in
9455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9456 *) ac_try_echo=$ac_try;;
9457esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 (exit $ac_status); }; }; then
9463 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009464else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009465 echo "$as_me: program exited with status $ac_status" >&5
9466echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009467sed 's/^/| /' conftest.$ac_ext >&5
9468
Martin v. Löwis11437992002-04-12 09:54:03 +00009469( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009471 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009472See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009473echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009474See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009475 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476 else
9477 ac_cv_sizeof_float=0
9478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480rm -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 +00009481fi
9482rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009483fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009484{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9485echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486
9487
9488
Martin v. Löwis11437992002-04-12 09:54:03 +00009489cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009490#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009491_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009492
9493
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009494{ echo "$as_me:$LINENO: checking for double" >&5
9495echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9496if test "${ac_cv_type_double+set}" = set; then
9497 echo $ECHO_N "(cached) $ECHO_C" >&6
9498else
9499 cat >conftest.$ac_ext <<_ACEOF
9500/* confdefs.h. */
9501_ACEOF
9502cat confdefs.h >>conftest.$ac_ext
9503cat >>conftest.$ac_ext <<_ACEOF
9504/* end confdefs.h. */
9505$ac_includes_default
9506typedef double ac__type_new_;
9507int
9508main ()
9509{
9510if ((ac__type_new_ *) 0)
9511 return 0;
9512if (sizeof (ac__type_new_))
9513 return 0;
9514 ;
9515 return 0;
9516}
9517_ACEOF
9518rm -f conftest.$ac_objext
9519if { (ac_try="$ac_compile"
9520case "(($ac_try" in
9521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9522 *) ac_try_echo=$ac_try;;
9523esac
9524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9525 (eval "$ac_compile") 2>conftest.er1
9526 ac_status=$?
9527 grep -v '^ *+' conftest.er1 >conftest.err
9528 rm -f conftest.er1
9529 cat conftest.err >&5
9530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9531 (exit $ac_status); } && {
9532 test -z "$ac_c_werror_flag" ||
9533 test ! -s conftest.err
9534 } && test -s conftest.$ac_objext; then
9535 ac_cv_type_double=yes
9536else
9537 echo "$as_me: failed program was:" >&5
9538sed 's/^/| /' conftest.$ac_ext >&5
9539
9540 ac_cv_type_double=no
9541fi
9542
9543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9544fi
9545{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9546echo "${ECHO_T}$ac_cv_type_double" >&6; }
9547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548# The cast to long int works around a bug in the HP C Compiler
9549# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9550# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9551# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009552{ echo "$as_me:$LINENO: checking size of double" >&5
9553echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009554if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009555 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009556else
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 if test "$cross_compiling" = yes; then
9558 # Depending upon the size, compute the lo and hi bounds.
9559cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009560/* confdefs.h. */
9561_ACEOF
9562cat confdefs.h >>conftest.$ac_ext
9563cat >>conftest.$ac_ext <<_ACEOF
9564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009565$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009566 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009567int
9568main ()
9569{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009570static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009571test_array [0] = 0
9572
9573 ;
9574 return 0;
9575}
9576_ACEOF
9577rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578if { (ac_try="$ac_compile"
9579case "(($ac_try" in
9580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9581 *) ac_try_echo=$ac_try;;
9582esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009586 grep -v '^ *+' conftest.er1 >conftest.err
9587 rm -f conftest.er1
9588 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590 (exit $ac_status); } && {
9591 test -z "$ac_c_werror_flag" ||
9592 test ! -s conftest.err
9593 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 ac_lo=0 ac_mid=0
9595 while :; do
9596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009597/* confdefs.h. */
9598_ACEOF
9599cat confdefs.h >>conftest.$ac_ext
9600cat >>conftest.$ac_ext <<_ACEOF
9601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009602$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009603 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009604int
9605main ()
9606{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009607static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009608test_array [0] = 0
9609
9610 ;
9611 return 0;
9612}
9613_ACEOF
9614rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615if { (ac_try="$ac_compile"
9616case "(($ac_try" in
9617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9618 *) ac_try_echo=$ac_try;;
9619esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009623 grep -v '^ *+' conftest.er1 >conftest.err
9624 rm -f conftest.er1
9625 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627 (exit $ac_status); } && {
9628 test -z "$ac_c_werror_flag" ||
9629 test ! -s conftest.err
9630 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ac_hi=$ac_mid; break
9632else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009634sed 's/^/| /' conftest.$ac_ext >&5
9635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636 ac_lo=`expr $ac_mid + 1`
9637 if test $ac_lo -le $ac_mid; then
9638 ac_lo= ac_hi=
9639 break
9640 fi
9641 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009643
9644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 done
9646else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009648sed 's/^/| /' conftest.$ac_ext >&5
9649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009651/* confdefs.h. */
9652_ACEOF
9653cat confdefs.h >>conftest.$ac_ext
9654cat >>conftest.$ac_ext <<_ACEOF
9655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009656$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009657 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009658int
9659main ()
9660{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009661static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009662test_array [0] = 0
9663
9664 ;
9665 return 0;
9666}
9667_ACEOF
9668rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009669if { (ac_try="$ac_compile"
9670case "(($ac_try" in
9671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9672 *) ac_try_echo=$ac_try;;
9673esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009677 grep -v '^ *+' conftest.er1 >conftest.err
9678 rm -f conftest.er1
9679 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681 (exit $ac_status); } && {
9682 test -z "$ac_c_werror_flag" ||
9683 test ! -s conftest.err
9684 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_hi=-1 ac_mid=-1
9686 while :; do
9687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009688/* confdefs.h. */
9689_ACEOF
9690cat confdefs.h >>conftest.$ac_ext
9691cat >>conftest.$ac_ext <<_ACEOF
9692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009693$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009694 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009695int
9696main ()
9697{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009698static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009699test_array [0] = 0
9700
9701 ;
9702 return 0;
9703}
9704_ACEOF
9705rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706if { (ac_try="$ac_compile"
9707case "(($ac_try" in
9708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9709 *) ac_try_echo=$ac_try;;
9710esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009712 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009714 grep -v '^ *+' conftest.er1 >conftest.err
9715 rm -f conftest.er1
9716 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718 (exit $ac_status); } && {
9719 test -z "$ac_c_werror_flag" ||
9720 test ! -s conftest.err
9721 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 ac_lo=$ac_mid; break
9723else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009725sed 's/^/| /' conftest.$ac_ext >&5
9726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727 ac_hi=`expr '(' $ac_mid ')' - 1`
9728 if test $ac_mid -le $ac_hi; then
9729 ac_lo= ac_hi=
9730 break
9731 fi
9732 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734
9735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 done
9737else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009739sed 's/^/| /' conftest.$ac_ext >&5
9740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009743
9744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009746
9747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009748# Binary search between lo and hi bounds.
9749while test "x$ac_lo" != "x$ac_hi"; do
9750 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009752/* confdefs.h. */
9753_ACEOF
9754cat confdefs.h >>conftest.$ac_ext
9755cat >>conftest.$ac_ext <<_ACEOF
9756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009757$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009758 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009759int
9760main ()
9761{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009762static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009763test_array [0] = 0
9764
9765 ;
9766 return 0;
9767}
9768_ACEOF
9769rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009770if { (ac_try="$ac_compile"
9771case "(($ac_try" in
9772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9773 *) ac_try_echo=$ac_try;;
9774esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009778 grep -v '^ *+' conftest.er1 >conftest.err
9779 rm -f conftest.er1
9780 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782 (exit $ac_status); } && {
9783 test -z "$ac_c_werror_flag" ||
9784 test ! -s conftest.err
9785 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 ac_hi=$ac_mid
9787else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009789sed 's/^/| /' conftest.$ac_ext >&5
9790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009793
9794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009795done
9796case $ac_lo in
9797?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009799 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009800See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009801echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009802See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009803 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009804 else
9805 ac_cv_sizeof_double=0
9806 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009807esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009808else
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009810/* confdefs.h. */
9811_ACEOF
9812cat confdefs.h >>conftest.$ac_ext
9813cat >>conftest.$ac_ext <<_ACEOF
9814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009815$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009816 typedef double ac__type_sizeof_;
9817static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9818static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009819#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009820#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009821int
9822main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009823{
Martin v. Löwis11437992002-04-12 09:54:03 +00009824
9825 FILE *f = fopen ("conftest.val", "w");
9826 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009828 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009831 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009833 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 }
9835 else
9836 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009838 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009840 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009843
9844 ;
9845 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009846}
Martin v. Löwis11437992002-04-12 09:54:03 +00009847_ACEOF
9848rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849if { (ac_try="$ac_link"
9850case "(($ac_try" in
9851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9852 *) ac_try_echo=$ac_try;;
9853esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859 { (case "(($ac_try" in
9860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9861 *) ac_try_echo=$ac_try;;
9862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009865 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 (exit $ac_status); }; }; then
9868 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009870 echo "$as_me: program exited with status $ac_status" >&5
9871echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009872sed 's/^/| /' conftest.$ac_ext >&5
9873
Martin v. Löwis11437992002-04-12 09:54:03 +00009874( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009876 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009877See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009878echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009879See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009880 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881 else
9882 ac_cv_sizeof_double=0
9883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885rm -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 +00009886fi
9887rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009888fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009889{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9890echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891
9892
9893
Martin v. Löwis11437992002-04-12 09:54:03 +00009894cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009895#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009896_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009897
9898
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009899{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9900echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9901if test "${ac_cv_type_fpos_t+set}" = set; then
9902 echo $ECHO_N "(cached) $ECHO_C" >&6
9903else
9904 cat >conftest.$ac_ext <<_ACEOF
9905/* confdefs.h. */
9906_ACEOF
9907cat confdefs.h >>conftest.$ac_ext
9908cat >>conftest.$ac_ext <<_ACEOF
9909/* end confdefs.h. */
9910$ac_includes_default
9911typedef fpos_t ac__type_new_;
9912int
9913main ()
9914{
9915if ((ac__type_new_ *) 0)
9916 return 0;
9917if (sizeof (ac__type_new_))
9918 return 0;
9919 ;
9920 return 0;
9921}
9922_ACEOF
9923rm -f conftest.$ac_objext
9924if { (ac_try="$ac_compile"
9925case "(($ac_try" in
9926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9927 *) ac_try_echo=$ac_try;;
9928esac
9929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9930 (eval "$ac_compile") 2>conftest.er1
9931 ac_status=$?
9932 grep -v '^ *+' conftest.er1 >conftest.err
9933 rm -f conftest.er1
9934 cat conftest.err >&5
9935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9936 (exit $ac_status); } && {
9937 test -z "$ac_c_werror_flag" ||
9938 test ! -s conftest.err
9939 } && test -s conftest.$ac_objext; then
9940 ac_cv_type_fpos_t=yes
9941else
9942 echo "$as_me: failed program was:" >&5
9943sed 's/^/| /' conftest.$ac_ext >&5
9944
9945 ac_cv_type_fpos_t=no
9946fi
9947
9948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9949fi
9950{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9951echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953# The cast to long int works around a bug in the HP C Compiler
9954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9956# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009957{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9958echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009959if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009960 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009961else
Martin v. Löwis11437992002-04-12 09:54:03 +00009962 if test "$cross_compiling" = yes; then
9963 # Depending upon the size, compute the lo and hi bounds.
9964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009965/* confdefs.h. */
9966_ACEOF
9967cat confdefs.h >>conftest.$ac_ext
9968cat >>conftest.$ac_ext <<_ACEOF
9969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009970$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009971 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009972int
9973main ()
9974{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009975static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009976test_array [0] = 0
9977
9978 ;
9979 return 0;
9980}
9981_ACEOF
9982rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009983if { (ac_try="$ac_compile"
9984case "(($ac_try" in
9985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9986 *) ac_try_echo=$ac_try;;
9987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009991 grep -v '^ *+' conftest.er1 >conftest.err
9992 rm -f conftest.er1
9993 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009995 (exit $ac_status); } && {
9996 test -z "$ac_c_werror_flag" ||
9997 test ! -s conftest.err
9998 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 ac_lo=0 ac_mid=0
10000 while :; do
10001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010002/* confdefs.h. */
10003_ACEOF
10004cat confdefs.h >>conftest.$ac_ext
10005cat >>conftest.$ac_ext <<_ACEOF
10006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010007$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010008 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010009int
10010main ()
10011{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010012static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010013test_array [0] = 0
10014
10015 ;
10016 return 0;
10017}
10018_ACEOF
10019rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010020if { (ac_try="$ac_compile"
10021case "(($ac_try" in
10022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10023 *) ac_try_echo=$ac_try;;
10024esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010028 grep -v '^ *+' conftest.er1 >conftest.err
10029 rm -f conftest.er1
10030 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032 (exit $ac_status); } && {
10033 test -z "$ac_c_werror_flag" ||
10034 test ! -s conftest.err
10035 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 ac_hi=$ac_mid; break
10037else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010039sed 's/^/| /' conftest.$ac_ext >&5
10040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010041 ac_lo=`expr $ac_mid + 1`
10042 if test $ac_lo -le $ac_mid; then
10043 ac_lo= ac_hi=
10044 break
10045 fi
10046 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048
10049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 done
10051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010053sed 's/^/| /' conftest.$ac_ext >&5
10054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010056/* confdefs.h. */
10057_ACEOF
10058cat confdefs.h >>conftest.$ac_ext
10059cat >>conftest.$ac_ext <<_ACEOF
10060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010061$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010062 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010063int
10064main ()
10065{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010066static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010067test_array [0] = 0
10068
10069 ;
10070 return 0;
10071}
10072_ACEOF
10073rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074if { (ac_try="$ac_compile"
10075case "(($ac_try" in
10076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10077 *) ac_try_echo=$ac_try;;
10078esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010082 grep -v '^ *+' conftest.er1 >conftest.err
10083 rm -f conftest.er1
10084 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010086 (exit $ac_status); } && {
10087 test -z "$ac_c_werror_flag" ||
10088 test ! -s conftest.err
10089 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 ac_hi=-1 ac_mid=-1
10091 while :; do
10092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010093/* confdefs.h. */
10094_ACEOF
10095cat confdefs.h >>conftest.$ac_ext
10096cat >>conftest.$ac_ext <<_ACEOF
10097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010098$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010099 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010100int
10101main ()
10102{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010103static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010104test_array [0] = 0
10105
10106 ;
10107 return 0;
10108}
10109_ACEOF
10110rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111if { (ac_try="$ac_compile"
10112case "(($ac_try" in
10113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10114 *) ac_try_echo=$ac_try;;
10115esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010119 grep -v '^ *+' conftest.er1 >conftest.err
10120 rm -f conftest.er1
10121 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010123 (exit $ac_status); } && {
10124 test -z "$ac_c_werror_flag" ||
10125 test ! -s conftest.err
10126 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_lo=$ac_mid; break
10128else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010130sed 's/^/| /' conftest.$ac_ext >&5
10131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132 ac_hi=`expr '(' $ac_mid ')' - 1`
10133 if test $ac_mid -le $ac_hi; then
10134 ac_lo= ac_hi=
10135 break
10136 fi
10137 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010139
10140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 done
10142else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010144sed 's/^/| /' conftest.$ac_ext >&5
10145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010148
10149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151
10152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010153# Binary search between lo and hi bounds.
10154while test "x$ac_lo" != "x$ac_hi"; do
10155 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10156 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010157/* confdefs.h. */
10158_ACEOF
10159cat confdefs.h >>conftest.$ac_ext
10160cat >>conftest.$ac_ext <<_ACEOF
10161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010162$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010163 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010164int
10165main ()
10166{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010167static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010168test_array [0] = 0
10169
10170 ;
10171 return 0;
10172}
10173_ACEOF
10174rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175if { (ac_try="$ac_compile"
10176case "(($ac_try" in
10177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10178 *) ac_try_echo=$ac_try;;
10179esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010183 grep -v '^ *+' conftest.er1 >conftest.err
10184 rm -f conftest.er1
10185 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187 (exit $ac_status); } && {
10188 test -z "$ac_c_werror_flag" ||
10189 test ! -s conftest.err
10190 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ac_hi=$ac_mid
10192else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010194sed 's/^/| /' conftest.$ac_ext >&5
10195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010196 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010198
10199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010200done
10201case $ac_lo in
10202?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010204 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010205See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010206echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010207See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010208 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010209 else
10210 ac_cv_sizeof_fpos_t=0
10211 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010212esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010213else
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* confdefs.h. */
10216_ACEOF
10217cat confdefs.h >>conftest.$ac_ext
10218cat >>conftest.$ac_ext <<_ACEOF
10219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010221 typedef fpos_t ac__type_sizeof_;
10222static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10223static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010224#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010225#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010226int
10227main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010228{
Martin v. Löwis11437992002-04-12 09:54:03 +000010229
10230 FILE *f = fopen ("conftest.val", "w");
10231 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010233 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010235 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010236 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010238 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 }
10240 else
10241 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010243 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010244 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010245 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010248
10249 ;
10250 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010251}
Martin v. Löwis11437992002-04-12 09:54:03 +000010252_ACEOF
10253rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010254if { (ac_try="$ac_link"
10255case "(($ac_try" in
10256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10257 *) ac_try_echo=$ac_try;;
10258esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264 { (case "(($ac_try" in
10265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10266 *) ac_try_echo=$ac_try;;
10267esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 (exit $ac_status); }; }; then
10273 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010274else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010275 echo "$as_me: program exited with status $ac_status" >&5
10276echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010277sed 's/^/| /' conftest.$ac_ext >&5
10278
Martin v. Löwis11437992002-04-12 09:54:03 +000010279( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010281 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010282See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010283echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010284See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010285 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286 else
10287 ac_cv_sizeof_fpos_t=0
10288 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290rm -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 +000010291fi
10292rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010293fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010294{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10295echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296
10297
10298
Martin v. Löwis11437992002-04-12 09:54:03 +000010299cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010300#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010302
Michael W. Hudson54241132001-12-07 15:38:26 +000010303
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010304{ echo "$as_me:$LINENO: checking for size_t" >&5
10305echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10306if test "${ac_cv_type_size_t+set}" = set; then
10307 echo $ECHO_N "(cached) $ECHO_C" >&6
10308else
10309 cat >conftest.$ac_ext <<_ACEOF
10310/* confdefs.h. */
10311_ACEOF
10312cat confdefs.h >>conftest.$ac_ext
10313cat >>conftest.$ac_ext <<_ACEOF
10314/* end confdefs.h. */
10315$ac_includes_default
10316typedef size_t ac__type_new_;
10317int
10318main ()
10319{
10320if ((ac__type_new_ *) 0)
10321 return 0;
10322if (sizeof (ac__type_new_))
10323 return 0;
10324 ;
10325 return 0;
10326}
10327_ACEOF
10328rm -f conftest.$ac_objext
10329if { (ac_try="$ac_compile"
10330case "(($ac_try" in
10331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10332 *) ac_try_echo=$ac_try;;
10333esac
10334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10335 (eval "$ac_compile") 2>conftest.er1
10336 ac_status=$?
10337 grep -v '^ *+' conftest.er1 >conftest.err
10338 rm -f conftest.er1
10339 cat conftest.err >&5
10340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10341 (exit $ac_status); } && {
10342 test -z "$ac_c_werror_flag" ||
10343 test ! -s conftest.err
10344 } && test -s conftest.$ac_objext; then
10345 ac_cv_type_size_t=yes
10346else
10347 echo "$as_me: failed program was:" >&5
10348sed 's/^/| /' conftest.$ac_ext >&5
10349
10350 ac_cv_type_size_t=no
10351fi
10352
10353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10354fi
10355{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10356echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010358# The cast to long int works around a bug in the HP C Compiler
10359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10361# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010362{ echo "$as_me:$LINENO: checking size of size_t" >&5
10363echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010364if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010365 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010366else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010367 if test "$cross_compiling" = yes; then
10368 # Depending upon the size, compute the lo and hi bounds.
10369cat >conftest.$ac_ext <<_ACEOF
10370/* confdefs.h. */
10371_ACEOF
10372cat confdefs.h >>conftest.$ac_ext
10373cat >>conftest.$ac_ext <<_ACEOF
10374/* end confdefs.h. */
10375$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010376 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010377int
10378main ()
10379{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010380static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010381test_array [0] = 0
10382
10383 ;
10384 return 0;
10385}
10386_ACEOF
10387rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388if { (ac_try="$ac_compile"
10389case "(($ac_try" in
10390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10391 *) ac_try_echo=$ac_try;;
10392esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010395 ac_status=$?
10396 grep -v '^ *+' conftest.er1 >conftest.err
10397 rm -f conftest.er1
10398 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400 (exit $ac_status); } && {
10401 test -z "$ac_c_werror_flag" ||
10402 test ! -s conftest.err
10403 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010404 ac_lo=0 ac_mid=0
10405 while :; do
10406 cat >conftest.$ac_ext <<_ACEOF
10407/* confdefs.h. */
10408_ACEOF
10409cat confdefs.h >>conftest.$ac_ext
10410cat >>conftest.$ac_ext <<_ACEOF
10411/* end confdefs.h. */
10412$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010413 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010414int
10415main ()
10416{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010417static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010418test_array [0] = 0
10419
10420 ;
10421 return 0;
10422}
10423_ACEOF
10424rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010425if { (ac_try="$ac_compile"
10426case "(($ac_try" in
10427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10428 *) ac_try_echo=$ac_try;;
10429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010432 ac_status=$?
10433 grep -v '^ *+' conftest.er1 >conftest.err
10434 rm -f conftest.er1
10435 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437 (exit $ac_status); } && {
10438 test -z "$ac_c_werror_flag" ||
10439 test ! -s conftest.err
10440 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010441 ac_hi=$ac_mid; break
10442else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010443 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444sed 's/^/| /' conftest.$ac_ext >&5
10445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446 ac_lo=`expr $ac_mid + 1`
10447 if test $ac_lo -le $ac_mid; then
10448 ac_lo= ac_hi=
10449 break
10450 fi
10451 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453
10454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010455 done
10456else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010457 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010458sed 's/^/| /' conftest.$ac_ext >&5
10459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010460 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010461/* confdefs.h. */
10462_ACEOF
10463cat confdefs.h >>conftest.$ac_ext
10464cat >>conftest.$ac_ext <<_ACEOF
10465/* end confdefs.h. */
10466$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010467 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010468int
10469main ()
10470{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010471static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010472test_array [0] = 0
10473
10474 ;
10475 return 0;
10476}
10477_ACEOF
10478rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010479if { (ac_try="$ac_compile"
10480case "(($ac_try" in
10481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10482 *) ac_try_echo=$ac_try;;
10483esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010486 ac_status=$?
10487 grep -v '^ *+' conftest.er1 >conftest.err
10488 rm -f conftest.er1
10489 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010491 (exit $ac_status); } && {
10492 test -z "$ac_c_werror_flag" ||
10493 test ! -s conftest.err
10494 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010495 ac_hi=-1 ac_mid=-1
10496 while :; do
10497 cat >conftest.$ac_ext <<_ACEOF
10498/* confdefs.h. */
10499_ACEOF
10500cat confdefs.h >>conftest.$ac_ext
10501cat >>conftest.$ac_ext <<_ACEOF
10502/* end confdefs.h. */
10503$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010504 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505int
10506main ()
10507{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010508static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010509test_array [0] = 0
10510
10511 ;
10512 return 0;
10513}
10514_ACEOF
10515rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010516if { (ac_try="$ac_compile"
10517case "(($ac_try" in
10518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10519 *) ac_try_echo=$ac_try;;
10520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010522 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010523 ac_status=$?
10524 grep -v '^ *+' conftest.er1 >conftest.err
10525 rm -f conftest.er1
10526 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528 (exit $ac_status); } && {
10529 test -z "$ac_c_werror_flag" ||
10530 test ! -s conftest.err
10531 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532 ac_lo=$ac_mid; break
10533else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010534 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535sed 's/^/| /' conftest.$ac_ext >&5
10536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537 ac_hi=`expr '(' $ac_mid ')' - 1`
10538 if test $ac_mid -le $ac_hi; then
10539 ac_lo= ac_hi=
10540 break
10541 fi
10542 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544
10545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010546 done
10547else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010548 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010549sed 's/^/| /' conftest.$ac_ext >&5
10550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010551 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553
10554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010556
10557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558# Binary search between lo and hi bounds.
10559while test "x$ac_lo" != "x$ac_hi"; do
10560 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10561 cat >conftest.$ac_ext <<_ACEOF
10562/* confdefs.h. */
10563_ACEOF
10564cat confdefs.h >>conftest.$ac_ext
10565cat >>conftest.$ac_ext <<_ACEOF
10566/* end confdefs.h. */
10567$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010568 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569int
10570main ()
10571{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010572static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010573test_array [0] = 0
10574
10575 ;
10576 return 0;
10577}
10578_ACEOF
10579rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010580if { (ac_try="$ac_compile"
10581case "(($ac_try" in
10582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10583 *) ac_try_echo=$ac_try;;
10584esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587 ac_status=$?
10588 grep -v '^ *+' conftest.er1 >conftest.err
10589 rm -f conftest.er1
10590 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592 (exit $ac_status); } && {
10593 test -z "$ac_c_werror_flag" ||
10594 test ! -s conftest.err
10595 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596 ac_hi=$ac_mid
10597else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010598 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599sed 's/^/| /' conftest.$ac_ext >&5
10600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010601 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010603
10604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605done
10606case $ac_lo in
10607?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010609 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010611echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010613 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010614 else
10615 ac_cv_sizeof_size_t=0
10616 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617esac
10618else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010619 cat >conftest.$ac_ext <<_ACEOF
10620/* confdefs.h. */
10621_ACEOF
10622cat confdefs.h >>conftest.$ac_ext
10623cat >>conftest.$ac_ext <<_ACEOF
10624/* end confdefs.h. */
10625$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010626 typedef size_t ac__type_sizeof_;
10627static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10628static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010629#include <stdio.h>
10630#include <stdlib.h>
10631int
10632main ()
10633{
10634
10635 FILE *f = fopen ("conftest.val", "w");
10636 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010638 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010639 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010641 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010643 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644 }
10645 else
10646 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010648 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010650 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010651 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010653
10654 ;
10655 return 0;
10656}
10657_ACEOF
10658rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659if { (ac_try="$ac_link"
10660case "(($ac_try" in
10661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10662 *) ac_try_echo=$ac_try;;
10663esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669 { (case "(($ac_try" in
10670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10671 *) ac_try_echo=$ac_try;;
10672esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010675 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677 (exit $ac_status); }; }; then
10678 ac_cv_sizeof_size_t=`cat conftest.val`
10679else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010680 echo "$as_me: program exited with status $ac_status" >&5
10681echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682sed 's/^/| /' conftest.$ac_ext >&5
10683
10684( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010686 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010688echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010689See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010690 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691 else
10692 ac_cv_sizeof_size_t=0
10693 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695rm -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 +000010696fi
10697rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010698fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010699{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10700echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701
10702
10703
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704cat >>confdefs.h <<_ACEOF
10705#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10706_ACEOF
10707
10708
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010709{ echo "$as_me:$LINENO: checking for pid_t" >&5
10710echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10711if test "${ac_cv_type_pid_t+set}" = set; then
10712 echo $ECHO_N "(cached) $ECHO_C" >&6
10713else
10714 cat >conftest.$ac_ext <<_ACEOF
10715/* confdefs.h. */
10716_ACEOF
10717cat confdefs.h >>conftest.$ac_ext
10718cat >>conftest.$ac_ext <<_ACEOF
10719/* end confdefs.h. */
10720$ac_includes_default
10721typedef pid_t ac__type_new_;
10722int
10723main ()
10724{
10725if ((ac__type_new_ *) 0)
10726 return 0;
10727if (sizeof (ac__type_new_))
10728 return 0;
10729 ;
10730 return 0;
10731}
10732_ACEOF
10733rm -f conftest.$ac_objext
10734if { (ac_try="$ac_compile"
10735case "(($ac_try" in
10736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10737 *) ac_try_echo=$ac_try;;
10738esac
10739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10740 (eval "$ac_compile") 2>conftest.er1
10741 ac_status=$?
10742 grep -v '^ *+' conftest.er1 >conftest.err
10743 rm -f conftest.er1
10744 cat conftest.err >&5
10745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746 (exit $ac_status); } && {
10747 test -z "$ac_c_werror_flag" ||
10748 test ! -s conftest.err
10749 } && test -s conftest.$ac_objext; then
10750 ac_cv_type_pid_t=yes
10751else
10752 echo "$as_me: failed program was:" >&5
10753sed 's/^/| /' conftest.$ac_ext >&5
10754
10755 ac_cv_type_pid_t=no
10756fi
10757
10758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10759fi
10760{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10761echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10762
Christian Heimes400adb02008-02-01 08:12:03 +000010763# The cast to long int works around a bug in the HP C Compiler
10764# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10765# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10766# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010767{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10768echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010769if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010770 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010771else
10772 if test "$cross_compiling" = yes; then
10773 # Depending upon the size, compute the lo and hi bounds.
10774cat >conftest.$ac_ext <<_ACEOF
10775/* confdefs.h. */
10776_ACEOF
10777cat confdefs.h >>conftest.$ac_ext
10778cat >>conftest.$ac_ext <<_ACEOF
10779/* end confdefs.h. */
10780$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010781 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010782int
10783main ()
10784{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010786test_array [0] = 0
10787
10788 ;
10789 return 0;
10790}
10791_ACEOF
10792rm -f conftest.$ac_objext
10793if { (ac_try="$ac_compile"
10794case "(($ac_try" in
10795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10796 *) ac_try_echo=$ac_try;;
10797esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010799 (eval "$ac_compile") 2>conftest.er1
10800 ac_status=$?
10801 grep -v '^ *+' conftest.er1 >conftest.err
10802 rm -f conftest.er1
10803 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010805 (exit $ac_status); } && {
10806 test -z "$ac_c_werror_flag" ||
10807 test ! -s conftest.err
10808 } && test -s conftest.$ac_objext; then
10809 ac_lo=0 ac_mid=0
10810 while :; do
10811 cat >conftest.$ac_ext <<_ACEOF
10812/* confdefs.h. */
10813_ACEOF
10814cat confdefs.h >>conftest.$ac_ext
10815cat >>conftest.$ac_ext <<_ACEOF
10816/* end confdefs.h. */
10817$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010818 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010819int
10820main ()
10821{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010823test_array [0] = 0
10824
10825 ;
10826 return 0;
10827}
10828_ACEOF
10829rm -f conftest.$ac_objext
10830if { (ac_try="$ac_compile"
10831case "(($ac_try" in
10832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10833 *) ac_try_echo=$ac_try;;
10834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010836 (eval "$ac_compile") 2>conftest.er1
10837 ac_status=$?
10838 grep -v '^ *+' conftest.er1 >conftest.err
10839 rm -f conftest.er1
10840 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010842 (exit $ac_status); } && {
10843 test -z "$ac_c_werror_flag" ||
10844 test ! -s conftest.err
10845 } && test -s conftest.$ac_objext; then
10846 ac_hi=$ac_mid; break
10847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010848 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010849sed 's/^/| /' conftest.$ac_ext >&5
10850
10851 ac_lo=`expr $ac_mid + 1`
10852 if test $ac_lo -le $ac_mid; then
10853 ac_lo= ac_hi=
10854 break
10855 fi
10856 ac_mid=`expr 2 '*' $ac_mid + 1`
10857fi
10858
10859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10860 done
10861else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010862 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010863sed 's/^/| /' conftest.$ac_ext >&5
10864
10865 cat >conftest.$ac_ext <<_ACEOF
10866/* confdefs.h. */
10867_ACEOF
10868cat confdefs.h >>conftest.$ac_ext
10869cat >>conftest.$ac_ext <<_ACEOF
10870/* end confdefs.h. */
10871$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010872 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010873int
10874main ()
10875{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010876static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010877test_array [0] = 0
10878
10879 ;
10880 return 0;
10881}
10882_ACEOF
10883rm -f conftest.$ac_objext
10884if { (ac_try="$ac_compile"
10885case "(($ac_try" in
10886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10887 *) ac_try_echo=$ac_try;;
10888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010890 (eval "$ac_compile") 2>conftest.er1
10891 ac_status=$?
10892 grep -v '^ *+' conftest.er1 >conftest.err
10893 rm -f conftest.er1
10894 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010896 (exit $ac_status); } && {
10897 test -z "$ac_c_werror_flag" ||
10898 test ! -s conftest.err
10899 } && test -s conftest.$ac_objext; then
10900 ac_hi=-1 ac_mid=-1
10901 while :; do
10902 cat >conftest.$ac_ext <<_ACEOF
10903/* confdefs.h. */
10904_ACEOF
10905cat confdefs.h >>conftest.$ac_ext
10906cat >>conftest.$ac_ext <<_ACEOF
10907/* end confdefs.h. */
10908$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010909 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010910int
10911main ()
10912{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010913static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010914test_array [0] = 0
10915
10916 ;
10917 return 0;
10918}
10919_ACEOF
10920rm -f conftest.$ac_objext
10921if { (ac_try="$ac_compile"
10922case "(($ac_try" in
10923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10924 *) ac_try_echo=$ac_try;;
10925esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010927 (eval "$ac_compile") 2>conftest.er1
10928 ac_status=$?
10929 grep -v '^ *+' conftest.er1 >conftest.err
10930 rm -f conftest.er1
10931 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010933 (exit $ac_status); } && {
10934 test -z "$ac_c_werror_flag" ||
10935 test ! -s conftest.err
10936 } && test -s conftest.$ac_objext; then
10937 ac_lo=$ac_mid; break
10938else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010939 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010940sed 's/^/| /' conftest.$ac_ext >&5
10941
10942 ac_hi=`expr '(' $ac_mid ')' - 1`
10943 if test $ac_mid -le $ac_hi; then
10944 ac_lo= ac_hi=
10945 break
10946 fi
10947 ac_mid=`expr 2 '*' $ac_mid`
10948fi
10949
10950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10951 done
10952else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010953 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010954sed 's/^/| /' conftest.$ac_ext >&5
10955
10956 ac_lo= ac_hi=
10957fi
10958
10959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10960fi
10961
10962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10963# Binary search between lo and hi bounds.
10964while test "x$ac_lo" != "x$ac_hi"; do
10965 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10966 cat >conftest.$ac_ext <<_ACEOF
10967/* confdefs.h. */
10968_ACEOF
10969cat confdefs.h >>conftest.$ac_ext
10970cat >>conftest.$ac_ext <<_ACEOF
10971/* end confdefs.h. */
10972$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010973 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010974int
10975main ()
10976{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010977static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010978test_array [0] = 0
10979
10980 ;
10981 return 0;
10982}
10983_ACEOF
10984rm -f conftest.$ac_objext
10985if { (ac_try="$ac_compile"
10986case "(($ac_try" in
10987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10988 *) ac_try_echo=$ac_try;;
10989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010991 (eval "$ac_compile") 2>conftest.er1
10992 ac_status=$?
10993 grep -v '^ *+' conftest.er1 >conftest.err
10994 rm -f conftest.er1
10995 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010997 (exit $ac_status); } && {
10998 test -z "$ac_c_werror_flag" ||
10999 test ! -s conftest.err
11000 } && test -s conftest.$ac_objext; then
11001 ac_hi=$ac_mid
11002else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011003 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011004sed 's/^/| /' conftest.$ac_ext >&5
11005
11006 ac_lo=`expr '(' $ac_mid ')' + 1`
11007fi
11008
11009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11010done
11011case $ac_lo in
11012?*) ac_cv_sizeof_pid_t=$ac_lo;;
11013'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011014 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011015See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011016echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011017See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011018 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011019 else
11020 ac_cv_sizeof_pid_t=0
11021 fi ;;
11022esac
11023else
11024 cat >conftest.$ac_ext <<_ACEOF
11025/* confdefs.h. */
11026_ACEOF
11027cat confdefs.h >>conftest.$ac_ext
11028cat >>conftest.$ac_ext <<_ACEOF
11029/* end confdefs.h. */
11030$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011031 typedef pid_t ac__type_sizeof_;
11032static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11033static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011034#include <stdio.h>
11035#include <stdlib.h>
11036int
11037main ()
11038{
11039
11040 FILE *f = fopen ("conftest.val", "w");
11041 if (! f)
11042 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011043 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011044 {
11045 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011046 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011047 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011048 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011049 }
11050 else
11051 {
11052 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011053 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011054 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011055 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011056 }
11057 return ferror (f) || fclose (f) != 0;
11058
11059 ;
11060 return 0;
11061}
11062_ACEOF
11063rm -f conftest$ac_exeext
11064if { (ac_try="$ac_link"
11065case "(($ac_try" in
11066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11067 *) ac_try_echo=$ac_try;;
11068esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011070 (eval "$ac_link") 2>&5
11071 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11074 { (case "(($ac_try" in
11075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11076 *) ac_try_echo=$ac_try;;
11077esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011079 (eval "$ac_try") 2>&5
11080 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011082 (exit $ac_status); }; }; then
11083 ac_cv_sizeof_pid_t=`cat conftest.val`
11084else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011085 echo "$as_me: program exited with status $ac_status" >&5
11086echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011087sed 's/^/| /' conftest.$ac_ext >&5
11088
11089( exit $ac_status )
11090if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011091 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011092See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011093echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011094See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011095 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011096 else
11097 ac_cv_sizeof_pid_t=0
11098 fi
11099fi
11100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11101fi
11102rm -f conftest.val
11103fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011104{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11105echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011106
11107
11108
11109cat >>confdefs.h <<_ACEOF
11110#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11111_ACEOF
11112
11113
Michael W. Hudson54241132001-12-07 15:38:26 +000011114
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011115{ echo "$as_me:$LINENO: checking for long long support" >&5
11116echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011117have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011119/* confdefs.h. */
11120_ACEOF
11121cat confdefs.h >>conftest.$ac_ext
11122cat >>conftest.$ac_ext <<_ACEOF
11123/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011124
Martin v. Löwis11437992002-04-12 09:54:03 +000011125int
11126main ()
11127{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011128long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 ;
11130 return 0;
11131}
11132_ACEOF
11133rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134if { (ac_try="$ac_compile"
11135case "(($ac_try" in
11136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11137 *) ac_try_echo=$ac_try;;
11138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011142 grep -v '^ *+' conftest.er1 >conftest.err
11143 rm -f conftest.er1
11144 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146 (exit $ac_status); } && {
11147 test -z "$ac_c_werror_flag" ||
11148 test ! -s conftest.err
11149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011150
11151
11152cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011153#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011154_ACEOF
11155
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011156 have_long_long=yes
11157
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011160sed 's/^/| /' conftest.$ac_ext >&5
11161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164
11165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011166{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11167echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011168if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011169{ echo "$as_me:$LINENO: checking for long long" >&5
11170echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11171if test "${ac_cv_type_long_long+set}" = set; then
11172 echo $ECHO_N "(cached) $ECHO_C" >&6
11173else
11174 cat >conftest.$ac_ext <<_ACEOF
11175/* confdefs.h. */
11176_ACEOF
11177cat confdefs.h >>conftest.$ac_ext
11178cat >>conftest.$ac_ext <<_ACEOF
11179/* end confdefs.h. */
11180$ac_includes_default
11181typedef long long ac__type_new_;
11182int
11183main ()
11184{
11185if ((ac__type_new_ *) 0)
11186 return 0;
11187if (sizeof (ac__type_new_))
11188 return 0;
11189 ;
11190 return 0;
11191}
11192_ACEOF
11193rm -f conftest.$ac_objext
11194if { (ac_try="$ac_compile"
11195case "(($ac_try" in
11196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11197 *) ac_try_echo=$ac_try;;
11198esac
11199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11200 (eval "$ac_compile") 2>conftest.er1
11201 ac_status=$?
11202 grep -v '^ *+' conftest.er1 >conftest.err
11203 rm -f conftest.er1
11204 cat conftest.err >&5
11205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11206 (exit $ac_status); } && {
11207 test -z "$ac_c_werror_flag" ||
11208 test ! -s conftest.err
11209 } && test -s conftest.$ac_objext; then
11210 ac_cv_type_long_long=yes
11211else
11212 echo "$as_me: failed program was:" >&5
11213sed 's/^/| /' conftest.$ac_ext >&5
11214
11215 ac_cv_type_long_long=no
11216fi
11217
11218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11219fi
11220{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11221echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223# The cast to long int works around a bug in the HP C Compiler
11224# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11225# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11226# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011227{ echo "$as_me:$LINENO: checking size of long long" >&5
11228echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011229if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011230 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011231else
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 if test "$cross_compiling" = yes; then
11233 # Depending upon the size, compute the lo and hi bounds.
11234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011235/* confdefs.h. */
11236_ACEOF
11237cat confdefs.h >>conftest.$ac_ext
11238cat >>conftest.$ac_ext <<_ACEOF
11239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011240$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011241 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011242int
11243main ()
11244{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011245static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011246test_array [0] = 0
11247
11248 ;
11249 return 0;
11250}
11251_ACEOF
11252rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011253if { (ac_try="$ac_compile"
11254case "(($ac_try" in
11255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11256 *) ac_try_echo=$ac_try;;
11257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011261 grep -v '^ *+' conftest.er1 >conftest.err
11262 rm -f conftest.er1
11263 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011265 (exit $ac_status); } && {
11266 test -z "$ac_c_werror_flag" ||
11267 test ! -s conftest.err
11268 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 ac_lo=0 ac_mid=0
11270 while :; do
11271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011272/* confdefs.h. */
11273_ACEOF
11274cat confdefs.h >>conftest.$ac_ext
11275cat >>conftest.$ac_ext <<_ACEOF
11276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011277$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011278 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011279int
11280main ()
11281{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011282static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011283test_array [0] = 0
11284
11285 ;
11286 return 0;
11287}
11288_ACEOF
11289rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011290if { (ac_try="$ac_compile"
11291case "(($ac_try" in
11292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11293 *) ac_try_echo=$ac_try;;
11294esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011298 grep -v '^ *+' conftest.er1 >conftest.err
11299 rm -f conftest.er1
11300 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011302 (exit $ac_status); } && {
11303 test -z "$ac_c_werror_flag" ||
11304 test ! -s conftest.err
11305 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 ac_hi=$ac_mid; break
11307else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011309sed 's/^/| /' conftest.$ac_ext >&5
11310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011311 ac_lo=`expr $ac_mid + 1`
11312 if test $ac_lo -le $ac_mid; then
11313 ac_lo= ac_hi=
11314 break
11315 fi
11316 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318
11319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 done
11321else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011323sed 's/^/| /' conftest.$ac_ext >&5
11324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011325 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011326/* confdefs.h. */
11327_ACEOF
11328cat confdefs.h >>conftest.$ac_ext
11329cat >>conftest.$ac_ext <<_ACEOF
11330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011331$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011332 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011333int
11334main ()
11335{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011336static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011337test_array [0] = 0
11338
11339 ;
11340 return 0;
11341}
11342_ACEOF
11343rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011344if { (ac_try="$ac_compile"
11345case "(($ac_try" in
11346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11347 *) ac_try_echo=$ac_try;;
11348esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011352 grep -v '^ *+' conftest.er1 >conftest.err
11353 rm -f conftest.er1
11354 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011356 (exit $ac_status); } && {
11357 test -z "$ac_c_werror_flag" ||
11358 test ! -s conftest.err
11359 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 ac_hi=-1 ac_mid=-1
11361 while :; do
11362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011363/* confdefs.h. */
11364_ACEOF
11365cat confdefs.h >>conftest.$ac_ext
11366cat >>conftest.$ac_ext <<_ACEOF
11367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011368$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011369 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011370int
11371main ()
11372{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011374test_array [0] = 0
11375
11376 ;
11377 return 0;
11378}
11379_ACEOF
11380rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011381if { (ac_try="$ac_compile"
11382case "(($ac_try" in
11383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11384 *) ac_try_echo=$ac_try;;
11385esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011389 grep -v '^ *+' conftest.er1 >conftest.err
11390 rm -f conftest.er1
11391 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393 (exit $ac_status); } && {
11394 test -z "$ac_c_werror_flag" ||
11395 test ! -s conftest.err
11396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ac_lo=$ac_mid; break
11398else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011400sed 's/^/| /' conftest.$ac_ext >&5
11401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402 ac_hi=`expr '(' $ac_mid ')' - 1`
11403 if test $ac_mid -le $ac_hi; then
11404 ac_lo= ac_hi=
11405 break
11406 fi
11407 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409
11410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 done
11412else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011414sed 's/^/| /' conftest.$ac_ext >&5
11415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011418
11419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011421
11422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011423# Binary search between lo and hi bounds.
11424while test "x$ac_lo" != "x$ac_hi"; do
11425 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11426 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011427/* confdefs.h. */
11428_ACEOF
11429cat confdefs.h >>conftest.$ac_ext
11430cat >>conftest.$ac_ext <<_ACEOF
11431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011432$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011433 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011434int
11435main ()
11436{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011437static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011438test_array [0] = 0
11439
11440 ;
11441 return 0;
11442}
11443_ACEOF
11444rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445if { (ac_try="$ac_compile"
11446case "(($ac_try" in
11447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11448 *) ac_try_echo=$ac_try;;
11449esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011453 grep -v '^ *+' conftest.er1 >conftest.err
11454 rm -f conftest.er1
11455 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457 (exit $ac_status); } && {
11458 test -z "$ac_c_werror_flag" ||
11459 test ! -s conftest.err
11460 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 ac_hi=$ac_mid
11462else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011464sed 's/^/| /' conftest.$ac_ext >&5
11465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468
11469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011470done
11471case $ac_lo in
11472?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011474 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011475See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011476echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011477See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011478 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011479 else
11480 ac_cv_sizeof_long_long=0
11481 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011482esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011483else
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011485/* confdefs.h. */
11486_ACEOF
11487cat confdefs.h >>conftest.$ac_ext
11488cat >>conftest.$ac_ext <<_ACEOF
11489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011490$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011491 typedef long long ac__type_sizeof_;
11492static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11493static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011494#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011495#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011496int
11497main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011498{
Martin v. Löwis11437992002-04-12 09:54:03 +000011499
11500 FILE *f = fopen ("conftest.val", "w");
11501 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011503 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011504 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011506 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011508 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 }
11510 else
11511 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011513 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011515 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011518
11519 ;
11520 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011521}
Martin v. Löwis11437992002-04-12 09:54:03 +000011522_ACEOF
11523rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524if { (ac_try="$ac_link"
11525case "(($ac_try" in
11526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11527 *) ac_try_echo=$ac_try;;
11528esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534 { (case "(($ac_try" in
11535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11536 *) ac_try_echo=$ac_try;;
11537esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 (exit $ac_status); }; }; then
11543 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011544else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011545 echo "$as_me: program exited with status $ac_status" >&5
11546echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011547sed 's/^/| /' conftest.$ac_ext >&5
11548
Martin v. Löwis11437992002-04-12 09:54:03 +000011549( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011551 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011552See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011553echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011554See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011555 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556 else
11557 ac_cv_sizeof_long_long=0
11558 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560rm -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 +000011561fi
11562rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011563fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011564{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11565echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011566
11567
11568
Martin v. Löwis11437992002-04-12 09:54:03 +000011569cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011570#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011571_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011572
Michael W. Hudson54241132001-12-07 15:38:26 +000011573
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011574fi
11575
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011576{ echo "$as_me:$LINENO: checking for long double support" >&5
11577echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011578have_long_double=no
11579cat >conftest.$ac_ext <<_ACEOF
11580/* confdefs.h. */
11581_ACEOF
11582cat confdefs.h >>conftest.$ac_ext
11583cat >>conftest.$ac_ext <<_ACEOF
11584/* end confdefs.h. */
11585
11586int
11587main ()
11588{
11589long double x; x = (long double)0;
11590 ;
11591 return 0;
11592}
11593_ACEOF
11594rm -f conftest.$ac_objext
11595if { (ac_try="$ac_compile"
11596case "(($ac_try" in
11597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11598 *) ac_try_echo=$ac_try;;
11599esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011601 (eval "$ac_compile") 2>conftest.er1
11602 ac_status=$?
11603 grep -v '^ *+' conftest.er1 >conftest.err
11604 rm -f conftest.er1
11605 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011607 (exit $ac_status); } && {
11608 test -z "$ac_c_werror_flag" ||
11609 test ! -s conftest.err
11610 } && test -s conftest.$ac_objext; then
11611
11612
11613cat >>confdefs.h <<\_ACEOF
11614#define HAVE_LONG_DOUBLE 1
11615_ACEOF
11616
11617 have_long_double=yes
11618
11619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011620 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011621sed 's/^/| /' conftest.$ac_ext >&5
11622
11623
11624fi
11625
11626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011627{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11628echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011629if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011630{ echo "$as_me:$LINENO: checking for long double" >&5
11631echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11632if test "${ac_cv_type_long_double+set}" = set; then
11633 echo $ECHO_N "(cached) $ECHO_C" >&6
11634else
11635 cat >conftest.$ac_ext <<_ACEOF
11636/* confdefs.h. */
11637_ACEOF
11638cat confdefs.h >>conftest.$ac_ext
11639cat >>conftest.$ac_ext <<_ACEOF
11640/* end confdefs.h. */
11641$ac_includes_default
11642typedef long double ac__type_new_;
11643int
11644main ()
11645{
11646if ((ac__type_new_ *) 0)
11647 return 0;
11648if (sizeof (ac__type_new_))
11649 return 0;
11650 ;
11651 return 0;
11652}
11653_ACEOF
11654rm -f conftest.$ac_objext
11655if { (ac_try="$ac_compile"
11656case "(($ac_try" in
11657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11658 *) ac_try_echo=$ac_try;;
11659esac
11660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11661 (eval "$ac_compile") 2>conftest.er1
11662 ac_status=$?
11663 grep -v '^ *+' conftest.er1 >conftest.err
11664 rm -f conftest.er1
11665 cat conftest.err >&5
11666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11667 (exit $ac_status); } && {
11668 test -z "$ac_c_werror_flag" ||
11669 test ! -s conftest.err
11670 } && test -s conftest.$ac_objext; then
11671 ac_cv_type_long_double=yes
11672else
11673 echo "$as_me: failed program was:" >&5
11674sed 's/^/| /' conftest.$ac_ext >&5
11675
11676 ac_cv_type_long_double=no
11677fi
11678
11679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11680fi
11681{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11682echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11683
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011684# The cast to long int works around a bug in the HP C Compiler
11685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11687# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011688{ echo "$as_me:$LINENO: checking size of long double" >&5
11689echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011690if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011691 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011692else
11693 if test "$cross_compiling" = yes; then
11694 # Depending upon the size, compute the lo and hi bounds.
11695cat >conftest.$ac_ext <<_ACEOF
11696/* confdefs.h. */
11697_ACEOF
11698cat confdefs.h >>conftest.$ac_ext
11699cat >>conftest.$ac_ext <<_ACEOF
11700/* end confdefs.h. */
11701$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011702 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011703int
11704main ()
11705{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011706static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011707test_array [0] = 0
11708
11709 ;
11710 return 0;
11711}
11712_ACEOF
11713rm -f conftest.$ac_objext
11714if { (ac_try="$ac_compile"
11715case "(($ac_try" in
11716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11717 *) ac_try_echo=$ac_try;;
11718esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011720 (eval "$ac_compile") 2>conftest.er1
11721 ac_status=$?
11722 grep -v '^ *+' conftest.er1 >conftest.err
11723 rm -f conftest.er1
11724 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011726 (exit $ac_status); } && {
11727 test -z "$ac_c_werror_flag" ||
11728 test ! -s conftest.err
11729 } && test -s conftest.$ac_objext; then
11730 ac_lo=0 ac_mid=0
11731 while :; do
11732 cat >conftest.$ac_ext <<_ACEOF
11733/* confdefs.h. */
11734_ACEOF
11735cat confdefs.h >>conftest.$ac_ext
11736cat >>conftest.$ac_ext <<_ACEOF
11737/* end confdefs.h. */
11738$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011739 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011740int
11741main ()
11742{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011743static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011744test_array [0] = 0
11745
11746 ;
11747 return 0;
11748}
11749_ACEOF
11750rm -f conftest.$ac_objext
11751if { (ac_try="$ac_compile"
11752case "(($ac_try" in
11753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11754 *) ac_try_echo=$ac_try;;
11755esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011757 (eval "$ac_compile") 2>conftest.er1
11758 ac_status=$?
11759 grep -v '^ *+' conftest.er1 >conftest.err
11760 rm -f conftest.er1
11761 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011763 (exit $ac_status); } && {
11764 test -z "$ac_c_werror_flag" ||
11765 test ! -s conftest.err
11766 } && test -s conftest.$ac_objext; then
11767 ac_hi=$ac_mid; break
11768else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011769 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011770sed 's/^/| /' conftest.$ac_ext >&5
11771
11772 ac_lo=`expr $ac_mid + 1`
11773 if test $ac_lo -le $ac_mid; then
11774 ac_lo= ac_hi=
11775 break
11776 fi
11777 ac_mid=`expr 2 '*' $ac_mid + 1`
11778fi
11779
11780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11781 done
11782else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011783 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011784sed 's/^/| /' conftest.$ac_ext >&5
11785
11786 cat >conftest.$ac_ext <<_ACEOF
11787/* confdefs.h. */
11788_ACEOF
11789cat confdefs.h >>conftest.$ac_ext
11790cat >>conftest.$ac_ext <<_ACEOF
11791/* end confdefs.h. */
11792$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011793 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011794int
11795main ()
11796{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011797static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011798test_array [0] = 0
11799
11800 ;
11801 return 0;
11802}
11803_ACEOF
11804rm -f conftest.$ac_objext
11805if { (ac_try="$ac_compile"
11806case "(($ac_try" in
11807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11808 *) ac_try_echo=$ac_try;;
11809esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011811 (eval "$ac_compile") 2>conftest.er1
11812 ac_status=$?
11813 grep -v '^ *+' conftest.er1 >conftest.err
11814 rm -f conftest.er1
11815 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011817 (exit $ac_status); } && {
11818 test -z "$ac_c_werror_flag" ||
11819 test ! -s conftest.err
11820 } && test -s conftest.$ac_objext; then
11821 ac_hi=-1 ac_mid=-1
11822 while :; do
11823 cat >conftest.$ac_ext <<_ACEOF
11824/* confdefs.h. */
11825_ACEOF
11826cat confdefs.h >>conftest.$ac_ext
11827cat >>conftest.$ac_ext <<_ACEOF
11828/* end confdefs.h. */
11829$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011830 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011831int
11832main ()
11833{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011835test_array [0] = 0
11836
11837 ;
11838 return 0;
11839}
11840_ACEOF
11841rm -f conftest.$ac_objext
11842if { (ac_try="$ac_compile"
11843case "(($ac_try" in
11844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11845 *) ac_try_echo=$ac_try;;
11846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011848 (eval "$ac_compile") 2>conftest.er1
11849 ac_status=$?
11850 grep -v '^ *+' conftest.er1 >conftest.err
11851 rm -f conftest.er1
11852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011854 (exit $ac_status); } && {
11855 test -z "$ac_c_werror_flag" ||
11856 test ! -s conftest.err
11857 } && test -s conftest.$ac_objext; then
11858 ac_lo=$ac_mid; break
11859else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011860 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011861sed 's/^/| /' conftest.$ac_ext >&5
11862
11863 ac_hi=`expr '(' $ac_mid ')' - 1`
11864 if test $ac_mid -le $ac_hi; then
11865 ac_lo= ac_hi=
11866 break
11867 fi
11868 ac_mid=`expr 2 '*' $ac_mid`
11869fi
11870
11871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11872 done
11873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011874 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011875sed 's/^/| /' conftest.$ac_ext >&5
11876
11877 ac_lo= ac_hi=
11878fi
11879
11880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11881fi
11882
11883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11884# Binary search between lo and hi bounds.
11885while test "x$ac_lo" != "x$ac_hi"; do
11886 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11887 cat >conftest.$ac_ext <<_ACEOF
11888/* confdefs.h. */
11889_ACEOF
11890cat confdefs.h >>conftest.$ac_ext
11891cat >>conftest.$ac_ext <<_ACEOF
11892/* end confdefs.h. */
11893$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011894 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011895int
11896main ()
11897{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011898static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011899test_array [0] = 0
11900
11901 ;
11902 return 0;
11903}
11904_ACEOF
11905rm -f conftest.$ac_objext
11906if { (ac_try="$ac_compile"
11907case "(($ac_try" in
11908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11909 *) ac_try_echo=$ac_try;;
11910esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011912 (eval "$ac_compile") 2>conftest.er1
11913 ac_status=$?
11914 grep -v '^ *+' conftest.er1 >conftest.err
11915 rm -f conftest.er1
11916 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011918 (exit $ac_status); } && {
11919 test -z "$ac_c_werror_flag" ||
11920 test ! -s conftest.err
11921 } && test -s conftest.$ac_objext; then
11922 ac_hi=$ac_mid
11923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011924 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011925sed 's/^/| /' conftest.$ac_ext >&5
11926
11927 ac_lo=`expr '(' $ac_mid ')' + 1`
11928fi
11929
11930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11931done
11932case $ac_lo in
11933?*) ac_cv_sizeof_long_double=$ac_lo;;
11934'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011935 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011936See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011937echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011938See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011939 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011940 else
11941 ac_cv_sizeof_long_double=0
11942 fi ;;
11943esac
11944else
11945 cat >conftest.$ac_ext <<_ACEOF
11946/* confdefs.h. */
11947_ACEOF
11948cat confdefs.h >>conftest.$ac_ext
11949cat >>conftest.$ac_ext <<_ACEOF
11950/* end confdefs.h. */
11951$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011952 typedef long double ac__type_sizeof_;
11953static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11954static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011955#include <stdio.h>
11956#include <stdlib.h>
11957int
11958main ()
11959{
11960
11961 FILE *f = fopen ("conftest.val", "w");
11962 if (! f)
11963 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011964 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011965 {
11966 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011967 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011968 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011969 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011970 }
11971 else
11972 {
11973 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011974 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011975 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011976 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011977 }
11978 return ferror (f) || fclose (f) != 0;
11979
11980 ;
11981 return 0;
11982}
11983_ACEOF
11984rm -f conftest$ac_exeext
11985if { (ac_try="$ac_link"
11986case "(($ac_try" in
11987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11988 *) ac_try_echo=$ac_try;;
11989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991 (eval "$ac_link") 2>&5
11992 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011994 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11995 { (case "(($ac_try" in
11996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11997 *) ac_try_echo=$ac_try;;
11998esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012000 (eval "$ac_try") 2>&5
12001 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012003 (exit $ac_status); }; }; then
12004 ac_cv_sizeof_long_double=`cat conftest.val`
12005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012006 echo "$as_me: program exited with status $ac_status" >&5
12007echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008sed 's/^/| /' conftest.$ac_ext >&5
12009
12010( exit $ac_status )
12011if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012012 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012013See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012014echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012015See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012016 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012017 else
12018 ac_cv_sizeof_long_double=0
12019 fi
12020fi
12021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12022fi
12023rm -f conftest.val
12024fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012025{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12026echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012027
12028
12029
12030cat >>confdefs.h <<_ACEOF
12031#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12032_ACEOF
12033
12034
12035fi
12036
12037
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012038{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12039echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012040have_c99_bool=no
12041cat >conftest.$ac_ext <<_ACEOF
12042/* confdefs.h. */
12043_ACEOF
12044cat confdefs.h >>conftest.$ac_ext
12045cat >>conftest.$ac_ext <<_ACEOF
12046/* end confdefs.h. */
12047
12048int
12049main ()
12050{
12051_Bool x; x = (_Bool)0;
12052 ;
12053 return 0;
12054}
12055_ACEOF
12056rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012057if { (ac_try="$ac_compile"
12058case "(($ac_try" in
12059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12060 *) ac_try_echo=$ac_try;;
12061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012063 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012064 ac_status=$?
12065 grep -v '^ *+' conftest.er1 >conftest.err
12066 rm -f conftest.er1
12067 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069 (exit $ac_status); } && {
12070 test -z "$ac_c_werror_flag" ||
12071 test ! -s conftest.err
12072 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012073
12074
12075cat >>confdefs.h <<\_ACEOF
12076#define HAVE_C99_BOOL 1
12077_ACEOF
12078
12079 have_c99_bool=yes
12080
12081else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012082 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012083sed 's/^/| /' conftest.$ac_ext >&5
12084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085
Thomas Woutersb2137042007-02-01 18:02:27 +000012086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087
12088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012089{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12090echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012091if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012092{ echo "$as_me:$LINENO: checking for _Bool" >&5
12093echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12094if test "${ac_cv_type__Bool+set}" = set; then
12095 echo $ECHO_N "(cached) $ECHO_C" >&6
12096else
12097 cat >conftest.$ac_ext <<_ACEOF
12098/* confdefs.h. */
12099_ACEOF
12100cat confdefs.h >>conftest.$ac_ext
12101cat >>conftest.$ac_ext <<_ACEOF
12102/* end confdefs.h. */
12103$ac_includes_default
12104typedef _Bool ac__type_new_;
12105int
12106main ()
12107{
12108if ((ac__type_new_ *) 0)
12109 return 0;
12110if (sizeof (ac__type_new_))
12111 return 0;
12112 ;
12113 return 0;
12114}
12115_ACEOF
12116rm -f conftest.$ac_objext
12117if { (ac_try="$ac_compile"
12118case "(($ac_try" in
12119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12120 *) ac_try_echo=$ac_try;;
12121esac
12122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12123 (eval "$ac_compile") 2>conftest.er1
12124 ac_status=$?
12125 grep -v '^ *+' conftest.er1 >conftest.err
12126 rm -f conftest.er1
12127 cat conftest.err >&5
12128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12129 (exit $ac_status); } && {
12130 test -z "$ac_c_werror_flag" ||
12131 test ! -s conftest.err
12132 } && test -s conftest.$ac_objext; then
12133 ac_cv_type__Bool=yes
12134else
12135 echo "$as_me: failed program was:" >&5
12136sed 's/^/| /' conftest.$ac_ext >&5
12137
12138 ac_cv_type__Bool=no
12139fi
12140
12141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12142fi
12143{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12144echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012146# The cast to long int works around a bug in the HP C Compiler
12147# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12148# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12149# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012150{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12151echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012152if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012153 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012154else
12155 if test "$cross_compiling" = yes; then
12156 # Depending upon the size, compute the lo and hi bounds.
12157cat >conftest.$ac_ext <<_ACEOF
12158/* confdefs.h. */
12159_ACEOF
12160cat confdefs.h >>conftest.$ac_ext
12161cat >>conftest.$ac_ext <<_ACEOF
12162/* end confdefs.h. */
12163$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012164 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012165int
12166main ()
12167{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012168static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012169test_array [0] = 0
12170
12171 ;
12172 return 0;
12173}
12174_ACEOF
12175rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176if { (ac_try="$ac_compile"
12177case "(($ac_try" in
12178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12179 *) ac_try_echo=$ac_try;;
12180esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012183 ac_status=$?
12184 grep -v '^ *+' conftest.er1 >conftest.err
12185 rm -f conftest.er1
12186 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188 (exit $ac_status); } && {
12189 test -z "$ac_c_werror_flag" ||
12190 test ! -s conftest.err
12191 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012192 ac_lo=0 ac_mid=0
12193 while :; do
12194 cat >conftest.$ac_ext <<_ACEOF
12195/* confdefs.h. */
12196_ACEOF
12197cat confdefs.h >>conftest.$ac_ext
12198cat >>conftest.$ac_ext <<_ACEOF
12199/* end confdefs.h. */
12200$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012201 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012202int
12203main ()
12204{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012205static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012206test_array [0] = 0
12207
12208 ;
12209 return 0;
12210}
12211_ACEOF
12212rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012213if { (ac_try="$ac_compile"
12214case "(($ac_try" in
12215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12216 *) ac_try_echo=$ac_try;;
12217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012219 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012220 ac_status=$?
12221 grep -v '^ *+' conftest.er1 >conftest.err
12222 rm -f conftest.er1
12223 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225 (exit $ac_status); } && {
12226 test -z "$ac_c_werror_flag" ||
12227 test ! -s conftest.err
12228 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012229 ac_hi=$ac_mid; break
12230else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012231 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012232sed 's/^/| /' conftest.$ac_ext >&5
12233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012234 ac_lo=`expr $ac_mid + 1`
12235 if test $ac_lo -le $ac_mid; then
12236 ac_lo= ac_hi=
12237 break
12238 fi
12239 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241
12242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012243 done
12244else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012245 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012246sed 's/^/| /' conftest.$ac_ext >&5
12247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012248 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012249/* confdefs.h. */
12250_ACEOF
12251cat confdefs.h >>conftest.$ac_ext
12252cat >>conftest.$ac_ext <<_ACEOF
12253/* end confdefs.h. */
12254$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012255 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012256int
12257main ()
12258{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012259static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012260test_array [0] = 0
12261
12262 ;
12263 return 0;
12264}
12265_ACEOF
12266rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267if { (ac_try="$ac_compile"
12268case "(($ac_try" in
12269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12270 *) ac_try_echo=$ac_try;;
12271esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012274 ac_status=$?
12275 grep -v '^ *+' conftest.er1 >conftest.err
12276 rm -f conftest.er1
12277 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012279 (exit $ac_status); } && {
12280 test -z "$ac_c_werror_flag" ||
12281 test ! -s conftest.err
12282 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012283 ac_hi=-1 ac_mid=-1
12284 while :; do
12285 cat >conftest.$ac_ext <<_ACEOF
12286/* confdefs.h. */
12287_ACEOF
12288cat confdefs.h >>conftest.$ac_ext
12289cat >>conftest.$ac_ext <<_ACEOF
12290/* end confdefs.h. */
12291$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012292 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012293int
12294main ()
12295{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012296static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012297test_array [0] = 0
12298
12299 ;
12300 return 0;
12301}
12302_ACEOF
12303rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012304if { (ac_try="$ac_compile"
12305case "(($ac_try" in
12306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12307 *) ac_try_echo=$ac_try;;
12308esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012310 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012311 ac_status=$?
12312 grep -v '^ *+' conftest.er1 >conftest.err
12313 rm -f conftest.er1
12314 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316 (exit $ac_status); } && {
12317 test -z "$ac_c_werror_flag" ||
12318 test ! -s conftest.err
12319 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012320 ac_lo=$ac_mid; break
12321else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012322 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012323sed 's/^/| /' conftest.$ac_ext >&5
12324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325 ac_hi=`expr '(' $ac_mid ')' - 1`
12326 if test $ac_mid -le $ac_hi; then
12327 ac_lo= ac_hi=
12328 break
12329 fi
12330 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012332
12333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012334 done
12335else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012336 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012337sed 's/^/| /' conftest.$ac_ext >&5
12338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012341
12342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012344
12345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012346# Binary search between lo and hi bounds.
12347while test "x$ac_lo" != "x$ac_hi"; do
12348 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12349 cat >conftest.$ac_ext <<_ACEOF
12350/* confdefs.h. */
12351_ACEOF
12352cat confdefs.h >>conftest.$ac_ext
12353cat >>conftest.$ac_ext <<_ACEOF
12354/* end confdefs.h. */
12355$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012356 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012357int
12358main ()
12359{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012360static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012361test_array [0] = 0
12362
12363 ;
12364 return 0;
12365}
12366_ACEOF
12367rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012368if { (ac_try="$ac_compile"
12369case "(($ac_try" in
12370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12371 *) ac_try_echo=$ac_try;;
12372esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012375 ac_status=$?
12376 grep -v '^ *+' conftest.er1 >conftest.err
12377 rm -f conftest.er1
12378 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380 (exit $ac_status); } && {
12381 test -z "$ac_c_werror_flag" ||
12382 test ! -s conftest.err
12383 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012384 ac_hi=$ac_mid
12385else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012386 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012387sed 's/^/| /' conftest.$ac_ext >&5
12388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391
12392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012393done
12394case $ac_lo in
12395?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012397 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012398See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012399echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012400See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012401 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402 else
12403 ac_cv_sizeof__Bool=0
12404 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012405esac
12406else
12407 cat >conftest.$ac_ext <<_ACEOF
12408/* confdefs.h. */
12409_ACEOF
12410cat confdefs.h >>conftest.$ac_ext
12411cat >>conftest.$ac_ext <<_ACEOF
12412/* end confdefs.h. */
12413$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012414 typedef _Bool ac__type_sizeof_;
12415static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12416static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012417#include <stdio.h>
12418#include <stdlib.h>
12419int
12420main ()
12421{
12422
12423 FILE *f = fopen ("conftest.val", "w");
12424 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012426 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012427 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012429 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012431 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012432 }
12433 else
12434 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012436 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012438 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012439 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012441
12442 ;
12443 return 0;
12444}
12445_ACEOF
12446rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447if { (ac_try="$ac_link"
12448case "(($ac_try" in
12449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12450 *) ac_try_echo=$ac_try;;
12451esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012454 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012456 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457 { (case "(($ac_try" in
12458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12459 *) ac_try_echo=$ac_try;;
12460esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012463 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012465 (exit $ac_status); }; }; then
12466 ac_cv_sizeof__Bool=`cat conftest.val`
12467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012468 echo "$as_me: program exited with status $ac_status" >&5
12469echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012470sed 's/^/| /' conftest.$ac_ext >&5
12471
12472( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012474 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012475See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012476echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012477See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012478 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479 else
12480 ac_cv_sizeof__Bool=0
12481 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483rm -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 +000012484fi
12485rm -f conftest.val
12486fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012487{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12488echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489
12490
12491
Thomas Woutersb2137042007-02-01 18:02:27 +000012492cat >>confdefs.h <<_ACEOF
12493#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12494_ACEOF
12495
12496
12497fi
12498
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012499{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12500echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012501if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012502 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012503else
12504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012505/* confdefs.h. */
12506_ACEOF
12507cat confdefs.h >>conftest.$ac_ext
12508cat >>conftest.$ac_ext <<_ACEOF
12509/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012510#ifdef HAVE_STDINT_H
12511 #include <stdint.h>
12512 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012513
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012514typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012515int
12516main ()
12517{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012518if ((ac__type_new_ *) 0)
12519 return 0;
12520if (sizeof (ac__type_new_))
12521 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012522 ;
12523 return 0;
12524}
12525_ACEOF
12526rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012527if { (ac_try="$ac_compile"
12528case "(($ac_try" in
12529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12530 *) ac_try_echo=$ac_try;;
12531esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012535 grep -v '^ *+' conftest.er1 >conftest.err
12536 rm -f conftest.er1
12537 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539 (exit $ac_status); } && {
12540 test -z "$ac_c_werror_flag" ||
12541 test ! -s conftest.err
12542 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012543 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012544else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012546sed 's/^/| /' conftest.$ac_ext >&5
12547
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012548 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012550
12551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012552fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012553{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12554echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12555if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012556
12557cat >>confdefs.h <<_ACEOF
12558#define HAVE_UINTPTR_T 1
12559_ACEOF
12560
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012561{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12562echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12563if test "${ac_cv_type_uintptr_t+set}" = set; then
12564 echo $ECHO_N "(cached) $ECHO_C" >&6
12565else
12566 cat >conftest.$ac_ext <<_ACEOF
12567/* confdefs.h. */
12568_ACEOF
12569cat confdefs.h >>conftest.$ac_ext
12570cat >>conftest.$ac_ext <<_ACEOF
12571/* end confdefs.h. */
12572$ac_includes_default
12573typedef uintptr_t ac__type_new_;
12574int
12575main ()
12576{
12577if ((ac__type_new_ *) 0)
12578 return 0;
12579if (sizeof (ac__type_new_))
12580 return 0;
12581 ;
12582 return 0;
12583}
12584_ACEOF
12585rm -f conftest.$ac_objext
12586if { (ac_try="$ac_compile"
12587case "(($ac_try" in
12588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12589 *) ac_try_echo=$ac_try;;
12590esac
12591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12592 (eval "$ac_compile") 2>conftest.er1
12593 ac_status=$?
12594 grep -v '^ *+' conftest.er1 >conftest.err
12595 rm -f conftest.er1
12596 cat conftest.err >&5
12597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12598 (exit $ac_status); } && {
12599 test -z "$ac_c_werror_flag" ||
12600 test ! -s conftest.err
12601 } && test -s conftest.$ac_objext; then
12602 ac_cv_type_uintptr_t=yes
12603else
12604 echo "$as_me: failed program was:" >&5
12605sed 's/^/| /' conftest.$ac_ext >&5
12606
12607 ac_cv_type_uintptr_t=no
12608fi
12609
12610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12611fi
12612{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12613echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012615# The cast to long int works around a bug in the HP C Compiler
12616# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12617# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12618# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012619{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12620echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012621if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012622 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012623else
Martin v. Löwis11437992002-04-12 09:54:03 +000012624 if test "$cross_compiling" = yes; then
12625 # Depending upon the size, compute the lo and hi bounds.
12626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012627/* confdefs.h. */
12628_ACEOF
12629cat confdefs.h >>conftest.$ac_ext
12630cat >>conftest.$ac_ext <<_ACEOF
12631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012632$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012633 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012634int
12635main ()
12636{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012637static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012638test_array [0] = 0
12639
12640 ;
12641 return 0;
12642}
12643_ACEOF
12644rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645if { (ac_try="$ac_compile"
12646case "(($ac_try" in
12647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12648 *) ac_try_echo=$ac_try;;
12649esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012653 grep -v '^ *+' conftest.er1 >conftest.err
12654 rm -f conftest.er1
12655 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657 (exit $ac_status); } && {
12658 test -z "$ac_c_werror_flag" ||
12659 test ! -s conftest.err
12660 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012661 ac_lo=0 ac_mid=0
12662 while :; do
12663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012664/* confdefs.h. */
12665_ACEOF
12666cat confdefs.h >>conftest.$ac_ext
12667cat >>conftest.$ac_ext <<_ACEOF
12668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012669$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012670 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012671int
12672main ()
12673{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012674static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012675test_array [0] = 0
12676
12677 ;
12678 return 0;
12679}
12680_ACEOF
12681rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012682if { (ac_try="$ac_compile"
12683case "(($ac_try" in
12684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12685 *) ac_try_echo=$ac_try;;
12686esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012690 grep -v '^ *+' conftest.er1 >conftest.err
12691 rm -f conftest.er1
12692 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694 (exit $ac_status); } && {
12695 test -z "$ac_c_werror_flag" ||
12696 test ! -s conftest.err
12697 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 ac_hi=$ac_mid; break
12699else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012701sed 's/^/| /' conftest.$ac_ext >&5
12702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012703 ac_lo=`expr $ac_mid + 1`
12704 if test $ac_lo -le $ac_mid; then
12705 ac_lo= ac_hi=
12706 break
12707 fi
12708 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710
12711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 done
12713else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012715sed 's/^/| /' conftest.$ac_ext >&5
12716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* confdefs.h. */
12719_ACEOF
12720cat confdefs.h >>conftest.$ac_ext
12721cat >>conftest.$ac_ext <<_ACEOF
12722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012723$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012724 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012725int
12726main ()
12727{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012729test_array [0] = 0
12730
12731 ;
12732 return 0;
12733}
12734_ACEOF
12735rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736if { (ac_try="$ac_compile"
12737case "(($ac_try" in
12738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12739 *) ac_try_echo=$ac_try;;
12740esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012744 grep -v '^ *+' conftest.er1 >conftest.err
12745 rm -f conftest.er1
12746 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012748 (exit $ac_status); } && {
12749 test -z "$ac_c_werror_flag" ||
12750 test ! -s conftest.err
12751 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012752 ac_hi=-1 ac_mid=-1
12753 while :; do
12754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012755/* confdefs.h. */
12756_ACEOF
12757cat confdefs.h >>conftest.$ac_ext
12758cat >>conftest.$ac_ext <<_ACEOF
12759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012760$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012761 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012762int
12763main ()
12764{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012766test_array [0] = 0
12767
12768 ;
12769 return 0;
12770}
12771_ACEOF
12772rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773if { (ac_try="$ac_compile"
12774case "(($ac_try" in
12775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12776 *) ac_try_echo=$ac_try;;
12777esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012781 grep -v '^ *+' conftest.er1 >conftest.err
12782 rm -f conftest.er1
12783 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785 (exit $ac_status); } && {
12786 test -z "$ac_c_werror_flag" ||
12787 test ! -s conftest.err
12788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012789 ac_lo=$ac_mid; break
12790else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012792sed 's/^/| /' conftest.$ac_ext >&5
12793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794 ac_hi=`expr '(' $ac_mid ')' - 1`
12795 if test $ac_mid -le $ac_hi; then
12796 ac_lo= ac_hi=
12797 break
12798 fi
12799 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801
12802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 done
12804else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012806sed 's/^/| /' conftest.$ac_ext >&5
12807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012808 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810
12811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012813
12814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012815# Binary search between lo and hi bounds.
12816while test "x$ac_lo" != "x$ac_hi"; do
12817 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012819/* confdefs.h. */
12820_ACEOF
12821cat confdefs.h >>conftest.$ac_ext
12822cat >>conftest.$ac_ext <<_ACEOF
12823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012824$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012825 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012826int
12827main ()
12828{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012829static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012830test_array [0] = 0
12831
12832 ;
12833 return 0;
12834}
12835_ACEOF
12836rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012837if { (ac_try="$ac_compile"
12838case "(($ac_try" in
12839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12840 *) ac_try_echo=$ac_try;;
12841esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012845 grep -v '^ *+' conftest.er1 >conftest.err
12846 rm -f conftest.er1
12847 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012849 (exit $ac_status); } && {
12850 test -z "$ac_c_werror_flag" ||
12851 test ! -s conftest.err
12852 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012853 ac_hi=$ac_mid
12854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012856sed 's/^/| /' conftest.$ac_ext >&5
12857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012858 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860
12861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012862done
12863case $ac_lo in
12864?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012866 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012867See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012868echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012869See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012870 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871 else
12872 ac_cv_sizeof_uintptr_t=0
12873 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012874esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012875else
Martin v. Löwis11437992002-04-12 09:54:03 +000012876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012877/* confdefs.h. */
12878_ACEOF
12879cat confdefs.h >>conftest.$ac_ext
12880cat >>conftest.$ac_ext <<_ACEOF
12881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012882$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012883 typedef uintptr_t ac__type_sizeof_;
12884static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12885static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012886#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012887#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012888int
12889main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012890{
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
12892 FILE *f = fopen ("conftest.val", "w");
12893 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012895 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012898 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012900 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 }
12902 else
12903 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012905 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012907 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012910
12911 ;
12912 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012913}
Martin v. Löwis11437992002-04-12 09:54:03 +000012914_ACEOF
12915rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916if { (ac_try="$ac_link"
12917case "(($ac_try" in
12918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12919 *) ac_try_echo=$ac_try;;
12920esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012923 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926 { (case "(($ac_try" in
12927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12928 *) ac_try_echo=$ac_try;;
12929esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012932 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 (exit $ac_status); }; }; then
12935 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012937 echo "$as_me: program exited with status $ac_status" >&5
12938echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012939sed 's/^/| /' conftest.$ac_ext >&5
12940
Martin v. Löwis11437992002-04-12 09:54:03 +000012941( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012942if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012943 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012944See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012945echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012946See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012947 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012948 else
12949 ac_cv_sizeof_uintptr_t=0
12950 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952rm -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 +000012953fi
12954rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012955fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012956{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12957echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958
12959
12960
Martin v. Löwis11437992002-04-12 09:54:03 +000012961cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012962#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012963_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012964
Michael W. Hudson54241132001-12-07 15:38:26 +000012965
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012966fi
12967
Thomas Wouters89f507f2006-12-13 04:49:30 +000012968
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012969{ echo "$as_me:$LINENO: checking for off_t" >&5
12970echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12971if test "${ac_cv_type_off_t+set}" = set; then
12972 echo $ECHO_N "(cached) $ECHO_C" >&6
12973else
12974 cat >conftest.$ac_ext <<_ACEOF
12975/* confdefs.h. */
12976_ACEOF
12977cat confdefs.h >>conftest.$ac_ext
12978cat >>conftest.$ac_ext <<_ACEOF
12979/* end confdefs.h. */
12980
12981#ifdef HAVE_SYS_TYPES_H
12982#include <sys/types.h>
12983#endif
12984
12985
12986typedef off_t ac__type_new_;
12987int
12988main ()
12989{
12990if ((ac__type_new_ *) 0)
12991 return 0;
12992if (sizeof (ac__type_new_))
12993 return 0;
12994 ;
12995 return 0;
12996}
12997_ACEOF
12998rm -f conftest.$ac_objext
12999if { (ac_try="$ac_compile"
13000case "(($ac_try" in
13001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13002 *) ac_try_echo=$ac_try;;
13003esac
13004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13005 (eval "$ac_compile") 2>conftest.er1
13006 ac_status=$?
13007 grep -v '^ *+' conftest.er1 >conftest.err
13008 rm -f conftest.er1
13009 cat conftest.err >&5
13010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13011 (exit $ac_status); } && {
13012 test -z "$ac_c_werror_flag" ||
13013 test ! -s conftest.err
13014 } && test -s conftest.$ac_objext; then
13015 ac_cv_type_off_t=yes
13016else
13017 echo "$as_me: failed program was:" >&5
13018sed 's/^/| /' conftest.$ac_ext >&5
13019
13020 ac_cv_type_off_t=no
13021fi
13022
13023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13024fi
13025{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13026echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13027
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013028# The cast to long int works around a bug in the HP C Compiler
13029# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13030# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13031# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013032{ echo "$as_me:$LINENO: checking size of off_t" >&5
13033echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013034if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013035 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013036else
13037 if test "$cross_compiling" = yes; then
13038 # Depending upon the size, compute the lo and hi bounds.
13039cat >conftest.$ac_ext <<_ACEOF
13040/* confdefs.h. */
13041_ACEOF
13042cat confdefs.h >>conftest.$ac_ext
13043cat >>conftest.$ac_ext <<_ACEOF
13044/* end confdefs.h. */
13045
13046#ifdef HAVE_SYS_TYPES_H
13047#include <sys/types.h>
13048#endif
13049
13050
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013051 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013052int
13053main ()
13054{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013055static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013056test_array [0] = 0
13057
13058 ;
13059 return 0;
13060}
13061_ACEOF
13062rm -f conftest.$ac_objext
13063if { (ac_try="$ac_compile"
13064case "(($ac_try" in
13065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13066 *) ac_try_echo=$ac_try;;
13067esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013069 (eval "$ac_compile") 2>conftest.er1
13070 ac_status=$?
13071 grep -v '^ *+' conftest.er1 >conftest.err
13072 rm -f conftest.er1
13073 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013075 (exit $ac_status); } && {
13076 test -z "$ac_c_werror_flag" ||
13077 test ! -s conftest.err
13078 } && test -s conftest.$ac_objext; then
13079 ac_lo=0 ac_mid=0
13080 while :; do
13081 cat >conftest.$ac_ext <<_ACEOF
13082/* confdefs.h. */
13083_ACEOF
13084cat confdefs.h >>conftest.$ac_ext
13085cat >>conftest.$ac_ext <<_ACEOF
13086/* end confdefs.h. */
13087
13088#ifdef HAVE_SYS_TYPES_H
13089#include <sys/types.h>
13090#endif
13091
13092
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013093 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013094int
13095main ()
13096{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013097static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013098test_array [0] = 0
13099
13100 ;
13101 return 0;
13102}
13103_ACEOF
13104rm -f conftest.$ac_objext
13105if { (ac_try="$ac_compile"
13106case "(($ac_try" in
13107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13108 *) ac_try_echo=$ac_try;;
13109esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013111 (eval "$ac_compile") 2>conftest.er1
13112 ac_status=$?
13113 grep -v '^ *+' conftest.er1 >conftest.err
13114 rm -f conftest.er1
13115 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013117 (exit $ac_status); } && {
13118 test -z "$ac_c_werror_flag" ||
13119 test ! -s conftest.err
13120 } && test -s conftest.$ac_objext; then
13121 ac_hi=$ac_mid; break
13122else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013123 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013124sed 's/^/| /' conftest.$ac_ext >&5
13125
13126 ac_lo=`expr $ac_mid + 1`
13127 if test $ac_lo -le $ac_mid; then
13128 ac_lo= ac_hi=
13129 break
13130 fi
13131 ac_mid=`expr 2 '*' $ac_mid + 1`
13132fi
13133
13134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13135 done
13136else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013137 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013138sed 's/^/| /' conftest.$ac_ext >&5
13139
13140 cat >conftest.$ac_ext <<_ACEOF
13141/* confdefs.h. */
13142_ACEOF
13143cat confdefs.h >>conftest.$ac_ext
13144cat >>conftest.$ac_ext <<_ACEOF
13145/* end confdefs.h. */
13146
13147#ifdef HAVE_SYS_TYPES_H
13148#include <sys/types.h>
13149#endif
13150
13151
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013152 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013153int
13154main ()
13155{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013156static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013157test_array [0] = 0
13158
13159 ;
13160 return 0;
13161}
13162_ACEOF
13163rm -f conftest.$ac_objext
13164if { (ac_try="$ac_compile"
13165case "(($ac_try" in
13166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13167 *) ac_try_echo=$ac_try;;
13168esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013170 (eval "$ac_compile") 2>conftest.er1
13171 ac_status=$?
13172 grep -v '^ *+' conftest.er1 >conftest.err
13173 rm -f conftest.er1
13174 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013176 (exit $ac_status); } && {
13177 test -z "$ac_c_werror_flag" ||
13178 test ! -s conftest.err
13179 } && test -s conftest.$ac_objext; then
13180 ac_hi=-1 ac_mid=-1
13181 while :; do
13182 cat >conftest.$ac_ext <<_ACEOF
13183/* confdefs.h. */
13184_ACEOF
13185cat confdefs.h >>conftest.$ac_ext
13186cat >>conftest.$ac_ext <<_ACEOF
13187/* end confdefs.h. */
13188
13189#ifdef HAVE_SYS_TYPES_H
13190#include <sys/types.h>
13191#endif
13192
13193
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013194 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013195int
13196main ()
13197{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013198static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013199test_array [0] = 0
13200
13201 ;
13202 return 0;
13203}
13204_ACEOF
13205rm -f conftest.$ac_objext
13206if { (ac_try="$ac_compile"
13207case "(($ac_try" in
13208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13209 *) ac_try_echo=$ac_try;;
13210esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013212 (eval "$ac_compile") 2>conftest.er1
13213 ac_status=$?
13214 grep -v '^ *+' conftest.er1 >conftest.err
13215 rm -f conftest.er1
13216 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013218 (exit $ac_status); } && {
13219 test -z "$ac_c_werror_flag" ||
13220 test ! -s conftest.err
13221 } && test -s conftest.$ac_objext; then
13222 ac_lo=$ac_mid; break
13223else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013224 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013225sed 's/^/| /' conftest.$ac_ext >&5
13226
13227 ac_hi=`expr '(' $ac_mid ')' - 1`
13228 if test $ac_mid -le $ac_hi; then
13229 ac_lo= ac_hi=
13230 break
13231 fi
13232 ac_mid=`expr 2 '*' $ac_mid`
13233fi
13234
13235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13236 done
13237else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013238 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013239sed 's/^/| /' conftest.$ac_ext >&5
13240
13241 ac_lo= ac_hi=
13242fi
13243
13244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13245fi
13246
13247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13248# Binary search between lo and hi bounds.
13249while test "x$ac_lo" != "x$ac_hi"; do
13250 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13251 cat >conftest.$ac_ext <<_ACEOF
13252/* confdefs.h. */
13253_ACEOF
13254cat confdefs.h >>conftest.$ac_ext
13255cat >>conftest.$ac_ext <<_ACEOF
13256/* end confdefs.h. */
13257
13258#ifdef HAVE_SYS_TYPES_H
13259#include <sys/types.h>
13260#endif
13261
13262
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013263 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013264int
13265main ()
13266{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013267static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013268test_array [0] = 0
13269
13270 ;
13271 return 0;
13272}
13273_ACEOF
13274rm -f conftest.$ac_objext
13275if { (ac_try="$ac_compile"
13276case "(($ac_try" in
13277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13278 *) ac_try_echo=$ac_try;;
13279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013281 (eval "$ac_compile") 2>conftest.er1
13282 ac_status=$?
13283 grep -v '^ *+' conftest.er1 >conftest.err
13284 rm -f conftest.er1
13285 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013287 (exit $ac_status); } && {
13288 test -z "$ac_c_werror_flag" ||
13289 test ! -s conftest.err
13290 } && test -s conftest.$ac_objext; then
13291 ac_hi=$ac_mid
13292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013293 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013294sed 's/^/| /' conftest.$ac_ext >&5
13295
13296 ac_lo=`expr '(' $ac_mid ')' + 1`
13297fi
13298
13299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13300done
13301case $ac_lo in
13302?*) ac_cv_sizeof_off_t=$ac_lo;;
13303'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013304 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013305See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013306echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013307See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013308 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013309 else
13310 ac_cv_sizeof_off_t=0
13311 fi ;;
13312esac
13313else
13314 cat >conftest.$ac_ext <<_ACEOF
13315/* confdefs.h. */
13316_ACEOF
13317cat confdefs.h >>conftest.$ac_ext
13318cat >>conftest.$ac_ext <<_ACEOF
13319/* end confdefs.h. */
13320
13321#ifdef HAVE_SYS_TYPES_H
13322#include <sys/types.h>
13323#endif
13324
13325
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013326 typedef off_t ac__type_sizeof_;
13327static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13328static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013329#include <stdio.h>
13330#include <stdlib.h>
13331int
13332main ()
13333{
13334
13335 FILE *f = fopen ("conftest.val", "w");
13336 if (! f)
13337 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013338 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013339 {
13340 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013341 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013342 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013343 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013344 }
13345 else
13346 {
13347 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013348 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013349 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013350 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013351 }
13352 return ferror (f) || fclose (f) != 0;
13353
13354 ;
13355 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013356}
Martin v. Löwis11437992002-04-12 09:54:03 +000013357_ACEOF
13358rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013359if { (ac_try="$ac_link"
13360case "(($ac_try" in
13361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13362 *) ac_try_echo=$ac_try;;
13363esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013369 { (case "(($ac_try" in
13370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13371 *) ac_try_echo=$ac_try;;
13372esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013374 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013377 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013378 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013379else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013380 echo "$as_me: program exited with status $ac_status" >&5
13381echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013382sed 's/^/| /' conftest.$ac_ext >&5
13383
Martin v. Löwis11437992002-04-12 09:54:03 +000013384( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013385if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013386 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013387See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013388echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013389See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013390 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013391 else
13392 ac_cv_sizeof_off_t=0
13393 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013395rm -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 +000013396fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013397rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013398fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013399{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13400echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013402
13403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013405#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013406_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013407
Michael W. Hudson54241132001-12-07 15:38:26 +000013408
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013409
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013410{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13411echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013412if test "$have_long_long" = yes -a \
13413 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13414 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416cat >>confdefs.h <<\_ACEOF
13417#define HAVE_LARGEFILE_SUPPORT 1
13418_ACEOF
13419
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013420 { echo "$as_me:$LINENO: result: yes" >&5
13421echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013422else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013423 { echo "$as_me:$LINENO: result: no" >&5
13424echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013425fi
13426
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013427{ echo "$as_me:$LINENO: checking for time_t" >&5
13428echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13429if test "${ac_cv_type_time_t+set}" = set; then
13430 echo $ECHO_N "(cached) $ECHO_C" >&6
13431else
13432 cat >conftest.$ac_ext <<_ACEOF
13433/* confdefs.h. */
13434_ACEOF
13435cat confdefs.h >>conftest.$ac_ext
13436cat >>conftest.$ac_ext <<_ACEOF
13437/* end confdefs.h. */
13438
13439#ifdef HAVE_SYS_TYPES_H
13440#include <sys/types.h>
13441#endif
13442#ifdef HAVE_TIME_H
13443#include <time.h>
13444#endif
13445
13446
13447typedef time_t ac__type_new_;
13448int
13449main ()
13450{
13451if ((ac__type_new_ *) 0)
13452 return 0;
13453if (sizeof (ac__type_new_))
13454 return 0;
13455 ;
13456 return 0;
13457}
13458_ACEOF
13459rm -f conftest.$ac_objext
13460if { (ac_try="$ac_compile"
13461case "(($ac_try" in
13462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13463 *) ac_try_echo=$ac_try;;
13464esac
13465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13466 (eval "$ac_compile") 2>conftest.er1
13467 ac_status=$?
13468 grep -v '^ *+' conftest.er1 >conftest.err
13469 rm -f conftest.er1
13470 cat conftest.err >&5
13471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13472 (exit $ac_status); } && {
13473 test -z "$ac_c_werror_flag" ||
13474 test ! -s conftest.err
13475 } && test -s conftest.$ac_objext; then
13476 ac_cv_type_time_t=yes
13477else
13478 echo "$as_me: failed program was:" >&5
13479sed 's/^/| /' conftest.$ac_ext >&5
13480
13481 ac_cv_type_time_t=no
13482fi
13483
13484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13485fi
13486{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13487echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13488
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013489# The cast to long int works around a bug in the HP C Compiler
13490# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13491# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13492# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013493{ echo "$as_me:$LINENO: checking size of time_t" >&5
13494echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013495if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013496 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013497else
13498 if test "$cross_compiling" = yes; then
13499 # Depending upon the size, compute the lo and hi bounds.
13500cat >conftest.$ac_ext <<_ACEOF
13501/* confdefs.h. */
13502_ACEOF
13503cat confdefs.h >>conftest.$ac_ext
13504cat >>conftest.$ac_ext <<_ACEOF
13505/* end confdefs.h. */
13506
13507#ifdef HAVE_SYS_TYPES_H
13508#include <sys/types.h>
13509#endif
13510#ifdef HAVE_TIME_H
13511#include <time.h>
13512#endif
13513
13514
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013515 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013516int
13517main ()
13518{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013519static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013520test_array [0] = 0
13521
13522 ;
13523 return 0;
13524}
13525_ACEOF
13526rm -f conftest.$ac_objext
13527if { (ac_try="$ac_compile"
13528case "(($ac_try" in
13529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13530 *) ac_try_echo=$ac_try;;
13531esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013533 (eval "$ac_compile") 2>conftest.er1
13534 ac_status=$?
13535 grep -v '^ *+' conftest.er1 >conftest.err
13536 rm -f conftest.er1
13537 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013539 (exit $ac_status); } && {
13540 test -z "$ac_c_werror_flag" ||
13541 test ! -s conftest.err
13542 } && test -s conftest.$ac_objext; then
13543 ac_lo=0 ac_mid=0
13544 while :; do
13545 cat >conftest.$ac_ext <<_ACEOF
13546/* confdefs.h. */
13547_ACEOF
13548cat confdefs.h >>conftest.$ac_ext
13549cat >>conftest.$ac_ext <<_ACEOF
13550/* end confdefs.h. */
13551
13552#ifdef HAVE_SYS_TYPES_H
13553#include <sys/types.h>
13554#endif
13555#ifdef HAVE_TIME_H
13556#include <time.h>
13557#endif
13558
13559
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013560 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013561int
13562main ()
13563{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013565test_array [0] = 0
13566
13567 ;
13568 return 0;
13569}
13570_ACEOF
13571rm -f conftest.$ac_objext
13572if { (ac_try="$ac_compile"
13573case "(($ac_try" in
13574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13575 *) ac_try_echo=$ac_try;;
13576esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013578 (eval "$ac_compile") 2>conftest.er1
13579 ac_status=$?
13580 grep -v '^ *+' conftest.er1 >conftest.err
13581 rm -f conftest.er1
13582 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013584 (exit $ac_status); } && {
13585 test -z "$ac_c_werror_flag" ||
13586 test ! -s conftest.err
13587 } && test -s conftest.$ac_objext; then
13588 ac_hi=$ac_mid; break
13589else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013590 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013591sed 's/^/| /' conftest.$ac_ext >&5
13592
13593 ac_lo=`expr $ac_mid + 1`
13594 if test $ac_lo -le $ac_mid; then
13595 ac_lo= ac_hi=
13596 break
13597 fi
13598 ac_mid=`expr 2 '*' $ac_mid + 1`
13599fi
13600
13601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13602 done
13603else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013604 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013605sed 's/^/| /' conftest.$ac_ext >&5
13606
13607 cat >conftest.$ac_ext <<_ACEOF
13608/* confdefs.h. */
13609_ACEOF
13610cat confdefs.h >>conftest.$ac_ext
13611cat >>conftest.$ac_ext <<_ACEOF
13612/* end confdefs.h. */
13613
13614#ifdef HAVE_SYS_TYPES_H
13615#include <sys/types.h>
13616#endif
13617#ifdef HAVE_TIME_H
13618#include <time.h>
13619#endif
13620
13621
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013622 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013623int
13624main ()
13625{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013626static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013627test_array [0] = 0
13628
13629 ;
13630 return 0;
13631}
13632_ACEOF
13633rm -f conftest.$ac_objext
13634if { (ac_try="$ac_compile"
13635case "(($ac_try" in
13636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13637 *) ac_try_echo=$ac_try;;
13638esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013640 (eval "$ac_compile") 2>conftest.er1
13641 ac_status=$?
13642 grep -v '^ *+' conftest.er1 >conftest.err
13643 rm -f conftest.er1
13644 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013646 (exit $ac_status); } && {
13647 test -z "$ac_c_werror_flag" ||
13648 test ! -s conftest.err
13649 } && test -s conftest.$ac_objext; then
13650 ac_hi=-1 ac_mid=-1
13651 while :; do
13652 cat >conftest.$ac_ext <<_ACEOF
13653/* confdefs.h. */
13654_ACEOF
13655cat confdefs.h >>conftest.$ac_ext
13656cat >>conftest.$ac_ext <<_ACEOF
13657/* end confdefs.h. */
13658
13659#ifdef HAVE_SYS_TYPES_H
13660#include <sys/types.h>
13661#endif
13662#ifdef HAVE_TIME_H
13663#include <time.h>
13664#endif
13665
13666
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013667 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013668int
13669main ()
13670{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013671static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013672test_array [0] = 0
13673
13674 ;
13675 return 0;
13676}
13677_ACEOF
13678rm -f conftest.$ac_objext
13679if { (ac_try="$ac_compile"
13680case "(($ac_try" in
13681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13682 *) ac_try_echo=$ac_try;;
13683esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013685 (eval "$ac_compile") 2>conftest.er1
13686 ac_status=$?
13687 grep -v '^ *+' conftest.er1 >conftest.err
13688 rm -f conftest.er1
13689 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013691 (exit $ac_status); } && {
13692 test -z "$ac_c_werror_flag" ||
13693 test ! -s conftest.err
13694 } && test -s conftest.$ac_objext; then
13695 ac_lo=$ac_mid; break
13696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013697 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013698sed 's/^/| /' conftest.$ac_ext >&5
13699
13700 ac_hi=`expr '(' $ac_mid ')' - 1`
13701 if test $ac_mid -le $ac_hi; then
13702 ac_lo= ac_hi=
13703 break
13704 fi
13705 ac_mid=`expr 2 '*' $ac_mid`
13706fi
13707
13708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13709 done
13710else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013711 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013712sed 's/^/| /' conftest.$ac_ext >&5
13713
13714 ac_lo= ac_hi=
13715fi
13716
13717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13718fi
13719
13720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13721# Binary search between lo and hi bounds.
13722while test "x$ac_lo" != "x$ac_hi"; do
13723 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13724 cat >conftest.$ac_ext <<_ACEOF
13725/* confdefs.h. */
13726_ACEOF
13727cat confdefs.h >>conftest.$ac_ext
13728cat >>conftest.$ac_ext <<_ACEOF
13729/* end confdefs.h. */
13730
13731#ifdef HAVE_SYS_TYPES_H
13732#include <sys/types.h>
13733#endif
13734#ifdef HAVE_TIME_H
13735#include <time.h>
13736#endif
13737
13738
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013739 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013740int
13741main ()
13742{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013743static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013744test_array [0] = 0
13745
13746 ;
13747 return 0;
13748}
13749_ACEOF
13750rm -f conftest.$ac_objext
13751if { (ac_try="$ac_compile"
13752case "(($ac_try" in
13753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13754 *) ac_try_echo=$ac_try;;
13755esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013757 (eval "$ac_compile") 2>conftest.er1
13758 ac_status=$?
13759 grep -v '^ *+' conftest.er1 >conftest.err
13760 rm -f conftest.er1
13761 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013763 (exit $ac_status); } && {
13764 test -z "$ac_c_werror_flag" ||
13765 test ! -s conftest.err
13766 } && test -s conftest.$ac_objext; then
13767 ac_hi=$ac_mid
13768else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013769 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013770sed 's/^/| /' conftest.$ac_ext >&5
13771
13772 ac_lo=`expr '(' $ac_mid ')' + 1`
13773fi
13774
13775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13776done
13777case $ac_lo in
13778?*) ac_cv_sizeof_time_t=$ac_lo;;
13779'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013780 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013781See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013782echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013783See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013784 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013785 else
13786 ac_cv_sizeof_time_t=0
13787 fi ;;
13788esac
13789else
13790 cat >conftest.$ac_ext <<_ACEOF
13791/* confdefs.h. */
13792_ACEOF
13793cat confdefs.h >>conftest.$ac_ext
13794cat >>conftest.$ac_ext <<_ACEOF
13795/* end confdefs.h. */
13796
13797#ifdef HAVE_SYS_TYPES_H
13798#include <sys/types.h>
13799#endif
13800#ifdef HAVE_TIME_H
13801#include <time.h>
13802#endif
13803
13804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013805 typedef time_t ac__type_sizeof_;
13806static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13807static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013808#include <stdio.h>
13809#include <stdlib.h>
13810int
13811main ()
13812{
13813
13814 FILE *f = fopen ("conftest.val", "w");
13815 if (! f)
13816 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013817 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013818 {
13819 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013820 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013821 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013822 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013823 }
13824 else
13825 {
13826 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013827 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013828 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013829 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013830 }
13831 return ferror (f) || fclose (f) != 0;
13832
13833 ;
13834 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013835}
Martin v. Löwis11437992002-04-12 09:54:03 +000013836_ACEOF
13837rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838if { (ac_try="$ac_link"
13839case "(($ac_try" in
13840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13841 *) ac_try_echo=$ac_try;;
13842esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013848 { (case "(($ac_try" in
13849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13850 *) ac_try_echo=$ac_try;;
13851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013857 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013858else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013859 echo "$as_me: program exited with status $ac_status" >&5
13860echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013861sed 's/^/| /' conftest.$ac_ext >&5
13862
Martin v. Löwis11437992002-04-12 09:54:03 +000013863( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013864if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013865 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013866See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013867echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013868See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013869 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013870 else
13871 ac_cv_sizeof_time_t=0
13872 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874rm -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 +000013875fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013876rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013877fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013878{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13879echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013880
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013881
13882
Martin v. Löwis11437992002-04-12 09:54:03 +000013883cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013884#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013885_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013886
Michael W. Hudson54241132001-12-07 15:38:26 +000013887
13888
Trent Mick635f6fb2000-08-23 21:33:05 +000013889# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013890ac_save_cc="$CC"
13891if test "$ac_cv_kpthread" = "yes"
13892then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013893elif test "$ac_cv_kthread" = "yes"
13894then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013895elif test "$ac_cv_pthread" = "yes"
13896then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013897fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013898
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013899{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13900echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013901have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013903/* confdefs.h. */
13904_ACEOF
13905cat confdefs.h >>conftest.$ac_ext
13906cat >>conftest.$ac_ext <<_ACEOF
13907/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013908#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013909int
13910main ()
13911{
Guido van Rossum12580492000-09-24 16:47:19 +000013912pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 ;
13914 return 0;
13915}
13916_ACEOF
13917rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918if { (ac_try="$ac_compile"
13919case "(($ac_try" in
13920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13921 *) ac_try_echo=$ac_try;;
13922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013926 grep -v '^ *+' conftest.er1 >conftest.err
13927 rm -f conftest.er1
13928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930 (exit $ac_status); } && {
13931 test -z "$ac_c_werror_flag" ||
13932 test ! -s conftest.err
13933 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013934 have_pthread_t=yes
13935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013937sed 's/^/| /' conftest.$ac_ext >&5
13938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939
Trent Mick635f6fb2000-08-23 21:33:05 +000013940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941
13942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013943{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13944echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013945if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013946 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13947echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13948if test "${ac_cv_type_pthread_t+set}" = set; then
13949 echo $ECHO_N "(cached) $ECHO_C" >&6
13950else
13951 cat >conftest.$ac_ext <<_ACEOF
13952/* confdefs.h. */
13953_ACEOF
13954cat confdefs.h >>conftest.$ac_ext
13955cat >>conftest.$ac_ext <<_ACEOF
13956/* end confdefs.h. */
13957
13958#ifdef HAVE_PTHREAD_H
13959#include <pthread.h>
13960#endif
13961
13962
13963typedef pthread_t ac__type_new_;
13964int
13965main ()
13966{
13967if ((ac__type_new_ *) 0)
13968 return 0;
13969if (sizeof (ac__type_new_))
13970 return 0;
13971 ;
13972 return 0;
13973}
13974_ACEOF
13975rm -f conftest.$ac_objext
13976if { (ac_try="$ac_compile"
13977case "(($ac_try" in
13978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13979 *) ac_try_echo=$ac_try;;
13980esac
13981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13982 (eval "$ac_compile") 2>conftest.er1
13983 ac_status=$?
13984 grep -v '^ *+' conftest.er1 >conftest.err
13985 rm -f conftest.er1
13986 cat conftest.err >&5
13987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13988 (exit $ac_status); } && {
13989 test -z "$ac_c_werror_flag" ||
13990 test ! -s conftest.err
13991 } && test -s conftest.$ac_objext; then
13992 ac_cv_type_pthread_t=yes
13993else
13994 echo "$as_me: failed program was:" >&5
13995sed 's/^/| /' conftest.$ac_ext >&5
13996
13997 ac_cv_type_pthread_t=no
13998fi
13999
14000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14001fi
14002{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14003echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14004
14005# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014006# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14007# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14008# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014009{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14010echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014011if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014012 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014013else
14014 if test "$cross_compiling" = yes; then
14015 # Depending upon the size, compute the lo and hi bounds.
14016cat >conftest.$ac_ext <<_ACEOF
14017/* confdefs.h. */
14018_ACEOF
14019cat confdefs.h >>conftest.$ac_ext
14020cat >>conftest.$ac_ext <<_ACEOF
14021/* end confdefs.h. */
14022
14023#ifdef HAVE_PTHREAD_H
14024#include <pthread.h>
14025#endif
14026
14027
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014028 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014029int
14030main ()
14031{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014032static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014033test_array [0] = 0
14034
14035 ;
14036 return 0;
14037}
14038_ACEOF
14039rm -f conftest.$ac_objext
14040if { (ac_try="$ac_compile"
14041case "(($ac_try" in
14042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14043 *) ac_try_echo=$ac_try;;
14044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014046 (eval "$ac_compile") 2>conftest.er1
14047 ac_status=$?
14048 grep -v '^ *+' conftest.er1 >conftest.err
14049 rm -f conftest.er1
14050 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014052 (exit $ac_status); } && {
14053 test -z "$ac_c_werror_flag" ||
14054 test ! -s conftest.err
14055 } && test -s conftest.$ac_objext; then
14056 ac_lo=0 ac_mid=0
14057 while :; do
14058 cat >conftest.$ac_ext <<_ACEOF
14059/* confdefs.h. */
14060_ACEOF
14061cat confdefs.h >>conftest.$ac_ext
14062cat >>conftest.$ac_ext <<_ACEOF
14063/* end confdefs.h. */
14064
14065#ifdef HAVE_PTHREAD_H
14066#include <pthread.h>
14067#endif
14068
14069
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014070 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014071int
14072main ()
14073{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014074static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014075test_array [0] = 0
14076
14077 ;
14078 return 0;
14079}
14080_ACEOF
14081rm -f conftest.$ac_objext
14082if { (ac_try="$ac_compile"
14083case "(($ac_try" in
14084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14085 *) ac_try_echo=$ac_try;;
14086esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014088 (eval "$ac_compile") 2>conftest.er1
14089 ac_status=$?
14090 grep -v '^ *+' conftest.er1 >conftest.err
14091 rm -f conftest.er1
14092 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014094 (exit $ac_status); } && {
14095 test -z "$ac_c_werror_flag" ||
14096 test ! -s conftest.err
14097 } && test -s conftest.$ac_objext; then
14098 ac_hi=$ac_mid; break
14099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014100 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014101sed 's/^/| /' conftest.$ac_ext >&5
14102
14103 ac_lo=`expr $ac_mid + 1`
14104 if test $ac_lo -le $ac_mid; then
14105 ac_lo= ac_hi=
14106 break
14107 fi
14108 ac_mid=`expr 2 '*' $ac_mid + 1`
14109fi
14110
14111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14112 done
14113else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014114 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014115sed 's/^/| /' conftest.$ac_ext >&5
14116
14117 cat >conftest.$ac_ext <<_ACEOF
14118/* confdefs.h. */
14119_ACEOF
14120cat confdefs.h >>conftest.$ac_ext
14121cat >>conftest.$ac_ext <<_ACEOF
14122/* end confdefs.h. */
14123
14124#ifdef HAVE_PTHREAD_H
14125#include <pthread.h>
14126#endif
14127
14128
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014129 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014130int
14131main ()
14132{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014133static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014134test_array [0] = 0
14135
14136 ;
14137 return 0;
14138}
14139_ACEOF
14140rm -f conftest.$ac_objext
14141if { (ac_try="$ac_compile"
14142case "(($ac_try" in
14143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14144 *) ac_try_echo=$ac_try;;
14145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014147 (eval "$ac_compile") 2>conftest.er1
14148 ac_status=$?
14149 grep -v '^ *+' conftest.er1 >conftest.err
14150 rm -f conftest.er1
14151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014153 (exit $ac_status); } && {
14154 test -z "$ac_c_werror_flag" ||
14155 test ! -s conftest.err
14156 } && test -s conftest.$ac_objext; then
14157 ac_hi=-1 ac_mid=-1
14158 while :; do
14159 cat >conftest.$ac_ext <<_ACEOF
14160/* confdefs.h. */
14161_ACEOF
14162cat confdefs.h >>conftest.$ac_ext
14163cat >>conftest.$ac_ext <<_ACEOF
14164/* end confdefs.h. */
14165
14166#ifdef HAVE_PTHREAD_H
14167#include <pthread.h>
14168#endif
14169
14170
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014171 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014172int
14173main ()
14174{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014175static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014176test_array [0] = 0
14177
14178 ;
14179 return 0;
14180}
14181_ACEOF
14182rm -f conftest.$ac_objext
14183if { (ac_try="$ac_compile"
14184case "(($ac_try" in
14185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14186 *) ac_try_echo=$ac_try;;
14187esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014189 (eval "$ac_compile") 2>conftest.er1
14190 ac_status=$?
14191 grep -v '^ *+' conftest.er1 >conftest.err
14192 rm -f conftest.er1
14193 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014195 (exit $ac_status); } && {
14196 test -z "$ac_c_werror_flag" ||
14197 test ! -s conftest.err
14198 } && test -s conftest.$ac_objext; then
14199 ac_lo=$ac_mid; break
14200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014201 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014202sed 's/^/| /' conftest.$ac_ext >&5
14203
14204 ac_hi=`expr '(' $ac_mid ')' - 1`
14205 if test $ac_mid -le $ac_hi; then
14206 ac_lo= ac_hi=
14207 break
14208 fi
14209 ac_mid=`expr 2 '*' $ac_mid`
14210fi
14211
14212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14213 done
14214else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014215 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014216sed 's/^/| /' conftest.$ac_ext >&5
14217
14218 ac_lo= ac_hi=
14219fi
14220
14221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14222fi
14223
14224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14225# Binary search between lo and hi bounds.
14226while test "x$ac_lo" != "x$ac_hi"; do
14227 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14228 cat >conftest.$ac_ext <<_ACEOF
14229/* confdefs.h. */
14230_ACEOF
14231cat confdefs.h >>conftest.$ac_ext
14232cat >>conftest.$ac_ext <<_ACEOF
14233/* end confdefs.h. */
14234
14235#ifdef HAVE_PTHREAD_H
14236#include <pthread.h>
14237#endif
14238
14239
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014240 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014241int
14242main ()
14243{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014244static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014245test_array [0] = 0
14246
14247 ;
14248 return 0;
14249}
14250_ACEOF
14251rm -f conftest.$ac_objext
14252if { (ac_try="$ac_compile"
14253case "(($ac_try" in
14254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14255 *) ac_try_echo=$ac_try;;
14256esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014258 (eval "$ac_compile") 2>conftest.er1
14259 ac_status=$?
14260 grep -v '^ *+' conftest.er1 >conftest.err
14261 rm -f conftest.er1
14262 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014264 (exit $ac_status); } && {
14265 test -z "$ac_c_werror_flag" ||
14266 test ! -s conftest.err
14267 } && test -s conftest.$ac_objext; then
14268 ac_hi=$ac_mid
14269else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014270 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014271sed 's/^/| /' conftest.$ac_ext >&5
14272
14273 ac_lo=`expr '(' $ac_mid ')' + 1`
14274fi
14275
14276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14277done
14278case $ac_lo in
14279?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14280'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014281 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014282See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014283echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014284See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014285 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014286 else
14287 ac_cv_sizeof_pthread_t=0
14288 fi ;;
14289esac
14290else
14291 cat >conftest.$ac_ext <<_ACEOF
14292/* confdefs.h. */
14293_ACEOF
14294cat confdefs.h >>conftest.$ac_ext
14295cat >>conftest.$ac_ext <<_ACEOF
14296/* end confdefs.h. */
14297
14298#ifdef HAVE_PTHREAD_H
14299#include <pthread.h>
14300#endif
14301
14302
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014303 typedef pthread_t ac__type_sizeof_;
14304static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14305static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014306#include <stdio.h>
14307#include <stdlib.h>
14308int
14309main ()
14310{
14311
14312 FILE *f = fopen ("conftest.val", "w");
14313 if (! f)
14314 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014315 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014316 {
14317 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014318 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014319 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014320 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014321 }
14322 else
14323 {
14324 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014325 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014326 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014327 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014328 }
14329 return ferror (f) || fclose (f) != 0;
14330
14331 ;
14332 return 0;
14333}
Martin v. Löwis11437992002-04-12 09:54:03 +000014334_ACEOF
14335rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336if { (ac_try="$ac_link"
14337case "(($ac_try" in
14338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14339 *) ac_try_echo=$ac_try;;
14340esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014342 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346 { (case "(($ac_try" in
14347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14348 *) ac_try_echo=$ac_try;;
14349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014351 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014352 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014355 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014356else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014357 echo "$as_me: program exited with status $ac_status" >&5
14358echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014359sed 's/^/| /' conftest.$ac_ext >&5
14360
Martin v. Löwis11437992002-04-12 09:54:03 +000014361( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014362if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014363 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014364See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014365echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014366See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014367 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014368 else
14369 ac_cv_sizeof_pthread_t=0
14370 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372rm -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 +000014373fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014374rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014375fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014376{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14377echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014379
14380
Martin v. Löwis11437992002-04-12 09:54:03 +000014381cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014382#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014383_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014384
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014385
Trent Mick635f6fb2000-08-23 21:33:05 +000014386fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014387CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014388
Michael W. Hudson54241132001-12-07 15:38:26 +000014389
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014390case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014391 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014392 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14393 ;;
14394 Darwin/*)
14395 OTHER_LIBTOOL_OPT=""
14396 ;;
14397esac
14398
14399
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014400ARCH_RUN_32BIT=""
14401
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014402case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014403 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014404 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14405 if test "${enable_universalsdk}"; then
14406 :
14407 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014408 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014409 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014410 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014411 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014412 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014413 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14414 if test ${gcc_version} '<' 4.0
14415 then
14416 LIBTOOL_CRUFT="-lcc_dynamic"
14417 else
14418 LIBTOOL_CRUFT=""
14419 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014420 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014421 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014422else
14423 cat >conftest.$ac_ext <<_ACEOF
14424/* confdefs.h. */
14425_ACEOF
14426cat confdefs.h >>conftest.$ac_ext
14427cat >>conftest.$ac_ext <<_ACEOF
14428/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014429
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014430 #include <unistd.h>
14431 int main(int argc, char*argv[])
14432 {
14433 if (sizeof(long) == 4) {
14434 return 0;
14435 } else {
14436 return 1;
14437 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014438 }
14439
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014440_ACEOF
14441rm -f conftest$ac_exeext
14442if { (ac_try="$ac_link"
14443case "(($ac_try" in
14444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14445 *) ac_try_echo=$ac_try;;
14446esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014448 (eval "$ac_link") 2>&5
14449 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14452 { (case "(($ac_try" in
14453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14454 *) ac_try_echo=$ac_try;;
14455esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014457 (eval "$ac_try") 2>&5
14458 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014460 (exit $ac_status); }; }; then
14461 ac_osx_32bit=yes
14462else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014463 echo "$as_me: program exited with status $ac_status" >&5
14464echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014465sed 's/^/| /' conftest.$ac_ext >&5
14466
14467( exit $ac_status )
14468ac_osx_32bit=no
14469fi
14470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14471fi
14472
14473
14474
14475 if test "${ac_osx_32bit}" = "yes"; then
14476 case `arch` in
14477 i386)
14478 MACOSX_DEFAULT_ARCH="i386"
14479 ;;
14480 ppc)
14481 MACOSX_DEFAULT_ARCH="ppc"
14482 ;;
14483 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014484 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14485echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014486 { (exit 1); exit 1; }; }
14487 ;;
14488 esac
14489 else
14490 case `arch` in
14491 i386)
14492 MACOSX_DEFAULT_ARCH="x86_64"
14493 ;;
14494 ppc)
14495 MACOSX_DEFAULT_ARCH="ppc64"
14496 ;;
14497 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014498 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14499echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014500 { (exit 1); exit 1; }; }
14501 ;;
14502 esac
14503
14504 #ARCH_RUN_32BIT="true"
14505 fi
14506
14507 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014508 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014509 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014510esac
14511
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014512{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14513echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014514if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014515then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014516 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014518 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014519
Martin v. Löwis11437992002-04-12 09:54:03 +000014520cat >>confdefs.h <<\_ACEOF
14521#define WITH_NEXT_FRAMEWORK 1
14522_ACEOF
14523
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014524 { echo "$as_me:$LINENO: result: yes" >&5
14525echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014526 if test $enable_shared = "yes"
14527 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014528 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14529echo "$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 +000014530 { (exit 1); exit 1; }; }
14531 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014532else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014533 { echo "$as_me:$LINENO: result: no" >&5
14534echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014535fi
14536
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014537{ echo "$as_me:$LINENO: checking for dyld" >&5
14538echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014539case $ac_sys_system/$ac_sys_release in
14540 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014541
Martin v. Löwis11437992002-04-12 09:54:03 +000014542cat >>confdefs.h <<\_ACEOF
14543#define WITH_DYLD 1
14544_ACEOF
14545
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014546 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14547echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014548 ;;
14549 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014550 { echo "$as_me:$LINENO: result: no" >&5
14551echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014552 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014553esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014554
Guido van Rossum0a516c91994-09-12 10:58:40 +000014555# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014556
Michael W. Hudson54241132001-12-07 15:38:26 +000014557
14558
14559
14560
Guido van Rossum0a516c91994-09-12 10:58:40 +000014561# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014562# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014563{ echo "$as_me:$LINENO: checking SO" >&5
14564echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014565if test -z "$SO"
14566then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014567 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014568 hp*|HP*)
14569 case `uname -m` in
14570 ia64) SO=.so;;
14571 *) SO=.sl;;
14572 esac
14573 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014574 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014575 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014576 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014577else
14578 # this might also be a termcap variable, see #610332
14579 echo
14580 echo '====================================================================='
14581 echo '+ +'
14582 echo '+ WARNING: You have set SO in your environment. +'
14583 echo '+ Do you really mean to change the extension for shared libraries? +'
14584 echo '+ Continuing in 10 seconds to let you to ponder. +'
14585 echo '+ +'
14586 echo '====================================================================='
14587 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014588fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014589{ echo "$as_me:$LINENO: result: $SO" >&5
14590echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014591
Georg Brandlb1441c72009-01-03 22:33:39 +000014592
Thomas Wouters477c8d52006-05-27 19:21:47 +000014593cat >>confdefs.h <<_ACEOF
14594#define SHLIB_EXT "$SO"
14595_ACEOF
14596
Guido van Rossum0a516c91994-09-12 10:58:40 +000014597# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014598# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014599# (Shared libraries in this instance are shared modules to be loaded into
14600# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014601{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14602echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014603if test -z "$LDSHARED"
14604then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014605 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014606 AIX*)
14607 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014608 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014609 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014610 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014611 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014613 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014614 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014615 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014616 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014617 hp*|HP*)
14618 if test "$GCC" = "yes"
14619 then LDSHARED='$(CC) -shared'
14620 else LDSHARED='ld -b';
14621 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014622 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014623 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014624 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14625 if test "$enable_framework" ; then
14626 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014627 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14628 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014629 else
14630 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014631 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014632 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014633 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014634 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14635 if test "$enable_framework" ; then
14636 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014637 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14638 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014639 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014640 # No framework, use the Python app as bundle-loader
14641 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014642 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014643 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014644 Darwin/*)
14645 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14646 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014647
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014648 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014649 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014650 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014651 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014652 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014653 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14654 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014655 else
14656 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14657 if test "$enable_framework" ; then
14658 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014659 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14660 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014661 else
14662 # No framework, use the Python app as bundle-loader
14663 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14664 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14665 fi
14666 fi
14667 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014668 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014669 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014670 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014671 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014672 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014673 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014674 else
14675 LDSHARED="ld -Bshareable ${LDFLAGS}"
14676 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014677 OpenBSD*)
14678 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14679 then
14680 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14681 else
14682 case `uname -r` in
14683 [01].* | 2.[0-7] | 2.[0-7].*)
14684 LDSHARED="ld -Bshareable ${LDFLAGS}"
14685 ;;
14686 *)
14687 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14688 ;;
14689 esac
14690 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014691 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014692 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014693 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014694 then LDSHARED='$(CC) -shared'
14695 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014696 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014697 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014698 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014699 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014700 *) LDSHARED="ld";;
14701 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014702fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014703{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14704echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014705BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014706# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014707# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014708{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14709echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014710if test -z "$CCSHARED"
14711then
Guido van Rossum07397971997-04-29 21:49:50 +000014712 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014713 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014714 then CCSHARED="-fPIC";
14715 elif test `uname -p` = sparc;
14716 then CCSHARED="-xcode=pic32";
14717 else CCSHARED="-Kpic";
14718 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014719 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014720 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014721 else CCSHARED="+z";
14722 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014723 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014724 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014725 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014726 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014727 if test "$GCC" = "yes"
14728 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014729 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014730 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014731 SCO_SV*)
14732 if test "$GCC" = "yes"
14733 then CCSHARED="-fPIC"
14734 else CCSHARED="-Kpic -belf"
14735 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014736 IRIX*/6*) case $CC in
14737 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014738 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014739 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014740 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014741 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014742fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014743{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14744echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014745# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014746# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014747{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14748echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014749if test -z "$LINKFORSHARED"
14750then
Guido van Rossum07397971997-04-29 21:49:50 +000014751 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014752 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014753 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014754 LINKFORSHARED="-Wl,-E -Wl,+s";;
14755# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014756 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014757 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014758 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014759 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014760 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014761 if test "$enable_framework"
14762 then
Jack Jansenda49e192005-01-07 13:08:22 +000014763 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014764 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014765 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014766 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014767 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014768 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014769 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014770 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14771 then
14772 LINKFORSHARED="-Wl,--export-dynamic"
14773 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014774 SunOS/5*) case $CC in
14775 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014776 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014777 then
14778 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014779 fi;;
14780 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014781 CYGWIN*)
14782 if test $enable_shared = "no"
14783 then
14784 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14785 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014786 QNX*)
14787 # -Wl,-E causes the symbols to be added to the dynamic
14788 # symbol table so that they can be found when a module
14789 # is loaded. -N 2048K causes the stack size to be set
14790 # to 2048 kilobytes so that the stack doesn't overflow
14791 # when running test_compile.py.
14792 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014793 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014794fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014795{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14796echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014797
Michael W. Hudson54241132001-12-07 15:38:26 +000014798
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014799
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014800{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14801echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014802if test ! "$LIBRARY" = "$LDLIBRARY"
14803then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014804 case $ac_sys_system in
14805 CYGWIN*)
14806 # Cygwin needs CCSHARED when building extension DLLs
14807 # but not when building the interpreter DLL.
14808 CFLAGSFORSHARED='';;
14809 *)
14810 CFLAGSFORSHARED='$(CCSHARED)'
14811 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014812fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014813{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14814echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014815
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014816# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14817# library (with --enable-shared).
14818# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014819# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14820# if it is not required, since it creates a dependency of the shared library
14821# to LIBS. This, in turn, means that applications linking the shared libpython
14822# don't need to link LIBS explicitly. The default should be only changed
14823# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014824
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014825{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14826echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014827case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014828 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014829 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014830esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014831{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14832echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014833
14834
Guido van Rossum627b2d71993-12-24 10:39:16 +000014835# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014836
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014837{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14838echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014839if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014840 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014841else
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014843LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014844cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014845/* confdefs.h. */
14846_ACEOF
14847cat confdefs.h >>conftest.$ac_ext
14848cat >>conftest.$ac_ext <<_ACEOF
14849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851/* Override any GCC internal prototype to avoid an error.
14852 Use char because int might match the return type of a GCC
14853 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014854#ifdef __cplusplus
14855extern "C"
14856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014857char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014858int
14859main ()
14860{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014862 ;
14863 return 0;
14864}
14865_ACEOF
14866rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867if { (ac_try="$ac_link"
14868case "(($ac_try" in
14869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14870 *) ac_try_echo=$ac_try;;
14871esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014875 grep -v '^ *+' conftest.er1 >conftest.err
14876 rm -f conftest.er1
14877 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879 (exit $ac_status); } && {
14880 test -z "$ac_c_werror_flag" ||
14881 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014882 } && test -s conftest$ac_exeext &&
14883 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014885else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014887sed 's/^/| /' conftest.$ac_ext >&5
14888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891
14892rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014893 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014894LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014895fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014896{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14897echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14898if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014899 cat >>confdefs.h <<_ACEOF
14900#define HAVE_LIBDL 1
14901_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014902
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014903 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014904
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014905fi
14906 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014907
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014908{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14909echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014910if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014912else
Martin v. Löwis11437992002-04-12 09:54:03 +000014913 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014914LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014915cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014916/* confdefs.h. */
14917_ACEOF
14918cat confdefs.h >>conftest.$ac_ext
14919cat >>conftest.$ac_ext <<_ACEOF
14920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922/* Override any GCC internal prototype to avoid an error.
14923 Use char because int might match the return type of a GCC
14924 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014925#ifdef __cplusplus
14926extern "C"
14927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014928char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014929int
14930main ()
14931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 ;
14934 return 0;
14935}
14936_ACEOF
14937rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938if { (ac_try="$ac_link"
14939case "(($ac_try" in
14940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14941 *) ac_try_echo=$ac_try;;
14942esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014946 grep -v '^ *+' conftest.er1 >conftest.err
14947 rm -f conftest.er1
14948 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950 (exit $ac_status); } && {
14951 test -z "$ac_c_werror_flag" ||
14952 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014953 } && test -s conftest$ac_exeext &&
14954 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014956else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014958sed 's/^/| /' conftest.$ac_ext >&5
14959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962
14963rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014965LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014966fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014967{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14968echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14969if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 cat >>confdefs.h <<_ACEOF
14971#define HAVE_LIBDLD 1
14972_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014973
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014974 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014975
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014976fi
14977 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014978
Georg Brandlb1441c72009-01-03 22:33:39 +000014979# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014980if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014981 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14982echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014983if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014984 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014985else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014986 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014988/* confdefs.h. */
14989_ACEOF
14990cat confdefs.h >>conftest.$ac_ext
14991cat >>conftest.$ac_ext <<_ACEOF
14992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994/* Override any GCC internal prototype to avoid an error.
14995 Use char because int might match the return type of a GCC
14996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014997#ifdef __cplusplus
14998extern "C"
14999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015000char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015001int
15002main ()
15003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 ;
15006 return 0;
15007}
15008_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015009for ac_lib in '' pthread rt posix4; do
15010 if test -z "$ac_lib"; then
15011 ac_res="none required"
15012 else
15013 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015014 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 fi
15016 rm -f conftest.$ac_objext conftest$ac_exeext
15017if { (ac_try="$ac_link"
15018case "(($ac_try" in
15019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15020 *) ac_try_echo=$ac_try;;
15021esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015024 ac_status=$?
15025 grep -v '^ *+' conftest.er1 >conftest.err
15026 rm -f conftest.er1
15027 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029 (exit $ac_status); } && {
15030 test -z "$ac_c_werror_flag" ||
15031 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015032 } && test -s conftest$ac_exeext &&
15033 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015035else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015036 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015037sed 's/^/| /' conftest.$ac_ext >&5
15038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039
Thomas Wouters477c8d52006-05-27 19:21:47 +000015040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041
15042rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15043 conftest$ac_exeext
15044 if test "${ac_cv_search_sem_init+set}" = set; then
15045 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047done
15048if test "${ac_cv_search_sem_init+set}" = set; then
15049 :
15050else
15051 ac_cv_search_sem_init=no
15052fi
15053rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015054LIBS=$ac_func_search_save_LIBS
15055fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015056{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15057echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058ac_res=$ac_cv_search_sem_init
15059if test "$ac_res" != no; then
15060 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015061
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015062fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015063 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015064 # posix4 on Solaris 2.6
15065 # pthread (first!) on Linux
15066fi
15067
Martin v. Löwis19d17342003-06-14 21:03:05 +000015068# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015069{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15070echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015071if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015072 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015073else
15074 ac_check_lib_save_LIBS=$LIBS
15075LIBS="-lintl $LIBS"
15076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015077/* confdefs.h. */
15078_ACEOF
15079cat confdefs.h >>conftest.$ac_ext
15080cat >>conftest.$ac_ext <<_ACEOF
15081/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083/* Override any GCC internal prototype to avoid an error.
15084 Use char because int might match the return type of a GCC
15085 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015086#ifdef __cplusplus
15087extern "C"
15088#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015089char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015090int
15091main ()
15092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015094 ;
15095 return 0;
15096}
15097_ACEOF
15098rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099if { (ac_try="$ac_link"
15100case "(($ac_try" in
15101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15102 *) ac_try_echo=$ac_try;;
15103esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015107 grep -v '^ *+' conftest.er1 >conftest.err
15108 rm -f conftest.er1
15109 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111 (exit $ac_status); } && {
15112 test -z "$ac_c_werror_flag" ||
15113 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015114 } && test -s conftest$ac_exeext &&
15115 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015116 ac_cv_lib_intl_textdomain=yes
15117else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015119sed 's/^/| /' conftest.$ac_ext >&5
15120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123
15124rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015126LIBS=$ac_check_lib_save_LIBS
15127fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015128{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15129echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15130if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015131
15132cat >>confdefs.h <<\_ACEOF
15133#define WITH_LIBINTL 1
15134_ACEOF
15135
Brett Cannonc6d936e2009-06-07 20:09:53 +000015136 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015137fi
15138
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015139
15140# checks for system dependent C++ extensions support
15141case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015142 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15143echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015145/* confdefs.h. */
15146_ACEOF
15147cat confdefs.h >>conftest.$ac_ext
15148cat >>conftest.$ac_ext <<_ACEOF
15149/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015150#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015151int
15152main ()
15153{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015154loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015155 ;
15156 return 0;
15157}
15158_ACEOF
15159rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160if { (ac_try="$ac_link"
15161case "(($ac_try" in
15162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15163 *) ac_try_echo=$ac_try;;
15164esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015168 grep -v '^ *+' conftest.er1 >conftest.err
15169 rm -f conftest.er1
15170 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172 (exit $ac_status); } && {
15173 test -z "$ac_c_werror_flag" ||
15174 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015175 } && test -s conftest$ac_exeext &&
15176 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015177
Martin v. Löwis11437992002-04-12 09:54:03 +000015178cat >>confdefs.h <<\_ACEOF
15179#define AIX_GENUINE_CPLUSPLUS 1
15180_ACEOF
15181
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015182 { echo "$as_me:$LINENO: result: yes" >&5
15183echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015184else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015186sed 's/^/| /' conftest.$ac_ext >&5
15187
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015188 { echo "$as_me:$LINENO: result: no" >&5
15189echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191
15192rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015193 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015194 *) ;;
15195esac
15196
Guido van Rossum70c7f481998-03-26 18:44:10 +000015197# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015198{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15199echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015200if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015201 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015202else
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015204LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015205cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015206/* confdefs.h. */
15207_ACEOF
15208cat confdefs.h >>conftest.$ac_ext
15209cat >>conftest.$ac_ext <<_ACEOF
15210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212/* Override any GCC internal prototype to avoid an error.
15213 Use char because int might match the return type of a GCC
15214 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015215#ifdef __cplusplus
15216extern "C"
15217#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015218char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015219int
15220main ()
15221{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ;
15224 return 0;
15225}
15226_ACEOF
15227rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228if { (ac_try="$ac_link"
15229case "(($ac_try" in
15230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15231 *) ac_try_echo=$ac_try;;
15232esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015236 grep -v '^ *+' conftest.er1 >conftest.err
15237 rm -f conftest.er1
15238 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240 (exit $ac_status); } && {
15241 test -z "$ac_c_werror_flag" ||
15242 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015243 } && test -s conftest$ac_exeext &&
15244 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015246else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015248sed 's/^/| /' conftest.$ac_ext >&5
15249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015252
15253rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015254 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015255LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015256fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015257{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15258echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15259if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015260 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015261fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015262 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015263{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15264echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015265if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015266 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015267else
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015269LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015271/* confdefs.h. */
15272_ACEOF
15273cat confdefs.h >>conftest.$ac_ext
15274cat >>conftest.$ac_ext <<_ACEOF
15275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277/* Override any GCC internal prototype to avoid an error.
15278 Use char because int might match the return type of a GCC
15279 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015280#ifdef __cplusplus
15281extern "C"
15282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015283char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015284int
15285main ()
15286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015287return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 ;
15289 return 0;
15290}
15291_ACEOF
15292rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293if { (ac_try="$ac_link"
15294case "(($ac_try" in
15295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15296 *) ac_try_echo=$ac_try;;
15297esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015301 grep -v '^ *+' conftest.er1 >conftest.err
15302 rm -f conftest.er1
15303 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015305 (exit $ac_status); } && {
15306 test -z "$ac_c_werror_flag" ||
15307 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015308 } && test -s conftest$ac_exeext &&
15309 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015310 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015311else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015313sed 's/^/| /' conftest.$ac_ext >&5
15314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317
15318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015319 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015320LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015321fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015322{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15323echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15324if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015325 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015326fi
15327 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015328
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015329{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15330echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015333if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015335{ echo "$as_me:$LINENO: result: $withval" >&5
15336echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015337LIBS="$withval $LIBS"
15338
15339else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015340 { echo "$as_me:$LINENO: result: no" >&5
15341echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015342fi
15343
Guido van Rossum7f43da71994-08-01 12:15:30 +000015344
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015345# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015346{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15347echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015350if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351 withval=$with_system_ffi;
15352fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015353
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015354
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015355{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15356echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015357
Matthias Klose55708cc2009-04-30 08:06:49 +000015358# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015359{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15360echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015361
15362# Check whether --with-dbmliborder was given.
15363if test "${with_dbmliborder+set}" = set; then
15364 withval=$with_dbmliborder;
15365if test x$with_dbmliborder = xyes
15366then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015367{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15368echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015369 { (exit 1); exit 1; }; }
15370else
15371 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15372 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15373 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015374 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15375echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015376 { (exit 1); exit 1; }; }
15377 fi
15378 done
15379fi
15380fi
15381
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015382{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15383echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015384
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015385# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015386
15387
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015388{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15389echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015392if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015393 withval=$with_signal_module;
15394fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015395
15396
15397if test -z "$with_signal_module"
15398then with_signal_module="yes"
15399fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015400{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15401echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015402
15403if test "${with_signal_module}" = "yes"; then
15404 USE_SIGNAL_MODULE=""
15405 SIGNAL_OBJS=""
15406else
15407 USE_SIGNAL_MODULE="#"
15408 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15409fi
15410
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015411# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015412
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015413USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015414
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015415{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15416echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015417
Guido van Rossumec2f0731997-01-22 20:54:01 +000015418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015420if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015422{ echo "$as_me:$LINENO: result: $withval" >&5
15423echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015424LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015425if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015426 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015427fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015428else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015429 { echo "$as_me:$LINENO: result: no" >&5
15430echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015431fi
15432
Martin v. Löwis11437992002-04-12 09:54:03 +000015433
15434# Templates for things AC_DEFINEd more than once.
15435# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015436
15437
Martin v. Löwis11437992002-04-12 09:54:03 +000015438
15439
15440
15441
15442
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015443{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15444echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015447if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015448 withval=$with_threads;
15449fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015450
15451
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015452# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015454# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015455if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015456 withval=$with_thread; with_threads=$with_thread
15457fi
15458
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015459
15460if test -z "$with_threads"
15461then with_threads="yes"
15462fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015463{ echo "$as_me:$LINENO: result: $with_threads" >&5
15464echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015465
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015466
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015467if test "$with_threads" = "no"
15468then
15469 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015470elif test "$ac_cv_pthread_is_default" = yes
15471then
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015473#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015474_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015475
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015476 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015478#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015479_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015480
15481 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015483elif test "$ac_cv_kpthread" = "yes"
15484then
15485 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015486 if test "$ac_cv_cxx_thread" = "yes"; then
15487 CXX="$CXX -Kpthread"
15488 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015489 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015490#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015491_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015492
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015493 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015494 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015495elif test "$ac_cv_kthread" = "yes"
15496then
15497 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015498 if test "$ac_cv_cxx_thread" = "yes"; then
15499 CXX="$CXX -Kthread"
15500 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015501 cat >>confdefs.h <<\_ACEOF
15502#define WITH_THREAD 1
15503_ACEOF
15504
15505 posix_threads=yes
15506 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015507elif test "$ac_cv_pthread" = "yes"
15508then
15509 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015510 if test "$ac_cv_cxx_thread" = "yes"; then
15511 CXX="$CXX -pthread"
15512 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015513 cat >>confdefs.h <<\_ACEOF
15514#define WITH_THREAD 1
15515_ACEOF
15516
15517 posix_threads=yes
15518 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015519else
15520 if test ! -z "$with_threads" -a -d "$with_threads"
15521 then LDFLAGS="$LDFLAGS -L$with_threads"
15522 fi
15523 if test ! -z "$withval" -a -d "$withval"
15524 then LDFLAGS="$LDFLAGS -L$withval"
15525 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015526
15527 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015528 # define _POSIX_THREADS in unistd.h. Some apparently don't
15529 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015530 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15531echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015533/* confdefs.h. */
15534_ACEOF
15535cat confdefs.h >>conftest.$ac_ext
15536cat >>conftest.$ac_ext <<_ACEOF
15537/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015538
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015539#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015540#ifdef _POSIX_THREADS
15541yes
15542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015543
15544_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015546 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015547 unistd_defines_pthreads=yes
15548else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015549 unistd_defines_pthreads=no
15550fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015551rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015552
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015553 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15554echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015555
Martin v. Löwis11437992002-04-12 09:54:03 +000015556 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015557#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015558_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015559
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015561 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15562echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015563if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015564 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015565fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015566{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15567echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015568else
Martin v. Löwis11437992002-04-12 09:54:03 +000015569 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015570{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15571echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015573/* confdefs.h. */
15574_ACEOF
15575cat confdefs.h >>conftest.$ac_ext
15576cat >>conftest.$ac_ext <<_ACEOF
15577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015578$ac_includes_default
15579#include <cthreads.h>
15580_ACEOF
15581rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015582if { (ac_try="$ac_compile"
15583case "(($ac_try" in
15584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15585 *) ac_try_echo=$ac_try;;
15586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015590 grep -v '^ *+' conftest.er1 >conftest.err
15591 rm -f conftest.er1
15592 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594 (exit $ac_status); } && {
15595 test -z "$ac_c_werror_flag" ||
15596 test ! -s conftest.err
15597 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015598 ac_header_compiler=yes
15599else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015601sed 's/^/| /' conftest.$ac_ext >&5
15602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015603 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015605
15606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015607{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15608echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015609
15610# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015611{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15612echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015613cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015614/* confdefs.h. */
15615_ACEOF
15616cat confdefs.h >>conftest.$ac_ext
15617cat >>conftest.$ac_ext <<_ACEOF
15618/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015619#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015620_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015621if { (ac_try="$ac_cpp conftest.$ac_ext"
15622case "(($ac_try" in
15623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15624 *) ac_try_echo=$ac_try;;
15625esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015629 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 rm -f conftest.er1
15631 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633 (exit $ac_status); } >/dev/null && {
15634 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15635 test ! -s conftest.err
15636 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015637 ac_header_preproc=yes
15638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015640sed 's/^/| /' conftest.$ac_ext >&5
15641
Martin v. Löwis11437992002-04-12 09:54:03 +000015642 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015644
Martin v. Löwis11437992002-04-12 09:54:03 +000015645rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015646{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15647echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015648
15649# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015650case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15651 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015652 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15653echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15654 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15655echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015656 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015657 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015658 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015659 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15660echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15661 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15662echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15663 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15664echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15665 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15666echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15667 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15668echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15669 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15670echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015671 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015672## -------------------------------------- ##
15673## Report this to http://bugs.python.org/ ##
15674## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015675_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015676 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015677 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015678esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015679{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15680echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015681if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015682 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015683else
15684 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015685fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015686{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15687echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015688
15689fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015690if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015691 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015692#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015693_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015694
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015696#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015697_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015698
Martin v. Löwis11437992002-04-12 09:54:03 +000015699
15700cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015701#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015702_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015703
15704 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015705 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015706else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015707
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015709 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15710echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015711if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015712 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015713fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015714{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15715echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015716else
Martin v. Löwis11437992002-04-12 09:54:03 +000015717 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015718{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15719echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015720cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015721/* confdefs.h. */
15722_ACEOF
15723cat confdefs.h >>conftest.$ac_ext
15724cat >>conftest.$ac_ext <<_ACEOF
15725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015726$ac_includes_default
15727#include <mach/cthreads.h>
15728_ACEOF
15729rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015730if { (ac_try="$ac_compile"
15731case "(($ac_try" in
15732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15733 *) ac_try_echo=$ac_try;;
15734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015738 grep -v '^ *+' conftest.er1 >conftest.err
15739 rm -f conftest.er1
15740 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742 (exit $ac_status); } && {
15743 test -z "$ac_c_werror_flag" ||
15744 test ! -s conftest.err
15745 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 ac_header_compiler=yes
15747else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015749sed 's/^/| /' conftest.$ac_ext >&5
15750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015751 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753
15754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015755{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15756echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015757
15758# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015759{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15760echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015761cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015762/* confdefs.h. */
15763_ACEOF
15764cat confdefs.h >>conftest.$ac_ext
15765cat >>conftest.$ac_ext <<_ACEOF
15766/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015767#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015768_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769if { (ac_try="$ac_cpp conftest.$ac_ext"
15770case "(($ac_try" in
15771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15772 *) ac_try_echo=$ac_try;;
15773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015777 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 rm -f conftest.er1
15779 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781 (exit $ac_status); } >/dev/null && {
15782 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15783 test ! -s conftest.err
15784 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015785 ac_header_preproc=yes
15786else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015788sed 's/^/| /' conftest.$ac_ext >&5
15789
Martin v. Löwis11437992002-04-12 09:54:03 +000015790 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792
Martin v. Löwis11437992002-04-12 09:54:03 +000015793rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015794{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15795echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015796
15797# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015798case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15799 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015800 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15801echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15802 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15803echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015804 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015805 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015806 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015807 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15808echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15809 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15810echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15811 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15812echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15813 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15814echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15815 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15816echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15817 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15818echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015819 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015820## -------------------------------------- ##
15821## Report this to http://bugs.python.org/ ##
15822## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015823_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015825 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015827{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15828echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015829if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015830 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015831else
15832 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015833fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015834{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15835echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
15837fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015838if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015839 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015840#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015841_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015842
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015844#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015845_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015846
Martin v. Löwis11437992002-04-12 09:54:03 +000015847
15848cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015849#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015850_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015851
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015852 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015853else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015854
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015855 { echo "$as_me:$LINENO: checking for --with-pth" >&5
15856echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015858# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015859if test "${with_pth+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015860 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
15861echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015862 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015863#define WITH_THREAD 1
15864_ACEOF
15865
15866
15867cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015868#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015869_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015870
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015871 LIBS="-lpth $LIBS"
15872 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015874 { echo "$as_me:$LINENO: result: no" >&5
15875echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015876
15877 # Just looking for pthread_create in libpthread is not enough:
15878 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15879 # So we really have to include pthread.h, and then link.
15880 _libs=$LIBS
15881 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015882 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15883echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015885/* confdefs.h. */
15886_ACEOF
15887cat confdefs.h >>conftest.$ac_ext
15888cat >>conftest.$ac_ext <<_ACEOF
15889/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015890#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015891
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015892void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015893int
15894main ()
15895{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015896
15897pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015898 ;
15899 return 0;
15900}
15901_ACEOF
15902rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015903if { (ac_try="$ac_link"
15904case "(($ac_try" in
15905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15906 *) ac_try_echo=$ac_try;;
15907esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015911 grep -v '^ *+' conftest.er1 >conftest.err
15912 rm -f conftest.er1
15913 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915 (exit $ac_status); } && {
15916 test -z "$ac_c_werror_flag" ||
15917 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015918 } && test -s conftest$ac_exeext &&
15919 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015920
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015921 { echo "$as_me:$LINENO: result: yes" >&5
15922echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015923 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015924#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015925_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015926
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015927 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015928 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015929else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015931sed 's/^/| /' conftest.$ac_ext >&5
15932
Martin v. Löwis11437992002-04-12 09:54:03 +000015933
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015934 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015935 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15936echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015937if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015938 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015939else
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015941/* confdefs.h. */
15942_ACEOF
15943cat confdefs.h >>conftest.$ac_ext
15944cat >>conftest.$ac_ext <<_ACEOF
15945/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015946/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15947 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15948#define pthread_detach innocuous_pthread_detach
15949
Guido van Rossumad678af1998-10-02 14:42:15 +000015950/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015951 which can conflict with char pthread_detach (); below.
15952 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015953 <limits.h> exists even on freestanding compilers. */
15954
15955#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015956# include <limits.h>
15957#else
15958# include <assert.h>
15959#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015960
15961#undef pthread_detach
15962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015963/* Override any GCC internal prototype to avoid an error.
15964 Use char because int might match the return type of a GCC
15965 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015966#ifdef __cplusplus
15967extern "C"
15968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015969char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015970/* The GNU C library defines this for functions which it implements
15971 to always fail with ENOSYS. Some functions are actually named
15972 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015973#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015974choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015975#endif
15976
Skip Montanaro6dead952003-09-25 14:50:04 +000015977int
15978main ()
15979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015980return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015981 ;
15982 return 0;
15983}
15984_ACEOF
15985rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015986if { (ac_try="$ac_link"
15987case "(($ac_try" in
15988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15989 *) ac_try_echo=$ac_try;;
15990esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015992 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015994 grep -v '^ *+' conftest.er1 >conftest.err
15995 rm -f conftest.er1
15996 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015998 (exit $ac_status); } && {
15999 test -z "$ac_c_werror_flag" ||
16000 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016001 } && test -s conftest$ac_exeext &&
16002 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016003 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016004else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016006sed 's/^/| /' conftest.$ac_ext >&5
16007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016010
16011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016012 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016013fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016014{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16015echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16016if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016018#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016020
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016021 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016022 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016023else
Guido van Rossumad678af1998-10-02 14:42:15 +000016024
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016025 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016026 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16027echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016028if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016029 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016030fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016031{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16032echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016033else
16034 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016035{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16036echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016037cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016038/* confdefs.h. */
16039_ACEOF
16040cat confdefs.h >>conftest.$ac_ext
16041cat >>conftest.$ac_ext <<_ACEOF
16042/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016043$ac_includes_default
16044#include <atheos/threads.h>
16045_ACEOF
16046rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016047if { (ac_try="$ac_compile"
16048case "(($ac_try" in
16049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16050 *) ac_try_echo=$ac_try;;
16051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016053 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016055 grep -v '^ *+' conftest.er1 >conftest.err
16056 rm -f conftest.er1
16057 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016059 (exit $ac_status); } && {
16060 test -z "$ac_c_werror_flag" ||
16061 test ! -s conftest.err
16062 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016063 ac_header_compiler=yes
16064else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016066sed 's/^/| /' conftest.$ac_ext >&5
16067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016068 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070
16071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016072{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16073echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016074
16075# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016076{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16077echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016079/* confdefs.h. */
16080_ACEOF
16081cat confdefs.h >>conftest.$ac_ext
16082cat >>conftest.$ac_ext <<_ACEOF
16083/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016084#include <atheos/threads.h>
16085_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016086if { (ac_try="$ac_cpp conftest.$ac_ext"
16087case "(($ac_try" in
16088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16089 *) ac_try_echo=$ac_try;;
16090esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016092 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016093 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016094 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016095 rm -f conftest.er1
16096 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016098 (exit $ac_status); } >/dev/null && {
16099 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16100 test ! -s conftest.err
16101 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016102 ac_header_preproc=yes
16103else
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
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016107 ac_header_preproc=no
16108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016109
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016110rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016111{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16112echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016113
16114# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016115case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16116 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016117 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16118echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16119 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16120echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016121 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016122 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016123 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016124 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16125echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16126 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16127echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16128 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16129echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16130 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16131echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16132 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16133echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16134 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16135echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000016137## -------------------------------------- ##
16138## Report this to http://bugs.python.org/ ##
16139## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016140_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016142 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016143esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016144{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16145echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016146if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016147 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016148else
16149 ac_cv_header_atheos_threads_h=$ac_header_preproc
16150fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016151{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16152echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016153
16154fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016155if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016156 cat >>confdefs.h <<\_ACEOF
16157#define WITH_THREAD 1
16158_ACEOF
16159
16160
16161cat >>confdefs.h <<\_ACEOF
16162#define ATHEOS_THREADS 1
16163_ACEOF
16164
16165 THREADOBJ="Python/thread.o"
16166else
16167
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016168 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16169echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016170if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016172else
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016174LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016175cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016176/* confdefs.h. */
16177_ACEOF
16178cat confdefs.h >>conftest.$ac_ext
16179cat >>conftest.$ac_ext <<_ACEOF
16180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016182/* Override any GCC internal prototype to avoid an error.
16183 Use char because int might match the return type of a GCC
16184 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016185#ifdef __cplusplus
16186extern "C"
16187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016188char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016189int
16190main ()
16191{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 ;
16194 return 0;
16195}
16196_ACEOF
16197rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016198if { (ac_try="$ac_link"
16199case "(($ac_try" in
16200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16201 *) ac_try_echo=$ac_try;;
16202esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016206 grep -v '^ *+' conftest.er1 >conftest.err
16207 rm -f conftest.er1
16208 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210 (exit $ac_status); } && {
16211 test -z "$ac_c_werror_flag" ||
16212 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016213 } && test -s conftest$ac_exeext &&
16214 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016215 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016216else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016218sed 's/^/| /' conftest.$ac_ext >&5
16219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222
16223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016224 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016225LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016226fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016227{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16228echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16229if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016231#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016232_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016233
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016234 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016235 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016236 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016237else
Greg Steinadf63d62000-07-05 10:38:09 +000016238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016239 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16240echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016241if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016242 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016243else
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016245LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016247/* confdefs.h. */
16248_ACEOF
16249cat confdefs.h >>conftest.$ac_ext
16250cat >>conftest.$ac_ext <<_ACEOF
16251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016253/* Override any GCC internal prototype to avoid an error.
16254 Use char because int might match the return type of a GCC
16255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016256#ifdef __cplusplus
16257extern "C"
16258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016259char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016260int
16261main ()
16262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016264 ;
16265 return 0;
16266}
16267_ACEOF
16268rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269if { (ac_try="$ac_link"
16270case "(($ac_try" in
16271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16272 *) ac_try_echo=$ac_try;;
16273esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016277 grep -v '^ *+' conftest.er1 >conftest.err
16278 rm -f conftest.er1
16279 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281 (exit $ac_status); } && {
16282 test -z "$ac_c_werror_flag" ||
16283 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016284 } && test -s conftest$ac_exeext &&
16285 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016286 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016287else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016289sed 's/^/| /' conftest.$ac_ext >&5
16290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016291 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293
16294rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016295 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016296LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016297fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016298{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16299echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16300if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016302#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016303_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016304
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016305 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016306 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016307 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016308else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016310 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16311echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016312if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016314else
Martin v. Löwis11437992002-04-12 09:54:03 +000016315 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016316LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016318/* confdefs.h. */
16319_ACEOF
16320cat confdefs.h >>conftest.$ac_ext
16321cat >>conftest.$ac_ext <<_ACEOF
16322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324/* Override any GCC internal prototype to avoid an error.
16325 Use char because int might match the return type of a GCC
16326 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016327#ifdef __cplusplus
16328extern "C"
16329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016330char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016331int
16332main ()
16333{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016334return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016335 ;
16336 return 0;
16337}
16338_ACEOF
16339rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340if { (ac_try="$ac_link"
16341case "(($ac_try" in
16342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16343 *) ac_try_echo=$ac_try;;
16344esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016346 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016348 grep -v '^ *+' conftest.er1 >conftest.err
16349 rm -f conftest.er1
16350 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016352 (exit $ac_status); } && {
16353 test -z "$ac_c_werror_flag" ||
16354 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016355 } && test -s conftest$ac_exeext &&
16356 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016358else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016360sed 's/^/| /' conftest.$ac_ext >&5
16361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016362 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016364
16365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016367LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016368fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016369{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16370echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16371if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016372 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016373#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016374_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016376 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016377 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016378 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016379else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016380
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016381 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16382echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016383if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016385else
Martin v. Löwis11437992002-04-12 09:54:03 +000016386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016387LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016389/* confdefs.h. */
16390_ACEOF
16391cat confdefs.h >>conftest.$ac_ext
16392cat >>conftest.$ac_ext <<_ACEOF
16393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395/* Override any GCC internal prototype to avoid an error.
16396 Use char because int might match the return type of a GCC
16397 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016398#ifdef __cplusplus
16399extern "C"
16400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016401char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016402int
16403main ()
16404{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016405return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016406 ;
16407 return 0;
16408}
16409_ACEOF
16410rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016411if { (ac_try="$ac_link"
16412case "(($ac_try" in
16413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16414 *) ac_try_echo=$ac_try;;
16415esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016417 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016419 grep -v '^ *+' conftest.er1 >conftest.err
16420 rm -f conftest.er1
16421 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016423 (exit $ac_status); } && {
16424 test -z "$ac_c_werror_flag" ||
16425 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016426 } && test -s conftest$ac_exeext &&
16427 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016428 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016429else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016431sed 's/^/| /' conftest.$ac_ext >&5
16432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016433 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016435
16436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016438LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016439fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016440{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16441echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16442if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016443 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016444#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016445_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016446
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016447 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016448 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016449 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016450else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016451
Martin v. Löwis130fb172001-07-19 11:00:41 +000016452 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016453fi
16454
Guido van Rossum627b2d71993-12-24 10:39:16 +000016455
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016456fi
16457
Guido van Rossum0be3e491997-05-22 20:33:33 +000016458fi
16459
Guido van Rossum49545951997-12-02 19:28:29 +000016460fi
16461
Guido van Rossumb93a8621998-05-07 13:27:32 +000016462fi
16463
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016464
Michael W. Hudson54241132001-12-07 15:38:26 +000016465fi
16466
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016468
16469rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016470 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016471fi
16472
Martin v. Löwis11437992002-04-12 09:54:03 +000016473fi
16474
16475
16476fi
16477
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016478
Michael W. Hudson54241132001-12-07 15:38:26 +000016479
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016480 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16481echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016482if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016483 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016484else
Martin v. Löwis11437992002-04-12 09:54:03 +000016485 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016486LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016487cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016488/* confdefs.h. */
16489_ACEOF
16490cat confdefs.h >>conftest.$ac_ext
16491cat >>conftest.$ac_ext <<_ACEOF
16492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016494/* Override any GCC internal prototype to avoid an error.
16495 Use char because int might match the return type of a GCC
16496 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016497#ifdef __cplusplus
16498extern "C"
16499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016500char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016501int
16502main ()
16503{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016504return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016505 ;
16506 return 0;
16507}
16508_ACEOF
16509rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016510if { (ac_try="$ac_link"
16511case "(($ac_try" in
16512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16513 *) ac_try_echo=$ac_try;;
16514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016518 grep -v '^ *+' conftest.er1 >conftest.err
16519 rm -f conftest.er1
16520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522 (exit $ac_status); } && {
16523 test -z "$ac_c_werror_flag" ||
16524 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016525 } && test -s conftest$ac_exeext &&
16526 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016528else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016530sed 's/^/| /' conftest.$ac_ext >&5
16531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016532 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534
16535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016537LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016538fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016539{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16540echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16541if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016543#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016544_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016545
Martin v. Löwis130fb172001-07-19 11:00:41 +000016546 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016547 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016548 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016549fi
16550
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016551
Neal Norwitza978ab02002-11-02 16:58:05 +000016552 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016553 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16554echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016555if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016556 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016557else
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016559LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016560cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016561/* confdefs.h. */
16562_ACEOF
16563cat confdefs.h >>conftest.$ac_ext
16564cat >>conftest.$ac_ext <<_ACEOF
16565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567/* Override any GCC internal prototype to avoid an error.
16568 Use char because int might match the return type of a GCC
16569 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016570#ifdef __cplusplus
16571extern "C"
16572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016573char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016574int
16575main ()
16576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016577return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 ;
16579 return 0;
16580}
16581_ACEOF
16582rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583if { (ac_try="$ac_link"
16584case "(($ac_try" in
16585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16586 *) ac_try_echo=$ac_try;;
16587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016589 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016591 grep -v '^ *+' conftest.er1 >conftest.err
16592 rm -f conftest.er1
16593 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016595 (exit $ac_status); } && {
16596 test -z "$ac_c_werror_flag" ||
16597 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016598 } && test -s conftest$ac_exeext &&
16599 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016600 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016601else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016603sed 's/^/| /' conftest.$ac_ext >&5
16604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016607
16608rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016609 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016610LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016611fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016612{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16613echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16614if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016615 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016616#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016617_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016618
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016619 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016620 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016621 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016622fi
16623
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016624 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016625
Martin v. Löwis130fb172001-07-19 11:00:41 +000016626 if test "$USE_THREAD_MODULE" != "#"
16627 then
16628 # If the above checks didn't disable threads, (at least) OSF1
16629 # needs this '-threads' argument during linking.
16630 case $ac_sys_system in
16631 OSF1) LDLAST=-threads;;
16632 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016633 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016634fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016635
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016636if test "$posix_threads" = "yes"; then
16637 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016638
16639cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016640#define _POSIX_THREADS 1
16641_ACEOF
16642
16643 fi
16644
16645 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16646 case $ac_sys_system/$ac_sys_release in
16647 SunOS/5.6)
16648cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016649#define HAVE_PTHREAD_DESTRUCTOR 1
16650_ACEOF
16651
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016652 ;;
16653 SunOS/5.8)
16654cat >>confdefs.h <<\_ACEOF
16655#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16656_ACEOF
16657
16658 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016659 AIX/5)
16660cat >>confdefs.h <<\_ACEOF
16661#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16662_ACEOF
16663
16664 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016665 esac
16666
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016667 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16668echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016669 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016670 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016671else
16672 if test "$cross_compiling" = yes; then
16673 ac_cv_pthread_system_supported=no
16674else
16675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016676/* confdefs.h. */
16677_ACEOF
16678cat confdefs.h >>conftest.$ac_ext
16679cat >>conftest.$ac_ext <<_ACEOF
16680/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016681#include <pthread.h>
16682 void *foo(void *parm) {
16683 return NULL;
16684 }
16685 main() {
16686 pthread_attr_t attr;
16687 pthread_t id;
16688 if (pthread_attr_init(&attr)) exit(-1);
16689 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16690 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16691 exit(0);
16692 }
16693_ACEOF
16694rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695if { (ac_try="$ac_link"
16696case "(($ac_try" in
16697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16698 *) ac_try_echo=$ac_try;;
16699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016702 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705 { (case "(($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_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016711 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016713 (exit $ac_status); }; }; then
16714 ac_cv_pthread_system_supported=yes
16715else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016716 echo "$as_me: program exited with status $ac_status" >&5
16717echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016718sed 's/^/| /' conftest.$ac_ext >&5
16719
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016720( exit $ac_status )
16721ac_cv_pthread_system_supported=no
16722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723rm -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 +000016724fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726
16727
Guido van Rossum627b2d71993-12-24 10:39:16 +000016728fi
16729
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016730 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16731echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016732 if test "$ac_cv_pthread_system_supported" = "yes"; then
16733
16734cat >>confdefs.h <<\_ACEOF
16735#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16736_ACEOF
16737
16738 fi
16739
16740for ac_func in pthread_sigmask
16741do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016742as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16743{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16744echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016746 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016747else
16748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016749/* confdefs.h. */
16750_ACEOF
16751cat confdefs.h >>conftest.$ac_ext
16752cat >>conftest.$ac_ext <<_ACEOF
16753/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016754/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16755 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16756#define $ac_func innocuous_$ac_func
16757
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016758/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016759 which can conflict with char $ac_func (); below.
16760 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016761 <limits.h> exists even on freestanding compilers. */
16762
16763#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016764# include <limits.h>
16765#else
16766# include <assert.h>
16767#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016768
16769#undef $ac_func
16770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771/* Override any GCC internal prototype to avoid an error.
16772 Use char because int might match the return type of a GCC
16773 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016774#ifdef __cplusplus
16775extern "C"
16776#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016777char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016778/* The GNU C library defines this for functions which it implements
16779 to always fail with ENOSYS. Some functions are actually named
16780 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016781#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016782choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016783#endif
16784
Skip Montanaro6dead952003-09-25 14:50:04 +000016785int
16786main ()
16787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016789 ;
16790 return 0;
16791}
16792_ACEOF
16793rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016794if { (ac_try="$ac_link"
16795case "(($ac_try" in
16796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16797 *) ac_try_echo=$ac_try;;
16798esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016800 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016802 grep -v '^ *+' conftest.er1 >conftest.err
16803 rm -f conftest.er1
16804 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806 (exit $ac_status); } && {
16807 test -z "$ac_c_werror_flag" ||
16808 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016809 } && test -s conftest$ac_exeext &&
16810 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016811 eval "$as_ac_var=yes"
16812else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016814sed 's/^/| /' conftest.$ac_ext >&5
16815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016818
16819rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016821fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016822ac_res=`eval echo '${'$as_ac_var'}'`
16823 { echo "$as_me:$LINENO: result: $ac_res" >&5
16824echo "${ECHO_T}$ac_res" >&6; }
16825if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016826 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016827#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016828_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016829 case $ac_sys_system in
16830 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016831
Jason Tishlerfac083d2003-07-22 15:20:49 +000016832cat >>confdefs.h <<\_ACEOF
16833#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16834_ACEOF
16835
16836 ;;
16837 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016838fi
16839done
16840
16841fi
16842
16843
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016844# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016845
16846
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016847{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16848echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016849# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016850if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016852 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016853 { echo "$as_me:$LINENO: result: no" >&5
16854echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016855 ipv6=no
16856 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016857 *) { echo "$as_me:$LINENO: result: yes" >&5
16858echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016859 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016860#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016861_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016862
16863 ipv6=yes
16864 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016865 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016866else
Martin v. Löwis11437992002-04-12 09:54:03 +000016867
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016868 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016869 { echo "$as_me:$LINENO: result: no" >&5
16870echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016871 ipv6=no
16872
16873else
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016875/* confdefs.h. */
16876_ACEOF
16877cat confdefs.h >>conftest.$ac_ext
16878cat >>conftest.$ac_ext <<_ACEOF
16879/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016880 /* AF_INET6 available check */
16881#include <sys/types.h>
16882#include <sys/socket.h>
16883main()
16884{
16885 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16886 exit(1);
16887 else
16888 exit(0);
16889}
16890
Martin v. Löwis11437992002-04-12 09:54:03 +000016891_ACEOF
16892rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893if { (ac_try="$ac_link"
16894case "(($ac_try" in
16895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16896 *) ac_try_echo=$ac_try;;
16897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016900 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016902 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016903 { (case "(($ac_try" in
16904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16905 *) ac_try_echo=$ac_try;;
16906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016908 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016912 { echo "$as_me:$LINENO: result: yes" >&5
16913echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016914 ipv6=yes
16915else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016916 echo "$as_me: program exited with status $ac_status" >&5
16917echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016918sed 's/^/| /' conftest.$ac_ext >&5
16919
Martin v. Löwis11437992002-04-12 09:54:03 +000016920( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016921{ echo "$as_me:$LINENO: result: no" >&5
16922echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016923 ipv6=no
16924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016925rm -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 +000016926fi
16927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016928
16929
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016930if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016931 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16932echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016934/* confdefs.h. */
16935_ACEOF
16936cat confdefs.h >>conftest.$ac_ext
16937cat >>conftest.$ac_ext <<_ACEOF
16938/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016939#include <sys/types.h>
16940#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016941int
16942main ()
16943{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016944struct sockaddr_in6 x;
16945x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016946 ;
16947 return 0;
16948}
16949_ACEOF
16950rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016951if { (ac_try="$ac_compile"
16952case "(($ac_try" in
16953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16954 *) ac_try_echo=$ac_try;;
16955esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016959 grep -v '^ *+' conftest.er1 >conftest.err
16960 rm -f conftest.er1
16961 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016963 (exit $ac_status); } && {
16964 test -z "$ac_c_werror_flag" ||
16965 test ! -s conftest.err
16966 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016967 { echo "$as_me:$LINENO: result: yes" >&5
16968echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016969 ipv6=yes
16970else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016972sed 's/^/| /' conftest.$ac_ext >&5
16973
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016974 { echo "$as_me:$LINENO: result: no" >&5
16975echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016976 ipv6=no
16977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978
16979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016980fi
16981
16982if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016983 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016984#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016985_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016986
16987fi
16988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016989fi
16990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016991
16992ipv6type=unknown
16993ipv6lib=none
16994ipv6trylibc=no
16995
16996if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016997 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16998echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016999 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17000 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017001 case $i in
17002 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017004/* confdefs.h. */
17005_ACEOF
17006cat confdefs.h >>conftest.$ac_ext
17007cat >>conftest.$ac_ext <<_ACEOF
17008/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017009
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017010#include <netinet/in.h>
17011#ifdef IPV6_INRIA_VERSION
17012yes
17013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017014_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017016 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017017 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017018fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017019rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017020
17021 ;;
17022 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017024/* confdefs.h. */
17025_ACEOF
17026cat confdefs.h >>conftest.$ac_ext
17027cat >>conftest.$ac_ext <<_ACEOF
17028/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017029
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017030#include <netinet/in.h>
17031#ifdef __KAME__
17032yes
17033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017034_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017035if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017036 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017037 ipv6type=$i;
17038 ipv6lib=inet6
17039 ipv6libdir=/usr/local/v6/lib
17040 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017041fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017042rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017043
17044 ;;
17045 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017047/* confdefs.h. */
17048_ACEOF
17049cat confdefs.h >>conftest.$ac_ext
17050cat >>conftest.$ac_ext <<_ACEOF
17051/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017052
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017053#include <features.h>
17054#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17055yes
17056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017057_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017059 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017060 ipv6type=$i;
17061 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017062fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017063rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017064
17065 ;;
17066 linux-inet6)
17067 if test -d /usr/inet6; then
17068 ipv6type=$i
17069 ipv6lib=inet6
17070 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017071 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017072 fi
17073 ;;
17074 solaris)
17075 if test -f /etc/netconfig; then
17076 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17077 ipv6type=$i
17078 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017079 fi
17080 fi
17081 ;;
17082 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017084/* confdefs.h. */
17085_ACEOF
17086cat confdefs.h >>conftest.$ac_ext
17087cat >>conftest.$ac_ext <<_ACEOF
17088/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017089
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017090#include <sys/param.h>
17091#ifdef _TOSHIBA_INET6
17092yes
17093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017094_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017095if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017096 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017097 ipv6type=$i;
17098 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017099 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017100fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017101rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017102
17103 ;;
17104 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017106/* confdefs.h. */
17107_ACEOF
17108cat confdefs.h >>conftest.$ac_ext
17109cat >>conftest.$ac_ext <<_ACEOF
17110/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017111
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017112#include </usr/local/v6/include/sys/v6config.h>
17113#ifdef __V6D__
17114yes
17115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017116_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017118 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017119 ipv6type=$i;
17120 ipv6lib=v6;
17121 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017122 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017123fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017124rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017125
17126 ;;
17127 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017129/* confdefs.h. */
17130_ACEOF
17131cat confdefs.h >>conftest.$ac_ext
17132cat >>conftest.$ac_ext <<_ACEOF
17133/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017135#include <sys/param.h>
17136#ifdef _ZETA_MINAMI_INET6
17137yes
17138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017139_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017141 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017142 ipv6type=$i;
17143 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017144 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017145fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017146rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017147
17148 ;;
17149 esac
17150 if test "$ipv6type" != "unknown"; then
17151 break
17152 fi
17153 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017154 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17155echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017156fi
17157
17158if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17159 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17160 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17161 echo "using lib$ipv6lib"
17162 else
17163 if test $ipv6trylibc = "yes"; then
17164 echo "using libc"
17165 else
17166 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17167 echo "You need to fetch lib$ipv6lib.a from appropriate"
17168 echo 'ipv6 kit and compile beforehand.'
17169 exit 1
17170 fi
17171 fi
17172fi
17173
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017174{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17175echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017176cat >conftest.$ac_ext <<_ACEOF
17177/* confdefs.h. */
17178_ACEOF
17179cat confdefs.h >>conftest.$ac_ext
17180cat >>conftest.$ac_ext <<_ACEOF
17181/* end confdefs.h. */
17182#include <Carbon/Carbon.h>
17183int
17184main ()
17185{
17186FSIORefNum fRef = 0
17187 ;
17188 return 0;
17189}
17190_ACEOF
17191rm -f conftest.$ac_objext
17192if { (ac_try="$ac_compile"
17193case "(($ac_try" in
17194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17195 *) ac_try_echo=$ac_try;;
17196esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017198 (eval "$ac_compile") 2>conftest.er1
17199 ac_status=$?
17200 grep -v '^ *+' conftest.er1 >conftest.err
17201 rm -f conftest.er1
17202 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017204 (exit $ac_status); } && {
17205 test -z "$ac_c_werror_flag" ||
17206 test ! -s conftest.err
17207 } && test -s conftest.$ac_objext; then
17208
17209cat >>confdefs.h <<\_ACEOF
17210#define HAVE_OSX105_SDK 1
17211_ACEOF
17212
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017213 { echo "$as_me:$LINENO: result: yes" >&5
17214echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017215else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017216 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017217sed 's/^/| /' conftest.$ac_ext >&5
17218
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017219 { echo "$as_me:$LINENO: result: no" >&5
17220echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017221
17222fi
17223
17224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17225
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017226# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017227{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17228echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017231if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232 withval=$with_doc_strings;
17233fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017234
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017235
17236if test -z "$with_doc_strings"
17237then with_doc_strings="yes"
17238fi
17239if test "$with_doc_strings" != "no"
17240then
17241
17242cat >>confdefs.h <<\_ACEOF
17243#define WITH_DOC_STRINGS 1
17244_ACEOF
17245
17246fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017247{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17248echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017249
Neil Schemenauera35c6882001-02-27 04:45:05 +000017250# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017251{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17252echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017254# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017255if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017257if test "$withval" != no
17258then
17259
17260cat >>confdefs.h <<\_ACEOF
17261#define WITH_TSC 1
17262_ACEOF
17263
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017264 { echo "$as_me:$LINENO: result: yes" >&5
17265echo "${ECHO_T}yes" >&6; }
17266else { echo "$as_me:$LINENO: result: no" >&5
17267echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017268fi
17269else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017270 { echo "$as_me:$LINENO: result: no" >&5
17271echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017272fi
17273
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017274
17275# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017276{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17277echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017280if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281 withval=$with_pymalloc;
17282fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017283
Neil Schemenauera35c6882001-02-27 04:45:05 +000017284
Neil Schemenauer16c22972002-03-22 15:34:49 +000017285if test -z "$with_pymalloc"
17286then with_pymalloc="yes"
17287fi
17288if test "$with_pymalloc" != "no"
17289then
Martin v. Löwis11437992002-04-12 09:54:03 +000017290
17291cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017292#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017293_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017294
17295fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017296{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17297echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017298
Barry Warsawef82cd72000-06-30 16:21:01 +000017299# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017300{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17301echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017304if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017306if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017307then
17308
17309cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017310#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017311_ACEOF
17312
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017313 { echo "$as_me:$LINENO: result: yes" >&5
17314echo "${ECHO_T}yes" >&6; }
17315else { echo "$as_me:$LINENO: result: no" >&5
17316echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017317fi
17318else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017319 { echo "$as_me:$LINENO: result: no" >&5
17320echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321fi
17322
Barry Warsawef82cd72000-06-30 16:21:01 +000017323
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017324# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017325
Guido van Rossum98935bf2001-09-05 19:13:16 +000017326DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017327
Guido van Rossume97ee181999-12-20 21:27:22 +000017328# the dlopen() function means we might want to use dynload_shlib.o. some
17329# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017330
Thomas Wouters3a584202000-08-05 23:28:51 +000017331for ac_func in dlopen
17332do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017333as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17334{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17335echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017337 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017338else
Martin v. Löwis11437992002-04-12 09:54:03 +000017339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017340/* confdefs.h. */
17341_ACEOF
17342cat confdefs.h >>conftest.$ac_ext
17343cat >>conftest.$ac_ext <<_ACEOF
17344/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017345/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17346 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17347#define $ac_func innocuous_$ac_func
17348
Guido van Rossume97ee181999-12-20 21:27:22 +000017349/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017350 which can conflict with char $ac_func (); below.
17351 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017352 <limits.h> exists even on freestanding compilers. */
17353
17354#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017355# include <limits.h>
17356#else
17357# include <assert.h>
17358#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017359
17360#undef $ac_func
17361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362/* Override any GCC internal prototype to avoid an error.
17363 Use char because int might match the return type of a GCC
17364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017365#ifdef __cplusplus
17366extern "C"
17367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017368char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017369/* The GNU C library defines this for functions which it implements
17370 to always fail with ENOSYS. Some functions are actually named
17371 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017373choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017374#endif
17375
Skip Montanaro6dead952003-09-25 14:50:04 +000017376int
17377main ()
17378{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017380 ;
17381 return 0;
17382}
17383_ACEOF
17384rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385if { (ac_try="$ac_link"
17386case "(($ac_try" in
17387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17388 *) ac_try_echo=$ac_try;;
17389esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017393 grep -v '^ *+' conftest.er1 >conftest.err
17394 rm -f conftest.er1
17395 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397 (exit $ac_status); } && {
17398 test -z "$ac_c_werror_flag" ||
17399 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017400 } && test -s conftest$ac_exeext &&
17401 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017402 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017403else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017405sed 's/^/| /' conftest.$ac_ext >&5
17406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017407 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409
17410rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017411 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017412fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017413ac_res=`eval echo '${'$as_ac_var'}'`
17414 { echo "$as_me:$LINENO: result: $ac_res" >&5
17415echo "${ECHO_T}$ac_res" >&6; }
17416if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017417 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017418#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017419_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017420
Guido van Rossume97ee181999-12-20 21:27:22 +000017421fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017422done
Guido van Rossume97ee181999-12-20 21:27:22 +000017423
Michael W. Hudson54241132001-12-07 15:38:26 +000017424
Guido van Rossume97ee181999-12-20 21:27:22 +000017425# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17426# loading of modules.
17427
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017428{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17429echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017430if test -z "$DYNLOADFILE"
17431then
17432 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017433 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17434 if test "$ac_cv_func_dlopen" = yes
17435 then DYNLOADFILE="dynload_shlib.o"
17436 else DYNLOADFILE="dynload_aix.o"
17437 fi
17438 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017439 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017440 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17441 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017442 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017443 *)
17444 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17445 # out any dynamic loading
17446 if test "$ac_cv_func_dlopen" = yes
17447 then DYNLOADFILE="dynload_shlib.o"
17448 else DYNLOADFILE="dynload_stub.o"
17449 fi
17450 ;;
17451 esac
17452fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017453{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17454echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017455if test "$DYNLOADFILE" != "dynload_stub.o"
17456then
Martin v. Löwis11437992002-04-12 09:54:03 +000017457
17458cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017459#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017460_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017461
17462fi
17463
Neil Schemenauer4e425612001-06-19 15:44:15 +000017464# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17465
Michael W. Hudson54241132001-12-07 15:38:26 +000017466
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017467{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17468echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017469if test -z "$MACHDEP_OBJS"
17470then
Jack Jansene578a632001-08-15 01:27:14 +000017471 MACHDEP_OBJS=$extra_machdep_objs
17472else
17473 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017474fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017475{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17476echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017477
Guido van Rossum627b2d71993-12-24 10:39:16 +000017478# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
Martin v. Löwisd6320502004-08-12 13:45:08 +000017550
Martin v. Löwisc3001752005-01-23 09:27:24 +000017551
17552
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017553
17554
Thomas Wouterscf297e42007-02-23 15:07:44 +000017555
17556
Gregory P. Smith25523d22007-09-03 16:44:55 +000017557
Christian Heimes4e30a842007-11-30 22:12:06 +000017558
Martin v. Löwis92fab752008-03-08 10:40:41 +000017559
Martin v. Löwis823725e2008-03-24 13:39:54 +000017560
17561
Benjamin Peterson965ce872009-04-05 21:24:58 +000017562
17563
17564
17565
Martin v. Löwis011e8422009-05-05 04:43:17 +000017566
Martin v. Löwis113a0852009-05-29 17:25:39 +000017567
Martin v. Löwis823725e2008-03-24 13:39:54 +000017568for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17569 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017570 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017571 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000017572 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017573 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017574 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017575 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17576 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017577 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000017578 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017579 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017580 truncate uname unsetenv utimes waitpid wait3 wait4 \
17581 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017582do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017583as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17584{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17585echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017586if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017587 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017588else
Martin v. Löwis11437992002-04-12 09:54:03 +000017589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017590/* confdefs.h. */
17591_ACEOF
17592cat confdefs.h >>conftest.$ac_ext
17593cat >>conftest.$ac_ext <<_ACEOF
17594/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017595/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17596 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17597#define $ac_func innocuous_$ac_func
17598
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017599/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017600 which can conflict with char $ac_func (); below.
17601 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017602 <limits.h> exists even on freestanding compilers. */
17603
17604#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017605# include <limits.h>
17606#else
17607# include <assert.h>
17608#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017609
17610#undef $ac_func
17611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017612/* Override any GCC internal prototype to avoid an error.
17613 Use char because int might match the return type of a GCC
17614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017615#ifdef __cplusplus
17616extern "C"
17617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017618char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017619/* The GNU C library defines this for functions which it implements
17620 to always fail with ENOSYS. Some functions are actually named
17621 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017623choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017624#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017625
Skip Montanaro6dead952003-09-25 14:50:04 +000017626int
17627main ()
17628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017630 ;
17631 return 0;
17632}
17633_ACEOF
17634rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635if { (ac_try="$ac_link"
17636case "(($ac_try" in
17637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17638 *) ac_try_echo=$ac_try;;
17639esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017643 grep -v '^ *+' conftest.er1 >conftest.err
17644 rm -f conftest.er1
17645 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647 (exit $ac_status); } && {
17648 test -z "$ac_c_werror_flag" ||
17649 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017650 } && test -s conftest$ac_exeext &&
17651 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017653else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017655sed 's/^/| /' conftest.$ac_ext >&5
17656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659
17660rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017661 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017662fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017663ac_res=`eval echo '${'$as_ac_var'}'`
17664 { echo "$as_me:$LINENO: result: $ac_res" >&5
17665echo "${ECHO_T}$ac_res" >&6; }
17666if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017668#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017669_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017670
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017671fi
17672done
17673
Michael W. Hudson54241132001-12-07 15:38:26 +000017674
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017675# For some functions, having a definition is not sufficient, since
17676# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017677{ echo "$as_me:$LINENO: checking for chroot" >&5
17678echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017680/* confdefs.h. */
17681_ACEOF
17682cat confdefs.h >>conftest.$ac_ext
17683cat >>conftest.$ac_ext <<_ACEOF
17684/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017685#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017686int
17687main ()
17688{
17689void *x=chroot
17690 ;
17691 return 0;
17692}
17693_ACEOF
17694rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017695if { (ac_try="$ac_compile"
17696case "(($ac_try" in
17697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17698 *) ac_try_echo=$ac_try;;
17699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017703 grep -v '^ *+' conftest.er1 >conftest.err
17704 rm -f conftest.er1
17705 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707 (exit $ac_status); } && {
17708 test -z "$ac_c_werror_flag" ||
17709 test ! -s conftest.err
17710 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017711
17712cat >>confdefs.h <<\_ACEOF
17713#define HAVE_CHROOT 1
17714_ACEOF
17715
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017716 { echo "$as_me:$LINENO: result: yes" >&5
17717echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017718else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017720sed 's/^/| /' conftest.$ac_ext >&5
17721
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017722 { echo "$as_me:$LINENO: result: no" >&5
17723echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017724
17725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726
17727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017728{ echo "$as_me:$LINENO: checking for link" >&5
17729echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017730cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017731/* confdefs.h. */
17732_ACEOF
17733cat confdefs.h >>conftest.$ac_ext
17734cat >>conftest.$ac_ext <<_ACEOF
17735/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017736#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017737int
17738main ()
17739{
17740void *x=link
17741 ;
17742 return 0;
17743}
17744_ACEOF
17745rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746if { (ac_try="$ac_compile"
17747case "(($ac_try" in
17748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17749 *) ac_try_echo=$ac_try;;
17750esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017754 grep -v '^ *+' conftest.er1 >conftest.err
17755 rm -f conftest.er1
17756 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758 (exit $ac_status); } && {
17759 test -z "$ac_c_werror_flag" ||
17760 test ! -s conftest.err
17761 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017762
17763cat >>confdefs.h <<\_ACEOF
17764#define HAVE_LINK 1
17765_ACEOF
17766
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017767 { echo "$as_me:$LINENO: result: yes" >&5
17768echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017769else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017771sed 's/^/| /' conftest.$ac_ext >&5
17772
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017773 { echo "$as_me:$LINENO: result: no" >&5
17774echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017775
17776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777
17778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017779{ echo "$as_me:$LINENO: checking for symlink" >&5
17780echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017782/* confdefs.h. */
17783_ACEOF
17784cat confdefs.h >>conftest.$ac_ext
17785cat >>conftest.$ac_ext <<_ACEOF
17786/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017787#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017788int
17789main ()
17790{
17791void *x=symlink
17792 ;
17793 return 0;
17794}
17795_ACEOF
17796rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797if { (ac_try="$ac_compile"
17798case "(($ac_try" in
17799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17800 *) ac_try_echo=$ac_try;;
17801esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017805 grep -v '^ *+' conftest.er1 >conftest.err
17806 rm -f conftest.er1
17807 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809 (exit $ac_status); } && {
17810 test -z "$ac_c_werror_flag" ||
17811 test ! -s conftest.err
17812 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017813
17814cat >>confdefs.h <<\_ACEOF
17815#define HAVE_SYMLINK 1
17816_ACEOF
17817
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017818 { echo "$as_me:$LINENO: result: yes" >&5
17819echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017820else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017822sed 's/^/| /' conftest.$ac_ext >&5
17823
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017824 { echo "$as_me:$LINENO: result: no" >&5
17825echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017826
17827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828
17829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017830{ echo "$as_me:$LINENO: checking for fchdir" >&5
17831echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017832cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017833/* confdefs.h. */
17834_ACEOF
17835cat confdefs.h >>conftest.$ac_ext
17836cat >>conftest.$ac_ext <<_ACEOF
17837/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017838#include <unistd.h>
17839int
17840main ()
17841{
17842void *x=fchdir
17843 ;
17844 return 0;
17845}
17846_ACEOF
17847rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848if { (ac_try="$ac_compile"
17849case "(($ac_try" in
17850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17851 *) ac_try_echo=$ac_try;;
17852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017856 grep -v '^ *+' conftest.er1 >conftest.err
17857 rm -f conftest.er1
17858 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860 (exit $ac_status); } && {
17861 test -z "$ac_c_werror_flag" ||
17862 test ! -s conftest.err
17863 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017864
17865cat >>confdefs.h <<\_ACEOF
17866#define HAVE_FCHDIR 1
17867_ACEOF
17868
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017869 { echo "$as_me:$LINENO: result: yes" >&5
17870echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017871else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017873sed 's/^/| /' conftest.$ac_ext >&5
17874
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017875 { echo "$as_me:$LINENO: result: no" >&5
17876echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017877
17878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879
17880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017881{ echo "$as_me:$LINENO: checking for fsync" >&5
17882echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017883cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017884/* confdefs.h. */
17885_ACEOF
17886cat confdefs.h >>conftest.$ac_ext
17887cat >>conftest.$ac_ext <<_ACEOF
17888/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017889#include <unistd.h>
17890int
17891main ()
17892{
17893void *x=fsync
17894 ;
17895 return 0;
17896}
17897_ACEOF
17898rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899if { (ac_try="$ac_compile"
17900case "(($ac_try" in
17901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17902 *) ac_try_echo=$ac_try;;
17903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017907 grep -v '^ *+' conftest.er1 >conftest.err
17908 rm -f conftest.er1
17909 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017911 (exit $ac_status); } && {
17912 test -z "$ac_c_werror_flag" ||
17913 test ! -s conftest.err
17914 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017915
17916cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017917#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017918_ACEOF
17919
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017920 { echo "$as_me:$LINENO: result: yes" >&5
17921echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017924sed 's/^/| /' conftest.$ac_ext >&5
17925
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017926 { echo "$as_me:$LINENO: result: no" >&5
17927echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017928
17929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017930
17931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017932{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17933echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017935/* confdefs.h. */
17936_ACEOF
17937cat confdefs.h >>conftest.$ac_ext
17938cat >>conftest.$ac_ext <<_ACEOF
17939/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017940#include <unistd.h>
17941int
17942main ()
17943{
17944void *x=fdatasync
17945 ;
17946 return 0;
17947}
17948_ACEOF
17949rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017950if { (ac_try="$ac_compile"
17951case "(($ac_try" in
17952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17953 *) ac_try_echo=$ac_try;;
17954esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017958 grep -v '^ *+' conftest.er1 >conftest.err
17959 rm -f conftest.er1
17960 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017962 (exit $ac_status); } && {
17963 test -z "$ac_c_werror_flag" ||
17964 test ! -s conftest.err
17965 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017966
17967cat >>confdefs.h <<\_ACEOF
17968#define HAVE_FDATASYNC 1
17969_ACEOF
17970
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017971 { echo "$as_me:$LINENO: result: yes" >&5
17972echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017973else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017975sed 's/^/| /' conftest.$ac_ext >&5
17976
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017977 { echo "$as_me:$LINENO: result: no" >&5
17978echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017979
17980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981
17982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017983{ echo "$as_me:$LINENO: checking for epoll" >&5
17984echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017985cat >conftest.$ac_ext <<_ACEOF
17986/* confdefs.h. */
17987_ACEOF
17988cat confdefs.h >>conftest.$ac_ext
17989cat >>conftest.$ac_ext <<_ACEOF
17990/* end confdefs.h. */
17991#include <sys/epoll.h>
17992int
17993main ()
17994{
17995void *x=epoll_create
17996 ;
17997 return 0;
17998}
17999_ACEOF
18000rm -f conftest.$ac_objext
18001if { (ac_try="$ac_compile"
18002case "(($ac_try" in
18003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18004 *) ac_try_echo=$ac_try;;
18005esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018007 (eval "$ac_compile") 2>conftest.er1
18008 ac_status=$?
18009 grep -v '^ *+' conftest.er1 >conftest.err
18010 rm -f conftest.er1
18011 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018013 (exit $ac_status); } && {
18014 test -z "$ac_c_werror_flag" ||
18015 test ! -s conftest.err
18016 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018017
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018018cat >>confdefs.h <<\_ACEOF
18019#define HAVE_EPOLL 1
18020_ACEOF
18021
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018022 { echo "$as_me:$LINENO: result: yes" >&5
18023echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018024else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018025 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018026sed 's/^/| /' conftest.$ac_ext >&5
18027
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018028 { echo "$as_me:$LINENO: result: no" >&5
18029echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018030
18031fi
18032
18033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018034{ echo "$as_me:$LINENO: checking for kqueue" >&5
18035echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018036cat >conftest.$ac_ext <<_ACEOF
18037/* confdefs.h. */
18038_ACEOF
18039cat confdefs.h >>conftest.$ac_ext
18040cat >>conftest.$ac_ext <<_ACEOF
18041/* end confdefs.h. */
18042
18043#include <sys/types.h>
18044#include <sys/event.h>
18045
18046int
18047main ()
18048{
18049int x=kqueue()
18050 ;
18051 return 0;
18052}
18053_ACEOF
18054rm -f conftest.$ac_objext
18055if { (ac_try="$ac_compile"
18056case "(($ac_try" in
18057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18058 *) ac_try_echo=$ac_try;;
18059esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018061 (eval "$ac_compile") 2>conftest.er1
18062 ac_status=$?
18063 grep -v '^ *+' conftest.er1 >conftest.err
18064 rm -f conftest.er1
18065 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018067 (exit $ac_status); } && {
18068 test -z "$ac_c_werror_flag" ||
18069 test ! -s conftest.err
18070 } && test -s conftest.$ac_objext; then
18071
18072cat >>confdefs.h <<\_ACEOF
18073#define HAVE_KQUEUE 1
18074_ACEOF
18075
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018076 { echo "$as_me:$LINENO: result: yes" >&5
18077echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018078else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018079 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018080sed 's/^/| /' conftest.$ac_ext >&5
18081
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018082 { echo "$as_me:$LINENO: result: no" >&5
18083echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018084
18085fi
18086
18087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018088# On some systems (eg. FreeBSD 5), we would find a definition of the
18089# functions ctermid_r, setgroups in the library, but no prototype
18090# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18091# address to avoid compiler warnings and potential miscompilations
18092# because of the missing prototypes.
18093
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018094{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18095echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018097/* confdefs.h. */
18098_ACEOF
18099cat confdefs.h >>conftest.$ac_ext
18100cat >>conftest.$ac_ext <<_ACEOF
18101/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018102
18103#include "confdefs.h"
18104#include <stdio.h>
18105
Martin v. Löwisd5843682002-11-21 20:41:28 +000018106int
18107main ()
18108{
18109void* p = ctermid_r
18110 ;
18111 return 0;
18112}
18113_ACEOF
18114rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115if { (ac_try="$ac_compile"
18116case "(($ac_try" in
18117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18118 *) ac_try_echo=$ac_try;;
18119esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018121 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018123 grep -v '^ *+' conftest.er1 >conftest.err
18124 rm -f conftest.er1
18125 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127 (exit $ac_status); } && {
18128 test -z "$ac_c_werror_flag" ||
18129 test ! -s conftest.err
18130 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018131
18132cat >>confdefs.h <<\_ACEOF
18133#define HAVE_CTERMID_R 1
18134_ACEOF
18135
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018136 { echo "$as_me:$LINENO: result: yes" >&5
18137echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018138else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018140sed 's/^/| /' conftest.$ac_ext >&5
18141
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018142 { echo "$as_me:$LINENO: result: no" >&5
18143echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018144
18145fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18148
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018149{ echo "$as_me:$LINENO: checking for flock" >&5
18150echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018151cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018152/* confdefs.h. */
18153_ACEOF
18154cat confdefs.h >>conftest.$ac_ext
18155cat >>conftest.$ac_ext <<_ACEOF
18156/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018157
18158#include "confdefs.h"
18159#include <sys/file.h>
18160
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018161int
18162main ()
18163{
18164void* p = flock
18165 ;
18166 return 0;
18167}
18168_ACEOF
18169rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170if { (ac_try="$ac_compile"
18171case "(($ac_try" in
18172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18173 *) ac_try_echo=$ac_try;;
18174esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018178 grep -v '^ *+' conftest.er1 >conftest.err
18179 rm -f conftest.er1
18180 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182 (exit $ac_status); } && {
18183 test -z "$ac_c_werror_flag" ||
18184 test ! -s conftest.err
18185 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018186
18187cat >>confdefs.h <<\_ACEOF
18188#define HAVE_FLOCK 1
18189_ACEOF
18190
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018191 { echo "$as_me:$LINENO: result: yes" >&5
18192echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018193else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018195sed 's/^/| /' conftest.$ac_ext >&5
18196
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018197 { echo "$as_me:$LINENO: result: no" >&5
18198echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018199
18200fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18203
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018204{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18205echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018206cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018207/* confdefs.h. */
18208_ACEOF
18209cat confdefs.h >>conftest.$ac_ext
18210cat >>conftest.$ac_ext <<_ACEOF
18211/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018212
18213#include "confdefs.h"
18214#include <unistd.h>
18215
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018216int
18217main ()
18218{
18219void* p = getpagesize
18220 ;
18221 return 0;
18222}
18223_ACEOF
18224rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018225if { (ac_try="$ac_compile"
18226case "(($ac_try" in
18227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18228 *) ac_try_echo=$ac_try;;
18229esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018233 grep -v '^ *+' conftest.er1 >conftest.err
18234 rm -f conftest.er1
18235 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018237 (exit $ac_status); } && {
18238 test -z "$ac_c_werror_flag" ||
18239 test ! -s conftest.err
18240 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018241
18242cat >>confdefs.h <<\_ACEOF
18243#define HAVE_GETPAGESIZE 1
18244_ACEOF
18245
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018246 { echo "$as_me:$LINENO: result: yes" >&5
18247echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018248else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018250sed 's/^/| /' conftest.$ac_ext >&5
18251
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018252 { echo "$as_me:$LINENO: result: no" >&5
18253echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018254
18255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256
18257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018258
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018259for ac_prog in true
18260do
18261 # Extract the first word of "$ac_prog", so it can be a program name with args.
18262set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018263{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18264echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018265if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018266 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018267else
18268 if test -n "$TRUE"; then
18269 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18270else
18271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18272for as_dir in $PATH
18273do
18274 IFS=$as_save_IFS
18275 test -z "$as_dir" && as_dir=.
18276 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018277 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 +000018278 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018279 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018280 break 2
18281 fi
18282done
18283done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018284IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018285
18286fi
18287fi
18288TRUE=$ac_cv_prog_TRUE
18289if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018290 { echo "$as_me:$LINENO: result: $TRUE" >&5
18291echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018293 { echo "$as_me:$LINENO: result: no" >&5
18294echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018295fi
18296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018297
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018298 test -n "$TRUE" && break
18299done
18300test -n "$TRUE" || TRUE="/bin/true"
18301
18302
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018303{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18304echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018305if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018306 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018307else
18308 ac_check_lib_save_LIBS=$LIBS
18309LIBS="-lc $LIBS"
18310cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018311/* confdefs.h. */
18312_ACEOF
18313cat confdefs.h >>conftest.$ac_ext
18314cat >>conftest.$ac_ext <<_ACEOF
18315/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317/* Override any GCC internal prototype to avoid an error.
18318 Use char because int might match the return type of a GCC
18319 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018320#ifdef __cplusplus
18321extern "C"
18322#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018323char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018324int
18325main ()
18326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018327return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018328 ;
18329 return 0;
18330}
18331_ACEOF
18332rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018333if { (ac_try="$ac_link"
18334case "(($ac_try" in
18335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18336 *) ac_try_echo=$ac_try;;
18337esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018339 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018341 grep -v '^ *+' conftest.er1 >conftest.err
18342 rm -f conftest.er1
18343 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018345 (exit $ac_status); } && {
18346 test -z "$ac_c_werror_flag" ||
18347 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018348 } && test -s conftest$ac_exeext &&
18349 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018350 ac_cv_lib_c_inet_aton=yes
18351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018353sed 's/^/| /' conftest.$ac_ext >&5
18354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018355 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018357
18358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018360LIBS=$ac_check_lib_save_LIBS
18361fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018362{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18363echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18364if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018365 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018366else
18367
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018368{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18369echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018370if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018371 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018372else
18373 ac_check_lib_save_LIBS=$LIBS
18374LIBS="-lresolv $LIBS"
18375cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018376/* confdefs.h. */
18377_ACEOF
18378cat confdefs.h >>conftest.$ac_ext
18379cat >>conftest.$ac_ext <<_ACEOF
18380/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018382/* Override any GCC internal prototype to avoid an error.
18383 Use char because int might match the return type of a GCC
18384 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018385#ifdef __cplusplus
18386extern "C"
18387#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018388char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018389int
18390main ()
18391{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018393 ;
18394 return 0;
18395}
18396_ACEOF
18397rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398if { (ac_try="$ac_link"
18399case "(($ac_try" in
18400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18401 *) ac_try_echo=$ac_try;;
18402esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018406 grep -v '^ *+' conftest.er1 >conftest.err
18407 rm -f conftest.er1
18408 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018410 (exit $ac_status); } && {
18411 test -z "$ac_c_werror_flag" ||
18412 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018413 } && test -s conftest$ac_exeext &&
18414 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018415 ac_cv_lib_resolv_inet_aton=yes
18416else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018418sed 's/^/| /' conftest.$ac_ext >&5
18419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018422
18423rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018424 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018425LIBS=$ac_check_lib_save_LIBS
18426fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018427{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18428echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18429if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018430 cat >>confdefs.h <<_ACEOF
18431#define HAVE_LIBRESOLV 1
18432_ACEOF
18433
18434 LIBS="-lresolv $LIBS"
18435
18436fi
18437
18438
18439fi
18440
18441
Christian Heimesd0764e22007-12-04 15:00:33 +000018442# On Tru64, chflags seems to be present, but calling it will
18443# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018444{ echo "$as_me:$LINENO: checking for chflags" >&5
18445echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018446if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018447 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018448else
18449 if test "$cross_compiling" = yes; then
18450 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018451else
18452 cat >conftest.$ac_ext <<_ACEOF
18453/* confdefs.h. */
18454_ACEOF
18455cat confdefs.h >>conftest.$ac_ext
18456cat >>conftest.$ac_ext <<_ACEOF
18457/* end confdefs.h. */
18458
18459#include <sys/stat.h>
18460#include <unistd.h>
18461int main(int argc, char*argv[])
18462{
18463 if(chflags(argv[0], 0) != 0)
18464 return 1;
18465 return 0;
18466}
18467
18468_ACEOF
18469rm -f conftest$ac_exeext
18470if { (ac_try="$ac_link"
18471case "(($ac_try" in
18472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18473 *) ac_try_echo=$ac_try;;
18474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018476 (eval "$ac_link") 2>&5
18477 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018479 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18480 { (case "(($ac_try" in
18481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18482 *) ac_try_echo=$ac_try;;
18483esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018485 (eval "$ac_try") 2>&5
18486 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018488 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018489 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018490else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018491 echo "$as_me: program exited with status $ac_status" >&5
18492echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018493sed 's/^/| /' conftest.$ac_ext >&5
18494
18495( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018496ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018497fi
18498rm -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 +000018499fi
18500
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018501
18502
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018503fi
18504
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018505{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18506echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018507if test $ac_cv_have_chflags = yes
18508then
18509
18510cat >>confdefs.h <<\_ACEOF
18511#define HAVE_CHFLAGS 1
18512_ACEOF
18513
18514fi
18515
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018516{ echo "$as_me:$LINENO: checking for lchflags" >&5
18517echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018518if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018519 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018520else
18521 if test "$cross_compiling" = yes; then
18522 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018523else
18524 cat >conftest.$ac_ext <<_ACEOF
18525/* confdefs.h. */
18526_ACEOF
18527cat confdefs.h >>conftest.$ac_ext
18528cat >>conftest.$ac_ext <<_ACEOF
18529/* end confdefs.h. */
18530
18531#include <sys/stat.h>
18532#include <unistd.h>
18533int main(int argc, char*argv[])
18534{
18535 if(lchflags(argv[0], 0) != 0)
18536 return 1;
18537 return 0;
18538}
18539
18540_ACEOF
18541rm -f conftest$ac_exeext
18542if { (ac_try="$ac_link"
18543case "(($ac_try" in
18544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18545 *) ac_try_echo=$ac_try;;
18546esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018548 (eval "$ac_link") 2>&5
18549 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018551 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18552 { (case "(($ac_try" in
18553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18554 *) ac_try_echo=$ac_try;;
18555esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018557 (eval "$ac_try") 2>&5
18558 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018560 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018561 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018562else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018563 echo "$as_me: program exited with status $ac_status" >&5
18564echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018565sed 's/^/| /' conftest.$ac_ext >&5
18566
18567( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018568ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018569fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18571fi
18572
18573
Christian Heimesd0764e22007-12-04 15:00:33 +000018574
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018575fi
18576
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018577{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18578echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018579if test $ac_cv_have_lchflags = yes
18580then
18581
18582cat >>confdefs.h <<\_ACEOF
18583#define HAVE_LCHFLAGS 1
18584_ACEOF
18585
18586fi
18587
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018588case $ac_sys_system/$ac_sys_release in
18589Darwin/*)
18590 _CUR_CFLAGS="${CFLAGS}"
18591 _CUR_LDFLAGS="${LDFLAGS}"
18592 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18593 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18594 ;;
18595esac
18596
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018597{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18598echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018599if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018600 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018601else
18602 ac_check_lib_save_LIBS=$LIBS
18603LIBS="-lz $LIBS"
18604cat >conftest.$ac_ext <<_ACEOF
18605/* confdefs.h. */
18606_ACEOF
18607cat confdefs.h >>conftest.$ac_ext
18608cat >>conftest.$ac_ext <<_ACEOF
18609/* end confdefs.h. */
18610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611/* Override any GCC internal prototype to avoid an error.
18612 Use char because int might match the return type of a GCC
18613 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018614#ifdef __cplusplus
18615extern "C"
18616#endif
18617char inflateCopy ();
18618int
18619main ()
18620{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018622 ;
18623 return 0;
18624}
18625_ACEOF
18626rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018627if { (ac_try="$ac_link"
18628case "(($ac_try" in
18629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18630 *) ac_try_echo=$ac_try;;
18631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018633 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018634 ac_status=$?
18635 grep -v '^ *+' conftest.er1 >conftest.err
18636 rm -f conftest.er1
18637 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018639 (exit $ac_status); } && {
18640 test -z "$ac_c_werror_flag" ||
18641 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018642 } && test -s conftest$ac_exeext &&
18643 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018644 ac_cv_lib_z_inflateCopy=yes
18645else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018646 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018647sed 's/^/| /' conftest.$ac_ext >&5
18648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018649 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018651
18652rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018653 conftest$ac_exeext conftest.$ac_ext
18654LIBS=$ac_check_lib_save_LIBS
18655fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018656{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18657echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18658if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018659
18660cat >>confdefs.h <<\_ACEOF
18661#define HAVE_ZLIB_COPY 1
18662_ACEOF
18663
18664fi
18665
18666
18667case $ac_sys_system/$ac_sys_release in
18668Darwin/*)
18669 CFLAGS="${_CUR_CFLAGS}"
18670 LDFLAGS="${_CUR_LDFLAGS}"
18671 ;;
18672esac
18673
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018674{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18675echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018676cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018677/* confdefs.h. */
18678_ACEOF
18679cat confdefs.h >>conftest.$ac_ext
18680cat >>conftest.$ac_ext <<_ACEOF
18681/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018682
18683#include "confdefs.h"
18684#include <netdb.h>
18685
Martin v. Löwise9416172003-05-03 10:12:45 +000018686int
18687main ()
18688{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018689void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018690 ;
18691 return 0;
18692}
18693_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018694rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018695if { (ac_try="$ac_link"
18696case "(($ac_try" in
18697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18698 *) ac_try_echo=$ac_try;;
18699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018701 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018703 grep -v '^ *+' conftest.er1 >conftest.err
18704 rm -f conftest.er1
18705 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018707 (exit $ac_status); } && {
18708 test -z "$ac_c_werror_flag" ||
18709 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018710 } && test -s conftest$ac_exeext &&
18711 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018712
18713cat >>confdefs.h <<\_ACEOF
18714#define HAVE_HSTRERROR 1
18715_ACEOF
18716
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018717 { echo "$as_me:$LINENO: result: yes" >&5
18718echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018719else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018721sed 's/^/| /' conftest.$ac_ext >&5
18722
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018723 { echo "$as_me:$LINENO: result: no" >&5
18724echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018725
18726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018727
18728rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018730
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018731{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18732echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018733cat >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öwise9416172003-05-03 10:12:45 +000018739
18740#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018741#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018742#include <sys/socket.h>
18743#include <netinet/in.h>
18744#include <arpa/inet.h>
18745
Martin v. Löwise9416172003-05-03 10:12:45 +000018746int
18747main ()
18748{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018749void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018750 ;
18751 return 0;
18752}
18753_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018754rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018755if { (ac_try="$ac_link"
18756case "(($ac_try" in
18757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18758 *) ac_try_echo=$ac_try;;
18759esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018761 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018763 grep -v '^ *+' conftest.er1 >conftest.err
18764 rm -f conftest.er1
18765 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018767 (exit $ac_status); } && {
18768 test -z "$ac_c_werror_flag" ||
18769 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018770 } && test -s conftest$ac_exeext &&
18771 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018772
18773cat >>confdefs.h <<\_ACEOF
18774#define HAVE_INET_ATON 1
18775_ACEOF
18776
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018777 { echo "$as_me:$LINENO: result: yes" >&5
18778echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018779else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018781sed 's/^/| /' conftest.$ac_ext >&5
18782
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018783 { echo "$as_me:$LINENO: result: no" >&5
18784echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018785
18786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018787
18788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018789 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018790
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018791{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18792echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018793cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018794/* confdefs.h. */
18795_ACEOF
18796cat confdefs.h >>conftest.$ac_ext
18797cat >>conftest.$ac_ext <<_ACEOF
18798/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018799
18800#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018801#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018802#include <sys/socket.h>
18803#include <netinet/in.h>
18804#include <arpa/inet.h>
18805
Martin v. Löwise9416172003-05-03 10:12:45 +000018806int
18807main ()
18808{
18809void* p = inet_pton
18810 ;
18811 return 0;
18812}
18813_ACEOF
18814rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018815if { (ac_try="$ac_compile"
18816case "(($ac_try" in
18817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18818 *) ac_try_echo=$ac_try;;
18819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018823 grep -v '^ *+' conftest.er1 >conftest.err
18824 rm -f conftest.er1
18825 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018827 (exit $ac_status); } && {
18828 test -z "$ac_c_werror_flag" ||
18829 test ! -s conftest.err
18830 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018831
18832cat >>confdefs.h <<\_ACEOF
18833#define HAVE_INET_PTON 1
18834_ACEOF
18835
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018836 { echo "$as_me:$LINENO: result: yes" >&5
18837echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018840sed 's/^/| /' conftest.$ac_ext >&5
18841
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018842 { echo "$as_me:$LINENO: result: no" >&5
18843echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018844
18845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018846
18847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018848
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018849# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018850{ echo "$as_me:$LINENO: checking for setgroups" >&5
18851echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018853/* confdefs.h. */
18854_ACEOF
18855cat confdefs.h >>conftest.$ac_ext
18856cat >>conftest.$ac_ext <<_ACEOF
18857/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018858
18859#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018860#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018861#ifdef HAVE_GRP_H
18862#include <grp.h>
18863#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018864
Martin v. Löwisd5843682002-11-21 20:41:28 +000018865int
18866main ()
18867{
18868void* p = setgroups
18869 ;
18870 return 0;
18871}
18872_ACEOF
18873rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018874if { (ac_try="$ac_compile"
18875case "(($ac_try" in
18876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18877 *) ac_try_echo=$ac_try;;
18878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018882 grep -v '^ *+' conftest.er1 >conftest.err
18883 rm -f conftest.er1
18884 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018886 (exit $ac_status); } && {
18887 test -z "$ac_c_werror_flag" ||
18888 test ! -s conftest.err
18889 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018890
18891cat >>confdefs.h <<\_ACEOF
18892#define HAVE_SETGROUPS 1
18893_ACEOF
18894
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018895 { echo "$as_me:$LINENO: result: yes" >&5
18896echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018899sed 's/^/| /' conftest.$ac_ext >&5
18900
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018901 { echo "$as_me:$LINENO: result: no" >&5
18902echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018903
18904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018905
18906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018907
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018908# check for openpty and forkpty
18909
Martin v. Löwis11437992002-04-12 09:54:03 +000018910
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018911for ac_func in openpty
18912do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018913as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18914{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18915echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018916if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018918else
Martin v. Löwis11437992002-04-12 09:54:03 +000018919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018920/* confdefs.h. */
18921_ACEOF
18922cat confdefs.h >>conftest.$ac_ext
18923cat >>conftest.$ac_ext <<_ACEOF
18924/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018925/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18926 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18927#define $ac_func innocuous_$ac_func
18928
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018929/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018930 which can conflict with char $ac_func (); below.
18931 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018932 <limits.h> exists even on freestanding compilers. */
18933
18934#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018935# include <limits.h>
18936#else
18937# include <assert.h>
18938#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018939
18940#undef $ac_func
18941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018942/* Override any GCC internal prototype to avoid an error.
18943 Use char because int might match the return type of a GCC
18944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018945#ifdef __cplusplus
18946extern "C"
18947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018948char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018949/* The GNU C library defines this for functions which it implements
18950 to always fail with ENOSYS. Some functions are actually named
18951 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018952#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018953choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018954#endif
18955
Skip Montanaro6dead952003-09-25 14:50:04 +000018956int
18957main ()
18958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018959return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018960 ;
18961 return 0;
18962}
18963_ACEOF
18964rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018965if { (ac_try="$ac_link"
18966case "(($ac_try" in
18967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18968 *) ac_try_echo=$ac_try;;
18969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018971 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018973 grep -v '^ *+' conftest.er1 >conftest.err
18974 rm -f conftest.er1
18975 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018977 (exit $ac_status); } && {
18978 test -z "$ac_c_werror_flag" ||
18979 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018980 } && test -s conftest$ac_exeext &&
18981 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018982 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018983else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018985sed 's/^/| /' conftest.$ac_ext >&5
18986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018987 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018989
18990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018991 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018992fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018993ac_res=`eval echo '${'$as_ac_var'}'`
18994 { echo "$as_me:$LINENO: result: $ac_res" >&5
18995echo "${ECHO_T}$ac_res" >&6; }
18996if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018997 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018998#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018999_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019000
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019001else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019002 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19003echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019004if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019005 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019006else
Martin v. Löwis11437992002-04-12 09:54:03 +000019007 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019008LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019010/* confdefs.h. */
19011_ACEOF
19012cat confdefs.h >>conftest.$ac_ext
19013cat >>conftest.$ac_ext <<_ACEOF
19014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019016/* Override any GCC internal prototype to avoid an error.
19017 Use char because int might match the return type of a GCC
19018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019019#ifdef __cplusplus
19020extern "C"
19021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019022char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019023int
19024main ()
19025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019026return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019027 ;
19028 return 0;
19029}
19030_ACEOF
19031rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019032if { (ac_try="$ac_link"
19033case "(($ac_try" in
19034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19035 *) ac_try_echo=$ac_try;;
19036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019038 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019040 grep -v '^ *+' conftest.er1 >conftest.err
19041 rm -f conftest.er1
19042 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019044 (exit $ac_status); } && {
19045 test -z "$ac_c_werror_flag" ||
19046 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019047 } && test -s conftest$ac_exeext &&
19048 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019049 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019050else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019052sed 's/^/| /' conftest.$ac_ext >&5
19053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019054 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019056
19057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019059LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019060fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019061{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19062echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19063if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019064 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019065#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019066_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019067 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019068else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019069 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19070echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019071if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019072 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019073else
19074 ac_check_lib_save_LIBS=$LIBS
19075LIBS="-lbsd $LIBS"
19076cat >conftest.$ac_ext <<_ACEOF
19077/* confdefs.h. */
19078_ACEOF
19079cat confdefs.h >>conftest.$ac_ext
19080cat >>conftest.$ac_ext <<_ACEOF
19081/* end confdefs.h. */
19082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019083/* Override any GCC internal prototype to avoid an error.
19084 Use char because int might match the return type of a GCC
19085 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019086#ifdef __cplusplus
19087extern "C"
19088#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019089char openpty ();
19090int
19091main ()
19092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019093return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019094 ;
19095 return 0;
19096}
19097_ACEOF
19098rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019099if { (ac_try="$ac_link"
19100case "(($ac_try" in
19101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19102 *) ac_try_echo=$ac_try;;
19103esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019105 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019106 ac_status=$?
19107 grep -v '^ *+' conftest.er1 >conftest.err
19108 rm -f conftest.er1
19109 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019111 (exit $ac_status); } && {
19112 test -z "$ac_c_werror_flag" ||
19113 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019114 } && test -s conftest$ac_exeext &&
19115 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019116 ac_cv_lib_bsd_openpty=yes
19117else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019118 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019119sed 's/^/| /' conftest.$ac_ext >&5
19120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019121 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019123
19124rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019125 conftest$ac_exeext conftest.$ac_ext
19126LIBS=$ac_check_lib_save_LIBS
19127fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019128{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19129echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19130if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019131 cat >>confdefs.h <<\_ACEOF
19132#define HAVE_OPENPTY 1
19133_ACEOF
19134 LIBS="$LIBS -lbsd"
19135fi
19136
19137
19138fi
19139
Fred Drake8cef4cf2000-06-28 16:40:38 +000019140
19141fi
19142done
19143
Martin v. Löwis11437992002-04-12 09:54:03 +000019144
Fred Drake8cef4cf2000-06-28 16:40:38 +000019145for ac_func in forkpty
19146do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019147as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19148{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19149echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019150if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019151 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019152else
Martin v. Löwis11437992002-04-12 09:54:03 +000019153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019154/* confdefs.h. */
19155_ACEOF
19156cat confdefs.h >>conftest.$ac_ext
19157cat >>conftest.$ac_ext <<_ACEOF
19158/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019159/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19160 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19161#define $ac_func innocuous_$ac_func
19162
Fred Drake8cef4cf2000-06-28 16:40:38 +000019163/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019164 which can conflict with char $ac_func (); below.
19165 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019166 <limits.h> exists even on freestanding compilers. */
19167
19168#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019169# include <limits.h>
19170#else
19171# include <assert.h>
19172#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019173
19174#undef $ac_func
19175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019176/* Override any GCC internal prototype to avoid an error.
19177 Use char because int might match the return type of a GCC
19178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019179#ifdef __cplusplus
19180extern "C"
19181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019182char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019183/* The GNU C library defines this for functions which it implements
19184 to always fail with ENOSYS. Some functions are actually named
19185 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019186#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019187choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019188#endif
19189
Skip Montanaro6dead952003-09-25 14:50:04 +000019190int
19191main ()
19192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019193return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019194 ;
19195 return 0;
19196}
19197_ACEOF
19198rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019199if { (ac_try="$ac_link"
19200case "(($ac_try" in
19201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19202 *) ac_try_echo=$ac_try;;
19203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019205 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019207 grep -v '^ *+' conftest.er1 >conftest.err
19208 rm -f conftest.er1
19209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019211 (exit $ac_status); } && {
19212 test -z "$ac_c_werror_flag" ||
19213 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019214 } && test -s conftest$ac_exeext &&
19215 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019216 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019217else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019219sed 's/^/| /' conftest.$ac_ext >&5
19220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019221 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019223
19224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019225 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019226fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019227ac_res=`eval echo '${'$as_ac_var'}'`
19228 { echo "$as_me:$LINENO: result: $ac_res" >&5
19229echo "${ECHO_T}$ac_res" >&6; }
19230if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019231 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019232#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019233_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019234
Fred Drake8cef4cf2000-06-28 16:40:38 +000019235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019236 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19237echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019238if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019239 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019240else
Martin v. Löwis11437992002-04-12 09:54:03 +000019241 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019242LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019244/* confdefs.h. */
19245_ACEOF
19246cat confdefs.h >>conftest.$ac_ext
19247cat >>conftest.$ac_ext <<_ACEOF
19248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019250/* Override any GCC internal prototype to avoid an error.
19251 Use char because int might match the return type of a GCC
19252 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019253#ifdef __cplusplus
19254extern "C"
19255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019256char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019257int
19258main ()
19259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019260return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019261 ;
19262 return 0;
19263}
19264_ACEOF
19265rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019266if { (ac_try="$ac_link"
19267case "(($ac_try" in
19268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19269 *) ac_try_echo=$ac_try;;
19270esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019272 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019274 grep -v '^ *+' conftest.er1 >conftest.err
19275 rm -f conftest.er1
19276 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019278 (exit $ac_status); } && {
19279 test -z "$ac_c_werror_flag" ||
19280 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019281 } && test -s conftest$ac_exeext &&
19282 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019283 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019284else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019286sed 's/^/| /' conftest.$ac_ext >&5
19287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019288 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019290
19291rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019293LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019294fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019295{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19296echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19297if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019298 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019299#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019300_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019301 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019303 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19304echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019305if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019306 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019307else
19308 ac_check_lib_save_LIBS=$LIBS
19309LIBS="-lbsd $LIBS"
19310cat >conftest.$ac_ext <<_ACEOF
19311/* confdefs.h. */
19312_ACEOF
19313cat confdefs.h >>conftest.$ac_ext
19314cat >>conftest.$ac_ext <<_ACEOF
19315/* end confdefs.h. */
19316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019317/* Override any GCC internal prototype to avoid an error.
19318 Use char because int might match the return type of a GCC
19319 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019320#ifdef __cplusplus
19321extern "C"
19322#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019323char forkpty ();
19324int
19325main ()
19326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019327return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019328 ;
19329 return 0;
19330}
19331_ACEOF
19332rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019333if { (ac_try="$ac_link"
19334case "(($ac_try" in
19335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19336 *) ac_try_echo=$ac_try;;
19337esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019339 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019340 ac_status=$?
19341 grep -v '^ *+' conftest.er1 >conftest.err
19342 rm -f conftest.er1
19343 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019345 (exit $ac_status); } && {
19346 test -z "$ac_c_werror_flag" ||
19347 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019348 } && test -s conftest$ac_exeext &&
19349 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019350 ac_cv_lib_bsd_forkpty=yes
19351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019352 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019353sed 's/^/| /' conftest.$ac_ext >&5
19354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019355 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019357
19358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019359 conftest$ac_exeext conftest.$ac_ext
19360LIBS=$ac_check_lib_save_LIBS
19361fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019362{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19363echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19364if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019365 cat >>confdefs.h <<\_ACEOF
19366#define HAVE_FORKPTY 1
19367_ACEOF
19368 LIBS="$LIBS -lbsd"
19369fi
19370
19371
19372fi
19373
Fred Drake8cef4cf2000-06-28 16:40:38 +000019374
19375fi
19376done
19377
Jack Jansendd19cf82001-12-06 22:36:17 +000019378
Christian Heimesb186d002008-03-18 15:15:01 +000019379# Stuff for expat.
19380
19381for ac_func in memmove
19382do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019383as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19384{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19385echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019386if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019387 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019388else
19389 cat >conftest.$ac_ext <<_ACEOF
19390/* confdefs.h. */
19391_ACEOF
19392cat confdefs.h >>conftest.$ac_ext
19393cat >>conftest.$ac_ext <<_ACEOF
19394/* end confdefs.h. */
19395/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19396 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19397#define $ac_func innocuous_$ac_func
19398
19399/* System header to define __stub macros and hopefully few prototypes,
19400 which can conflict with char $ac_func (); below.
19401 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19402 <limits.h> exists even on freestanding compilers. */
19403
19404#ifdef __STDC__
19405# include <limits.h>
19406#else
19407# include <assert.h>
19408#endif
19409
19410#undef $ac_func
19411
19412/* Override any GCC internal prototype to avoid an error.
19413 Use char because int might match the return type of a GCC
19414 builtin and then its argument prototype would still apply. */
19415#ifdef __cplusplus
19416extern "C"
19417#endif
19418char $ac_func ();
19419/* The GNU C library defines this for functions which it implements
19420 to always fail with ENOSYS. Some functions are actually named
19421 something starting with __ and the normal name is an alias. */
19422#if defined __stub_$ac_func || defined __stub___$ac_func
19423choke me
19424#endif
19425
19426int
19427main ()
19428{
19429return $ac_func ();
19430 ;
19431 return 0;
19432}
19433_ACEOF
19434rm -f conftest.$ac_objext conftest$ac_exeext
19435if { (ac_try="$ac_link"
19436case "(($ac_try" in
19437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19438 *) ac_try_echo=$ac_try;;
19439esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019441 (eval "$ac_link") 2>conftest.er1
19442 ac_status=$?
19443 grep -v '^ *+' conftest.er1 >conftest.err
19444 rm -f conftest.er1
19445 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019447 (exit $ac_status); } && {
19448 test -z "$ac_c_werror_flag" ||
19449 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019450 } && test -s conftest$ac_exeext &&
19451 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019452 eval "$as_ac_var=yes"
19453else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019454 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019455sed 's/^/| /' conftest.$ac_ext >&5
19456
19457 eval "$as_ac_var=no"
19458fi
19459
19460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19461 conftest$ac_exeext conftest.$ac_ext
19462fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019463ac_res=`eval echo '${'$as_ac_var'}'`
19464 { echo "$as_me:$LINENO: result: $ac_res" >&5
19465echo "${ECHO_T}$ac_res" >&6; }
19466if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019467 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019468#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019469_ACEOF
19470
19471fi
19472done
19473
19474
Michael W. Hudson54241132001-12-07 15:38:26 +000019475# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019476
19477
19478
19479
19480
19481
Fred Drake8cef4cf2000-06-28 16:40:38 +000019482for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19483do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019484as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19485{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19486echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019487if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019489else
Martin v. Löwis11437992002-04-12 09:54:03 +000019490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019491/* confdefs.h. */
19492_ACEOF
19493cat confdefs.h >>conftest.$ac_ext
19494cat >>conftest.$ac_ext <<_ACEOF
19495/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019496/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19497 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19498#define $ac_func innocuous_$ac_func
19499
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019500/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019501 which can conflict with char $ac_func (); below.
19502 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019503 <limits.h> exists even on freestanding compilers. */
19504
19505#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019506# include <limits.h>
19507#else
19508# include <assert.h>
19509#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019510
19511#undef $ac_func
19512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019513/* Override any GCC internal prototype to avoid an error.
19514 Use char because int might match the return type of a GCC
19515 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019516#ifdef __cplusplus
19517extern "C"
19518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019519char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019520/* The GNU C library defines this for functions which it implements
19521 to always fail with ENOSYS. Some functions are actually named
19522 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019523#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019524choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019525#endif
19526
Skip Montanaro6dead952003-09-25 14:50:04 +000019527int
19528main ()
19529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019530return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019531 ;
19532 return 0;
19533}
19534_ACEOF
19535rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019536if { (ac_try="$ac_link"
19537case "(($ac_try" in
19538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19539 *) ac_try_echo=$ac_try;;
19540esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019542 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019544 grep -v '^ *+' conftest.er1 >conftest.err
19545 rm -f conftest.er1
19546 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019548 (exit $ac_status); } && {
19549 test -z "$ac_c_werror_flag" ||
19550 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019551 } && test -s conftest$ac_exeext &&
19552 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019553 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019554else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019556sed 's/^/| /' conftest.$ac_ext >&5
19557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019558 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019560
19561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019562 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019563fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019564ac_res=`eval echo '${'$as_ac_var'}'`
19565 { echo "$as_me:$LINENO: result: $ac_res" >&5
19566echo "${ECHO_T}$ac_res" >&6; }
19567if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019568 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019569#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019570_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019571
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019572fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019573done
19574
Michael W. Hudson54241132001-12-07 15:38:26 +000019575
Martin v. Löwis11437992002-04-12 09:54:03 +000019576
19577
19578
Christian Heimesb186d002008-03-18 15:15:01 +000019579for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019580do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019581as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19582{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19583echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019584if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019585 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019586else
Martin v. Löwis11437992002-04-12 09:54:03 +000019587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019588/* confdefs.h. */
19589_ACEOF
19590cat confdefs.h >>conftest.$ac_ext
19591cat >>conftest.$ac_ext <<_ACEOF
19592/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019593/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19594 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19595#define $ac_func innocuous_$ac_func
19596
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019597/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019598 which can conflict with char $ac_func (); below.
19599 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019600 <limits.h> exists even on freestanding compilers. */
19601
19602#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019603# include <limits.h>
19604#else
19605# include <assert.h>
19606#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019607
19608#undef $ac_func
19609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019610/* Override any GCC internal prototype to avoid an error.
19611 Use char because int might match the return type of a GCC
19612 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019613#ifdef __cplusplus
19614extern "C"
19615#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019616char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019617/* The GNU C library defines this for functions which it implements
19618 to always fail with ENOSYS. Some functions are actually named
19619 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019620#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019621choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019622#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019623
Skip Montanaro6dead952003-09-25 14:50:04 +000019624int
19625main ()
19626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019627return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019628 ;
19629 return 0;
19630}
19631_ACEOF
19632rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019633if { (ac_try="$ac_link"
19634case "(($ac_try" in
19635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19636 *) ac_try_echo=$ac_try;;
19637esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019639 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019641 grep -v '^ *+' conftest.er1 >conftest.err
19642 rm -f conftest.er1
19643 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019645 (exit $ac_status); } && {
19646 test -z "$ac_c_werror_flag" ||
19647 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019648 } && test -s conftest$ac_exeext &&
19649 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019650 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019651else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019653sed 's/^/| /' conftest.$ac_ext >&5
19654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019655 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019657
19658rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019660fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019661ac_res=`eval echo '${'$as_ac_var'}'`
19662 { echo "$as_me:$LINENO: result: $ac_res" >&5
19663echo "${ECHO_T}$ac_res" >&6; }
19664if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019665 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019666#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019667_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019668
Martin v. Löwis1142de32002-03-29 16:28:31 +000019669else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019670 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019671 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019672 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19673 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019674esac
19675
Martin v. Löwis1142de32002-03-29 16:28:31 +000019676fi
19677done
19678
19679
Martin v. Löwis11437992002-04-12 09:54:03 +000019680
Martin v. Löwis1142de32002-03-29 16:28:31 +000019681for ac_func in getpgrp
19682do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019683as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19684{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19685echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019686if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019687 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019688else
Martin v. Löwis11437992002-04-12 09:54:03 +000019689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019690/* confdefs.h. */
19691_ACEOF
19692cat confdefs.h >>conftest.$ac_ext
19693cat >>conftest.$ac_ext <<_ACEOF
19694/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019695/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19696 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19697#define $ac_func innocuous_$ac_func
19698
Martin v. Löwis1142de32002-03-29 16:28:31 +000019699/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019700 which can conflict with char $ac_func (); below.
19701 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019702 <limits.h> exists even on freestanding compilers. */
19703
19704#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019705# include <limits.h>
19706#else
19707# include <assert.h>
19708#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019709
19710#undef $ac_func
19711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019712/* Override any GCC internal prototype to avoid an error.
19713 Use char because int might match the return type of a GCC
19714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019715#ifdef __cplusplus
19716extern "C"
19717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019718char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019719/* The GNU C library defines this for functions which it implements
19720 to always fail with ENOSYS. Some functions are actually named
19721 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019722#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019723choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019724#endif
19725
Skip Montanaro6dead952003-09-25 14:50:04 +000019726int
19727main ()
19728{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019729return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019730 ;
19731 return 0;
19732}
19733_ACEOF
19734rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019735if { (ac_try="$ac_link"
19736case "(($ac_try" in
19737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19738 *) ac_try_echo=$ac_try;;
19739esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019741 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019743 grep -v '^ *+' conftest.er1 >conftest.err
19744 rm -f conftest.er1
19745 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019747 (exit $ac_status); } && {
19748 test -z "$ac_c_werror_flag" ||
19749 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019750 } && test -s conftest$ac_exeext &&
19751 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019752 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019753else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019755sed 's/^/| /' conftest.$ac_ext >&5
19756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019757 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019759
19760rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019761 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019762fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019763ac_res=`eval echo '${'$as_ac_var'}'`
19764 { echo "$as_me:$LINENO: result: $ac_res" >&5
19765echo "${ECHO_T}$ac_res" >&6; }
19766if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019767 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019768#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019769_ACEOF
19770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019771/* confdefs.h. */
19772_ACEOF
19773cat confdefs.h >>conftest.$ac_ext
19774cat >>conftest.$ac_ext <<_ACEOF
19775/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019776#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019777int
19778main ()
19779{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019780getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019781 ;
19782 return 0;
19783}
19784_ACEOF
19785rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019786if { (ac_try="$ac_compile"
19787case "(($ac_try" in
19788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19789 *) ac_try_echo=$ac_try;;
19790esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019794 grep -v '^ *+' conftest.er1 >conftest.err
19795 rm -f conftest.er1
19796 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019798 (exit $ac_status); } && {
19799 test -z "$ac_c_werror_flag" ||
19800 test ! -s conftest.err
19801 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019802
19803cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019804#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019805_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019806
Martin v. Löwis11437992002-04-12 09:54:03 +000019807
Guido van Rossumf78abae1997-01-21 22:02:36 +000019808else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019810sed 's/^/| /' conftest.$ac_ext >&5
19811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019812
Guido van Rossum627b2d71993-12-24 10:39:16 +000019813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019814
19815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019816
Guido van Rossum627b2d71993-12-24 10:39:16 +000019817fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019818done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019819
Jack Jansen150753c2003-03-29 22:07:47 +000019820
19821for ac_func in setpgrp
19822do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019823as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19824{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19825echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019826if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019827 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019828else
Martin v. Löwis11437992002-04-12 09:54:03 +000019829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019830/* confdefs.h. */
19831_ACEOF
19832cat confdefs.h >>conftest.$ac_ext
19833cat >>conftest.$ac_ext <<_ACEOF
19834/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019835/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19836 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19837#define $ac_func innocuous_$ac_func
19838
Jack Jansen150753c2003-03-29 22:07:47 +000019839/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019840 which can conflict with char $ac_func (); below.
19841 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019842 <limits.h> exists even on freestanding compilers. */
19843
19844#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019845# include <limits.h>
19846#else
19847# include <assert.h>
19848#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019849
19850#undef $ac_func
19851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019852/* Override any GCC internal prototype to avoid an error.
19853 Use char because int might match the return type of a GCC
19854 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019855#ifdef __cplusplus
19856extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019857#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019858char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019859/* The GNU C library defines this for functions which it implements
19860 to always fail with ENOSYS. Some functions are actually named
19861 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019862#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019863choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019864#endif
19865
Skip Montanaro6dead952003-09-25 14:50:04 +000019866int
19867main ()
19868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019869return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019870 ;
19871 return 0;
19872}
19873_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019874rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019875if { (ac_try="$ac_link"
19876case "(($ac_try" in
19877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19878 *) ac_try_echo=$ac_try;;
19879esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019881 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019883 grep -v '^ *+' conftest.er1 >conftest.err
19884 rm -f conftest.er1
19885 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019887 (exit $ac_status); } && {
19888 test -z "$ac_c_werror_flag" ||
19889 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019890 } && test -s conftest$ac_exeext &&
19891 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019892 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019895sed 's/^/| /' conftest.$ac_ext >&5
19896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019897 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019899
19900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019901 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019902fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019903ac_res=`eval echo '${'$as_ac_var'}'`
19904 { echo "$as_me:$LINENO: result: $ac_res" >&5
19905echo "${ECHO_T}$ac_res" >&6; }
19906if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019907 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019908#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019909_ACEOF
19910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019911/* confdefs.h. */
19912_ACEOF
19913cat confdefs.h >>conftest.$ac_ext
19914cat >>conftest.$ac_ext <<_ACEOF
19915/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019916#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019917int
19918main ()
19919{
19920setpgrp(0,0);
19921 ;
19922 return 0;
19923}
19924_ACEOF
19925rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019926if { (ac_try="$ac_compile"
19927case "(($ac_try" in
19928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19929 *) ac_try_echo=$ac_try;;
19930esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019932 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019934 grep -v '^ *+' conftest.er1 >conftest.err
19935 rm -f conftest.er1
19936 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019938 (exit $ac_status); } && {
19939 test -z "$ac_c_werror_flag" ||
19940 test ! -s conftest.err
19941 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019942
19943cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019944#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019945_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019946
Jack Jansen150753c2003-03-29 22:07:47 +000019947
19948else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019950sed 's/^/| /' conftest.$ac_ext >&5
19951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019952
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019954
19955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019956
19957fi
19958done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019959
Martin v. Löwis11437992002-04-12 09:54:03 +000019960
Thomas Wouters3a584202000-08-05 23:28:51 +000019961for ac_func in gettimeofday
19962do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019963as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19964{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19965echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019966if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019967 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019968else
Martin v. Löwis11437992002-04-12 09:54:03 +000019969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019970/* confdefs.h. */
19971_ACEOF
19972cat confdefs.h >>conftest.$ac_ext
19973cat >>conftest.$ac_ext <<_ACEOF
19974/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019975/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19976 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19977#define $ac_func innocuous_$ac_func
19978
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019979/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019980 which can conflict with char $ac_func (); below.
19981 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019982 <limits.h> exists even on freestanding compilers. */
19983
19984#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019985# include <limits.h>
19986#else
19987# include <assert.h>
19988#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019989
19990#undef $ac_func
19991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019992/* Override any GCC internal prototype to avoid an error.
19993 Use char because int might match the return type of a GCC
19994 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019995#ifdef __cplusplus
19996extern "C"
19997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019998char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019999/* The GNU C library defines this for functions which it implements
20000 to always fail with ENOSYS. Some functions are actually named
20001 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020002#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020003choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020004#endif
20005
Skip Montanaro6dead952003-09-25 14:50:04 +000020006int
20007main ()
20008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020009return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020010 ;
20011 return 0;
20012}
20013_ACEOF
20014rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020015if { (ac_try="$ac_link"
20016case "(($ac_try" in
20017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20018 *) ac_try_echo=$ac_try;;
20019esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020021 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020023 grep -v '^ *+' conftest.er1 >conftest.err
20024 rm -f conftest.er1
20025 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020027 (exit $ac_status); } && {
20028 test -z "$ac_c_werror_flag" ||
20029 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020030 } && test -s conftest$ac_exeext &&
20031 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020032 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020035sed 's/^/| /' conftest.$ac_ext >&5
20036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020037 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020039
20040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020041 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020042fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020043ac_res=`eval echo '${'$as_ac_var'}'`
20044 { echo "$as_me:$LINENO: result: $ac_res" >&5
20045echo "${ECHO_T}$ac_res" >&6; }
20046if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020047 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020048#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020049_ACEOF
20050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020051/* confdefs.h. */
20052_ACEOF
20053cat confdefs.h >>conftest.$ac_ext
20054cat >>conftest.$ac_ext <<_ACEOF
20055/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020056#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020057int
20058main ()
20059{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020060gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020061 ;
20062 return 0;
20063}
20064_ACEOF
20065rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020066if { (ac_try="$ac_compile"
20067case "(($ac_try" in
20068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20069 *) ac_try_echo=$ac_try;;
20070esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020074 grep -v '^ *+' conftest.er1 >conftest.err
20075 rm -f conftest.er1
20076 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020078 (exit $ac_status); } && {
20079 test -z "$ac_c_werror_flag" ||
20080 test ! -s conftest.err
20081 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020082 :
20083else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020085sed 's/^/| /' conftest.$ac_ext >&5
20086
Martin v. Löwis11437992002-04-12 09:54:03 +000020087
20088cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020089#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020090_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020091
Martin v. Löwis11437992002-04-12 09:54:03 +000020092
Guido van Rossum627b2d71993-12-24 10:39:16 +000020093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020094
20095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020096
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020097fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020098done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020099
Michael W. Hudson54241132001-12-07 15:38:26 +000020100
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020101{ echo "$as_me:$LINENO: checking for major" >&5
20102echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020104/* confdefs.h. */
20105_ACEOF
20106cat confdefs.h >>conftest.$ac_ext
20107cat >>conftest.$ac_ext <<_ACEOF
20108/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020109
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020110#if defined(MAJOR_IN_MKDEV)
20111#include <sys/mkdev.h>
20112#elif defined(MAJOR_IN_SYSMACROS)
20113#include <sys/sysmacros.h>
20114#else
20115#include <sys/types.h>
20116#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020117
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020118int
20119main ()
20120{
20121
20122 makedev(major(0),minor(0));
20123
20124 ;
20125 return 0;
20126}
20127_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020128rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020129if { (ac_try="$ac_link"
20130case "(($ac_try" in
20131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20132 *) ac_try_echo=$ac_try;;
20133esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020135 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020137 grep -v '^ *+' conftest.er1 >conftest.err
20138 rm -f conftest.er1
20139 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020141 (exit $ac_status); } && {
20142 test -z "$ac_c_werror_flag" ||
20143 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020144 } && test -s conftest$ac_exeext &&
20145 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020146
20147
20148cat >>confdefs.h <<\_ACEOF
20149#define HAVE_DEVICE_MACROS 1
20150_ACEOF
20151
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020152 { echo "$as_me:$LINENO: result: yes" >&5
20153echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020154
20155else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020157sed 's/^/| /' conftest.$ac_ext >&5
20158
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020159
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020160 { echo "$as_me:$LINENO: result: no" >&5
20161echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020162
20163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020164
20165rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020166 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020167
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020168# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020169# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020170{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20171echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020172cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020173/* confdefs.h. */
20174_ACEOF
20175cat confdefs.h >>conftest.$ac_ext
20176cat >>conftest.$ac_ext <<_ACEOF
20177/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020178
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020179#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020180#include <sys/socket.h>
20181#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020182#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020183
Martin v. Löwis11437992002-04-12 09:54:03 +000020184int
20185main ()
20186{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020187getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020188 ;
20189 return 0;
20190}
20191_ACEOF
20192rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020193if { (ac_try="$ac_link"
20194case "(($ac_try" in
20195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20196 *) ac_try_echo=$ac_try;;
20197esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020199 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020201 grep -v '^ *+' conftest.er1 >conftest.err
20202 rm -f conftest.er1
20203 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020205 (exit $ac_status); } && {
20206 test -z "$ac_c_werror_flag" ||
20207 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020208 } && test -s conftest$ac_exeext &&
20209 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020210 have_getaddrinfo=yes
20211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020212 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020213sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020214
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020215 have_getaddrinfo=no
20216fi
20217
20218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20219 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020220{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20221echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020222if test $have_getaddrinfo = yes
20223then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020224 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20225echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020226 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020227 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020228else
20229 if test "$cross_compiling" = yes; then
20230 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020231else
Martin v. Löwis11437992002-04-12 09:54:03 +000020232 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020233/* confdefs.h. */
20234_ACEOF
20235cat confdefs.h >>conftest.$ac_ext
20236cat >>conftest.$ac_ext <<_ACEOF
20237/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020238
20239#include <sys/types.h>
20240#include <netdb.h>
20241#include <string.h>
20242#include <sys/socket.h>
20243#include <netinet/in.h>
20244
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020245int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020246{
20247 int passive, gaierr, inet4 = 0, inet6 = 0;
20248 struct addrinfo hints, *ai, *aitop;
20249 char straddr[INET6_ADDRSTRLEN], strport[16];
20250
20251 for (passive = 0; passive <= 1; passive++) {
20252 memset(&hints, 0, sizeof(hints));
20253 hints.ai_family = AF_UNSPEC;
20254 hints.ai_flags = passive ? AI_PASSIVE : 0;
20255 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020256 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020257 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20258 (void)gai_strerror(gaierr);
20259 goto bad;
20260 }
20261 for (ai = aitop; ai; ai = ai->ai_next) {
20262 if (ai->ai_addr == NULL ||
20263 ai->ai_addrlen == 0 ||
20264 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20265 straddr, sizeof(straddr), strport, sizeof(strport),
20266 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20267 goto bad;
20268 }
20269 switch (ai->ai_family) {
20270 case AF_INET:
20271 if (strcmp(strport, "54321") != 0) {
20272 goto bad;
20273 }
20274 if (passive) {
20275 if (strcmp(straddr, "0.0.0.0") != 0) {
20276 goto bad;
20277 }
20278 } else {
20279 if (strcmp(straddr, "127.0.0.1") != 0) {
20280 goto bad;
20281 }
20282 }
20283 inet4++;
20284 break;
20285 case AF_INET6:
20286 if (strcmp(strport, "54321") != 0) {
20287 goto bad;
20288 }
20289 if (passive) {
20290 if (strcmp(straddr, "::") != 0) {
20291 goto bad;
20292 }
20293 } else {
20294 if (strcmp(straddr, "::1") != 0) {
20295 goto bad;
20296 }
20297 }
20298 inet6++;
20299 break;
20300 case AF_UNSPEC:
20301 goto bad;
20302 break;
20303 default:
20304 /* another family support? */
20305 break;
20306 }
20307 }
20308 }
20309
20310 if (!(inet4 == 0 || inet4 == 2))
20311 goto bad;
20312 if (!(inet6 == 0 || inet6 == 2))
20313 goto bad;
20314
20315 if (aitop)
20316 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020317 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020318
20319 bad:
20320 if (aitop)
20321 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020322 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020323}
20324
Martin v. Löwis11437992002-04-12 09:54:03 +000020325_ACEOF
20326rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020327if { (ac_try="$ac_link"
20328case "(($ac_try" in
20329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20330 *) ac_try_echo=$ac_try;;
20331esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020333 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020334 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020336 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020337 { (case "(($ac_try" in
20338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20339 *) ac_try_echo=$ac_try;;
20340esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020342 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020343 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020345 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020346 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020348 echo "$as_me: program exited with status $ac_status" >&5
20349echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020350sed 's/^/| /' conftest.$ac_ext >&5
20351
Martin v. Löwis11437992002-04-12 09:54:03 +000020352( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020353ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020355rm -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 +000020356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020357
20358
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020359fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020360
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020362
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020363if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20364then
20365 if test $ipv6 = yes
20366 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020367 echo 'Fatal: You must get working getaddrinfo() function.'
20368 echo ' or you can specify "--disable-ipv6"'.
20369 exit 1
20370 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020371else
Martin v. Löwis11437992002-04-12 09:54:03 +000020372
20373cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020374#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020375_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020376
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020377fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020378
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020379for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020380do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020381as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20382{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20383echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020384if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020385 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020386else
Martin v. Löwis11437992002-04-12 09:54:03 +000020387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020388/* confdefs.h. */
20389_ACEOF
20390cat confdefs.h >>conftest.$ac_ext
20391cat >>conftest.$ac_ext <<_ACEOF
20392/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020393/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20394 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20395#define $ac_func innocuous_$ac_func
20396
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020397/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020398 which can conflict with char $ac_func (); below.
20399 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020400 <limits.h> exists even on freestanding compilers. */
20401
20402#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020403# include <limits.h>
20404#else
20405# include <assert.h>
20406#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020407
20408#undef $ac_func
20409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020410/* Override any GCC internal prototype to avoid an error.
20411 Use char because int might match the return type of a GCC
20412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020413#ifdef __cplusplus
20414extern "C"
20415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020416char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020417/* The GNU C library defines this for functions which it implements
20418 to always fail with ENOSYS. Some functions are actually named
20419 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020420#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020421choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020422#endif
20423
Skip Montanaro6dead952003-09-25 14:50:04 +000020424int
20425main ()
20426{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020427return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020428 ;
20429 return 0;
20430}
20431_ACEOF
20432rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020433if { (ac_try="$ac_link"
20434case "(($ac_try" in
20435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20436 *) ac_try_echo=$ac_try;;
20437esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020439 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020441 grep -v '^ *+' conftest.er1 >conftest.err
20442 rm -f conftest.er1
20443 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020445 (exit $ac_status); } && {
20446 test -z "$ac_c_werror_flag" ||
20447 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020448 } && test -s conftest$ac_exeext &&
20449 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020450 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020453sed 's/^/| /' conftest.$ac_ext >&5
20454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020455 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020457
20458rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020459 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020460fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020461ac_res=`eval echo '${'$as_ac_var'}'`
20462 { echo "$as_me:$LINENO: result: $ac_res" >&5
20463echo "${ECHO_T}$ac_res" >&6; }
20464if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020465 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020466#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020467_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020468
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020469fi
20470done
20471
Michael W. Hudson54241132001-12-07 15:38:26 +000020472
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020473# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020474{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20475echo $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 +000020476if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020477 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020478else
Martin v. Löwis11437992002-04-12 09:54:03 +000020479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020480/* confdefs.h. */
20481_ACEOF
20482cat confdefs.h >>conftest.$ac_ext
20483cat >>conftest.$ac_ext <<_ACEOF
20484/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020485#include <sys/types.h>
20486#include <sys/time.h>
20487#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020488
Martin v. Löwis11437992002-04-12 09:54:03 +000020489int
20490main ()
20491{
20492if ((struct tm *) 0)
20493return 0;
20494 ;
20495 return 0;
20496}
20497_ACEOF
20498rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020499if { (ac_try="$ac_compile"
20500case "(($ac_try" in
20501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20502 *) ac_try_echo=$ac_try;;
20503esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020507 grep -v '^ *+' conftest.er1 >conftest.err
20508 rm -f conftest.er1
20509 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020511 (exit $ac_status); } && {
20512 test -z "$ac_c_werror_flag" ||
20513 test ! -s conftest.err
20514 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020515 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020516else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020518sed 's/^/| /' conftest.$ac_ext >&5
20519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020520 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020522
20523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020524fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020525{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20526echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020527if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020528
20529cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020530#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020531_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020532
20533fi
20534
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020535{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20536echo $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 +000020537if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020538 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020539else
Martin v. Löwis11437992002-04-12 09:54:03 +000020540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020541/* confdefs.h. */
20542_ACEOF
20543cat confdefs.h >>conftest.$ac_ext
20544cat >>conftest.$ac_ext <<_ACEOF
20545/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020546#include <sys/types.h>
20547#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020548
Martin v. Löwis11437992002-04-12 09:54:03 +000020549int
20550main ()
20551{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020552struct tm tm;
20553 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020554 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020555 ;
20556 return 0;
20557}
20558_ACEOF
20559rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020560if { (ac_try="$ac_compile"
20561case "(($ac_try" in
20562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20563 *) ac_try_echo=$ac_try;;
20564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020568 grep -v '^ *+' conftest.er1 >conftest.err
20569 rm -f conftest.er1
20570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020572 (exit $ac_status); } && {
20573 test -z "$ac_c_werror_flag" ||
20574 test ! -s conftest.err
20575 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020576 ac_cv_struct_tm=time.h
20577else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020579sed 's/^/| /' conftest.$ac_ext >&5
20580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020581 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020583
20584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020585fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020586{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20587echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020588if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020589
20590cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020591#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020592_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020593
20594fi
20595
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020596{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20597echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020598if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020599 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020600else
Martin v. Löwis11437992002-04-12 09:54:03 +000020601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020602/* confdefs.h. */
20603_ACEOF
20604cat confdefs.h >>conftest.$ac_ext
20605cat >>conftest.$ac_ext <<_ACEOF
20606/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020607#include <sys/types.h>
20608#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020609
20610
Martin v. Löwis11437992002-04-12 09:54:03 +000020611int
20612main ()
20613{
20614static struct tm ac_aggr;
20615if (ac_aggr.tm_zone)
20616return 0;
20617 ;
20618 return 0;
20619}
20620_ACEOF
20621rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020622if { (ac_try="$ac_compile"
20623case "(($ac_try" in
20624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20625 *) ac_try_echo=$ac_try;;
20626esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020630 grep -v '^ *+' conftest.er1 >conftest.err
20631 rm -f conftest.er1
20632 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020634 (exit $ac_status); } && {
20635 test -z "$ac_c_werror_flag" ||
20636 test ! -s conftest.err
20637 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020638 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020639else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020641sed 's/^/| /' conftest.$ac_ext >&5
20642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020644/* confdefs.h. */
20645_ACEOF
20646cat confdefs.h >>conftest.$ac_ext
20647cat >>conftest.$ac_ext <<_ACEOF
20648/* end confdefs.h. */
20649#include <sys/types.h>
20650#include <$ac_cv_struct_tm>
20651
20652
20653int
20654main ()
20655{
20656static struct tm ac_aggr;
20657if (sizeof ac_aggr.tm_zone)
20658return 0;
20659 ;
20660 return 0;
20661}
20662_ACEOF
20663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020664if { (ac_try="$ac_compile"
20665case "(($ac_try" in
20666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20667 *) ac_try_echo=$ac_try;;
20668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020670 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020672 grep -v '^ *+' conftest.er1 >conftest.err
20673 rm -f conftest.er1
20674 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020676 (exit $ac_status); } && {
20677 test -z "$ac_c_werror_flag" ||
20678 test ! -s conftest.err
20679 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020680 ac_cv_member_struct_tm_tm_zone=yes
20681else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020683sed 's/^/| /' conftest.$ac_ext >&5
20684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020685 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020687
20688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020690
20691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020692fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020693{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20694echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20695if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020696
20697cat >>confdefs.h <<_ACEOF
20698#define HAVE_STRUCT_TM_TM_ZONE 1
20699_ACEOF
20700
20701
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020702fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020703
Martin v. Löwis11437992002-04-12 09:54:03 +000020704if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20705
20706cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020707#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020708_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020709
20710else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020711 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20712echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020713if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020714 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020715else
20716 cat >conftest.$ac_ext <<_ACEOF
20717/* confdefs.h. */
20718_ACEOF
20719cat confdefs.h >>conftest.$ac_ext
20720cat >>conftest.$ac_ext <<_ACEOF
20721/* end confdefs.h. */
20722#include <time.h>
20723
20724int
20725main ()
20726{
20727#ifndef tzname
20728 (void) tzname;
20729#endif
20730
20731 ;
20732 return 0;
20733}
20734_ACEOF
20735rm -f conftest.$ac_objext
20736if { (ac_try="$ac_compile"
20737case "(($ac_try" in
20738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20739 *) ac_try_echo=$ac_try;;
20740esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020742 (eval "$ac_compile") 2>conftest.er1
20743 ac_status=$?
20744 grep -v '^ *+' conftest.er1 >conftest.err
20745 rm -f conftest.er1
20746 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020748 (exit $ac_status); } && {
20749 test -z "$ac_c_werror_flag" ||
20750 test ! -s conftest.err
20751 } && test -s conftest.$ac_objext; then
20752 ac_cv_have_decl_tzname=yes
20753else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020754 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020755sed 's/^/| /' conftest.$ac_ext >&5
20756
20757 ac_cv_have_decl_tzname=no
20758fi
20759
20760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20761fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020762{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20763echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20764if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020765
20766cat >>confdefs.h <<_ACEOF
20767#define HAVE_DECL_TZNAME 1
20768_ACEOF
20769
20770
20771else
20772 cat >>confdefs.h <<_ACEOF
20773#define HAVE_DECL_TZNAME 0
20774_ACEOF
20775
20776
20777fi
20778
20779
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020780 { echo "$as_me:$LINENO: checking for tzname" >&5
20781echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020782if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020784else
Martin v. Löwis11437992002-04-12 09:54:03 +000020785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020786/* confdefs.h. */
20787_ACEOF
20788cat confdefs.h >>conftest.$ac_ext
20789cat >>conftest.$ac_ext <<_ACEOF
20790/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020791#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020792#if !HAVE_DECL_TZNAME
20793extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020795
Martin v. Löwis11437992002-04-12 09:54:03 +000020796int
20797main ()
20798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020799return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020800 ;
20801 return 0;
20802}
20803_ACEOF
20804rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020805if { (ac_try="$ac_link"
20806case "(($ac_try" in
20807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20808 *) ac_try_echo=$ac_try;;
20809esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020811 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020813 grep -v '^ *+' conftest.er1 >conftest.err
20814 rm -f conftest.er1
20815 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020817 (exit $ac_status); } && {
20818 test -z "$ac_c_werror_flag" ||
20819 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020820 } && test -s conftest$ac_exeext &&
20821 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020822 ac_cv_var_tzname=yes
20823else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020825sed 's/^/| /' conftest.$ac_ext >&5
20826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020827 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020829
20830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020831 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020832fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020833{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20834echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020835 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020836
20837cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020838#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020839_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020840
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020841 fi
20842fi
20843
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020844{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20845echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020846if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020847 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020848else
20849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020850/* confdefs.h. */
20851_ACEOF
20852cat confdefs.h >>conftest.$ac_ext
20853cat >>conftest.$ac_ext <<_ACEOF
20854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020855$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020856int
20857main ()
20858{
20859static struct stat ac_aggr;
20860if (ac_aggr.st_rdev)
20861return 0;
20862 ;
20863 return 0;
20864}
20865_ACEOF
20866rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020867if { (ac_try="$ac_compile"
20868case "(($ac_try" in
20869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20870 *) ac_try_echo=$ac_try;;
20871esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020875 grep -v '^ *+' conftest.er1 >conftest.err
20876 rm -f conftest.er1
20877 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020879 (exit $ac_status); } && {
20880 test -z "$ac_c_werror_flag" ||
20881 test ! -s conftest.err
20882 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020883 ac_cv_member_struct_stat_st_rdev=yes
20884else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020886sed 's/^/| /' conftest.$ac_ext >&5
20887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020889/* confdefs.h. */
20890_ACEOF
20891cat confdefs.h >>conftest.$ac_ext
20892cat >>conftest.$ac_ext <<_ACEOF
20893/* end confdefs.h. */
20894$ac_includes_default
20895int
20896main ()
20897{
20898static struct stat ac_aggr;
20899if (sizeof ac_aggr.st_rdev)
20900return 0;
20901 ;
20902 return 0;
20903}
20904_ACEOF
20905rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020906if { (ac_try="$ac_compile"
20907case "(($ac_try" in
20908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20909 *) ac_try_echo=$ac_try;;
20910esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020912 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020914 grep -v '^ *+' conftest.er1 >conftest.err
20915 rm -f conftest.er1
20916 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020918 (exit $ac_status); } && {
20919 test -z "$ac_c_werror_flag" ||
20920 test ! -s conftest.err
20921 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020922 ac_cv_member_struct_stat_st_rdev=yes
20923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020925sed 's/^/| /' conftest.$ac_ext >&5
20926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020927 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020929
20930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020932
20933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020934fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020935{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20936echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20937if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020938
20939cat >>confdefs.h <<_ACEOF
20940#define HAVE_STRUCT_STAT_ST_RDEV 1
20941_ACEOF
20942
20943
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020944fi
20945
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020946{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20947echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020948if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020950else
Martin v. Löwis11437992002-04-12 09:54:03 +000020951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020952/* confdefs.h. */
20953_ACEOF
20954cat confdefs.h >>conftest.$ac_ext
20955cat >>conftest.$ac_ext <<_ACEOF
20956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020957$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020958int
20959main ()
20960{
20961static struct stat ac_aggr;
20962if (ac_aggr.st_blksize)
20963return 0;
20964 ;
20965 return 0;
20966}
20967_ACEOF
20968rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020969if { (ac_try="$ac_compile"
20970case "(($ac_try" in
20971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20972 *) ac_try_echo=$ac_try;;
20973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020975 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020977 grep -v '^ *+' conftest.er1 >conftest.err
20978 rm -f conftest.er1
20979 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020981 (exit $ac_status); } && {
20982 test -z "$ac_c_werror_flag" ||
20983 test ! -s conftest.err
20984 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020985 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020986else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020988sed 's/^/| /' conftest.$ac_ext >&5
20989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020991/* confdefs.h. */
20992_ACEOF
20993cat confdefs.h >>conftest.$ac_ext
20994cat >>conftest.$ac_ext <<_ACEOF
20995/* end confdefs.h. */
20996$ac_includes_default
20997int
20998main ()
20999{
21000static struct stat ac_aggr;
21001if (sizeof ac_aggr.st_blksize)
21002return 0;
21003 ;
21004 return 0;
21005}
21006_ACEOF
21007rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021008if { (ac_try="$ac_compile"
21009case "(($ac_try" in
21010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21011 *) ac_try_echo=$ac_try;;
21012esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021014 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021016 grep -v '^ *+' conftest.er1 >conftest.err
21017 rm -f conftest.er1
21018 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021020 (exit $ac_status); } && {
21021 test -z "$ac_c_werror_flag" ||
21022 test ! -s conftest.err
21023 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021024 ac_cv_member_struct_stat_st_blksize=yes
21025else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021027sed 's/^/| /' conftest.$ac_ext >&5
21028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021029 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021031
21032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021034
21035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021036fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021037{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21038echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21039if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021040
Martin v. Löwis11437992002-04-12 09:54:03 +000021041cat >>confdefs.h <<_ACEOF
21042#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21043_ACEOF
21044
21045
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021046fi
21047
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021048{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21049echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021050if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021051 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021052else
21053 cat >conftest.$ac_ext <<_ACEOF
21054/* confdefs.h. */
21055_ACEOF
21056cat confdefs.h >>conftest.$ac_ext
21057cat >>conftest.$ac_ext <<_ACEOF
21058/* end confdefs.h. */
21059$ac_includes_default
21060int
21061main ()
21062{
21063static struct stat ac_aggr;
21064if (ac_aggr.st_flags)
21065return 0;
21066 ;
21067 return 0;
21068}
21069_ACEOF
21070rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021071if { (ac_try="$ac_compile"
21072case "(($ac_try" in
21073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21074 *) ac_try_echo=$ac_try;;
21075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021077 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021078 ac_status=$?
21079 grep -v '^ *+' conftest.er1 >conftest.err
21080 rm -f conftest.er1
21081 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021083 (exit $ac_status); } && {
21084 test -z "$ac_c_werror_flag" ||
21085 test ! -s conftest.err
21086 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021087 ac_cv_member_struct_stat_st_flags=yes
21088else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021089 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021090sed 's/^/| /' conftest.$ac_ext >&5
21091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021092 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021093/* confdefs.h. */
21094_ACEOF
21095cat confdefs.h >>conftest.$ac_ext
21096cat >>conftest.$ac_ext <<_ACEOF
21097/* end confdefs.h. */
21098$ac_includes_default
21099int
21100main ()
21101{
21102static struct stat ac_aggr;
21103if (sizeof ac_aggr.st_flags)
21104return 0;
21105 ;
21106 return 0;
21107}
21108_ACEOF
21109rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021110if { (ac_try="$ac_compile"
21111case "(($ac_try" in
21112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21113 *) ac_try_echo=$ac_try;;
21114esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021116 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021117 ac_status=$?
21118 grep -v '^ *+' conftest.er1 >conftest.err
21119 rm -f conftest.er1
21120 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021122 (exit $ac_status); } && {
21123 test -z "$ac_c_werror_flag" ||
21124 test ! -s conftest.err
21125 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021126 ac_cv_member_struct_stat_st_flags=yes
21127else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021128 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021129sed 's/^/| /' conftest.$ac_ext >&5
21130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021131 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021133
21134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021136
21137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021138fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021139{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21140echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21141if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021142
21143cat >>confdefs.h <<_ACEOF
21144#define HAVE_STRUCT_STAT_ST_FLAGS 1
21145_ACEOF
21146
21147
21148fi
21149
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021150{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21151echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021152if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021153 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021154else
21155 cat >conftest.$ac_ext <<_ACEOF
21156/* confdefs.h. */
21157_ACEOF
21158cat confdefs.h >>conftest.$ac_ext
21159cat >>conftest.$ac_ext <<_ACEOF
21160/* end confdefs.h. */
21161$ac_includes_default
21162int
21163main ()
21164{
21165static struct stat ac_aggr;
21166if (ac_aggr.st_gen)
21167return 0;
21168 ;
21169 return 0;
21170}
21171_ACEOF
21172rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021173if { (ac_try="$ac_compile"
21174case "(($ac_try" in
21175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21176 *) ac_try_echo=$ac_try;;
21177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021180 ac_status=$?
21181 grep -v '^ *+' conftest.er1 >conftest.err
21182 rm -f conftest.er1
21183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021185 (exit $ac_status); } && {
21186 test -z "$ac_c_werror_flag" ||
21187 test ! -s conftest.err
21188 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021189 ac_cv_member_struct_stat_st_gen=yes
21190else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021191 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021192sed 's/^/| /' conftest.$ac_ext >&5
21193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021194 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021195/* confdefs.h. */
21196_ACEOF
21197cat confdefs.h >>conftest.$ac_ext
21198cat >>conftest.$ac_ext <<_ACEOF
21199/* end confdefs.h. */
21200$ac_includes_default
21201int
21202main ()
21203{
21204static struct stat ac_aggr;
21205if (sizeof ac_aggr.st_gen)
21206return 0;
21207 ;
21208 return 0;
21209}
21210_ACEOF
21211rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021212if { (ac_try="$ac_compile"
21213case "(($ac_try" in
21214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21215 *) ac_try_echo=$ac_try;;
21216esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021218 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021219 ac_status=$?
21220 grep -v '^ *+' conftest.er1 >conftest.err
21221 rm -f conftest.er1
21222 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021224 (exit $ac_status); } && {
21225 test -z "$ac_c_werror_flag" ||
21226 test ! -s conftest.err
21227 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021228 ac_cv_member_struct_stat_st_gen=yes
21229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021230 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021231sed 's/^/| /' conftest.$ac_ext >&5
21232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021233 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021235
21236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021238
21239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021240fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021241{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21242echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21243if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021244
21245cat >>confdefs.h <<_ACEOF
21246#define HAVE_STRUCT_STAT_ST_GEN 1
21247_ACEOF
21248
21249
21250fi
21251
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021252{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21253echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021254if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021255 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021256else
21257 cat >conftest.$ac_ext <<_ACEOF
21258/* confdefs.h. */
21259_ACEOF
21260cat confdefs.h >>conftest.$ac_ext
21261cat >>conftest.$ac_ext <<_ACEOF
21262/* end confdefs.h. */
21263$ac_includes_default
21264int
21265main ()
21266{
21267static struct stat ac_aggr;
21268if (ac_aggr.st_birthtime)
21269return 0;
21270 ;
21271 return 0;
21272}
21273_ACEOF
21274rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021275if { (ac_try="$ac_compile"
21276case "(($ac_try" in
21277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21278 *) ac_try_echo=$ac_try;;
21279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021282 ac_status=$?
21283 grep -v '^ *+' conftest.er1 >conftest.err
21284 rm -f conftest.er1
21285 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021287 (exit $ac_status); } && {
21288 test -z "$ac_c_werror_flag" ||
21289 test ! -s conftest.err
21290 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021291 ac_cv_member_struct_stat_st_birthtime=yes
21292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021293 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021294sed 's/^/| /' conftest.$ac_ext >&5
21295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021296 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021297/* confdefs.h. */
21298_ACEOF
21299cat confdefs.h >>conftest.$ac_ext
21300cat >>conftest.$ac_ext <<_ACEOF
21301/* end confdefs.h. */
21302$ac_includes_default
21303int
21304main ()
21305{
21306static struct stat ac_aggr;
21307if (sizeof ac_aggr.st_birthtime)
21308return 0;
21309 ;
21310 return 0;
21311}
21312_ACEOF
21313rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021314if { (ac_try="$ac_compile"
21315case "(($ac_try" in
21316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21317 *) ac_try_echo=$ac_try;;
21318esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021320 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021321 ac_status=$?
21322 grep -v '^ *+' conftest.er1 >conftest.err
21323 rm -f conftest.er1
21324 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021326 (exit $ac_status); } && {
21327 test -z "$ac_c_werror_flag" ||
21328 test ! -s conftest.err
21329 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021330 ac_cv_member_struct_stat_st_birthtime=yes
21331else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021332 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021333sed 's/^/| /' conftest.$ac_ext >&5
21334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021335 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021337
21338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021340
21341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021342fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021343{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21344echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21345if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021346
21347cat >>confdefs.h <<_ACEOF
21348#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21349_ACEOF
21350
21351
21352fi
21353
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021354{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21355echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021356if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021358else
Martin v. Löwis11437992002-04-12 09:54:03 +000021359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021360/* confdefs.h. */
21361_ACEOF
21362cat confdefs.h >>conftest.$ac_ext
21363cat >>conftest.$ac_ext <<_ACEOF
21364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021365$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021366int
21367main ()
21368{
21369static struct stat ac_aggr;
21370if (ac_aggr.st_blocks)
21371return 0;
21372 ;
21373 return 0;
21374}
21375_ACEOF
21376rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021377if { (ac_try="$ac_compile"
21378case "(($ac_try" in
21379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21380 *) ac_try_echo=$ac_try;;
21381esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021385 grep -v '^ *+' conftest.er1 >conftest.err
21386 rm -f conftest.er1
21387 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021389 (exit $ac_status); } && {
21390 test -z "$ac_c_werror_flag" ||
21391 test ! -s conftest.err
21392 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021393 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021394else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021396sed 's/^/| /' conftest.$ac_ext >&5
21397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021399/* confdefs.h. */
21400_ACEOF
21401cat confdefs.h >>conftest.$ac_ext
21402cat >>conftest.$ac_ext <<_ACEOF
21403/* end confdefs.h. */
21404$ac_includes_default
21405int
21406main ()
21407{
21408static struct stat ac_aggr;
21409if (sizeof ac_aggr.st_blocks)
21410return 0;
21411 ;
21412 return 0;
21413}
21414_ACEOF
21415rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021416if { (ac_try="$ac_compile"
21417case "(($ac_try" in
21418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21419 *) ac_try_echo=$ac_try;;
21420esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021422 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021424 grep -v '^ *+' conftest.er1 >conftest.err
21425 rm -f conftest.er1
21426 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021428 (exit $ac_status); } && {
21429 test -z "$ac_c_werror_flag" ||
21430 test ! -s conftest.err
21431 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021432 ac_cv_member_struct_stat_st_blocks=yes
21433else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021435sed 's/^/| /' conftest.$ac_ext >&5
21436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021437 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021439
21440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021442
21443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021444fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021445{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21446echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21447if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021448
Martin v. Löwis11437992002-04-12 09:54:03 +000021449cat >>confdefs.h <<_ACEOF
21450#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21451_ACEOF
21452
21453
21454cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021455#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021456_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021457
21458else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021459 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021460 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021461 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21462 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021463esac
21464
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021465fi
21466
Michael W. Hudson54241132001-12-07 15:38:26 +000021467
Martin v. Löwis11437992002-04-12 09:54:03 +000021468
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021469{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21470echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021471if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021472 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021473else
Martin v. Löwis11437992002-04-12 09:54:03 +000021474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021475/* confdefs.h. */
21476_ACEOF
21477cat confdefs.h >>conftest.$ac_ext
21478cat >>conftest.$ac_ext <<_ACEOF
21479/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021480#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021481int
21482main ()
21483{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021484return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021485 ;
21486 return 0;
21487}
21488_ACEOF
21489rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021490if { (ac_try="$ac_compile"
21491case "(($ac_try" in
21492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21493 *) ac_try_echo=$ac_try;;
21494esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021498 grep -v '^ *+' conftest.er1 >conftest.err
21499 rm -f conftest.er1
21500 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021502 (exit $ac_status); } && {
21503 test -z "$ac_c_werror_flag" ||
21504 test ! -s conftest.err
21505 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021506 ac_cv_header_time_altzone=yes
21507else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021509sed 's/^/| /' conftest.$ac_ext >&5
21510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021511 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021512fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21515fi
21516
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021517{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21518echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021519if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021520
21521cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021522#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021523_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021524
21525fi
21526
Guido van Rossumda88dad1995-01-26 00:46:29 +000021527was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021528{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21529echo $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 +000021530cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021531/* confdefs.h. */
21532_ACEOF
21533cat confdefs.h >>conftest.$ac_ext
21534cat >>conftest.$ac_ext <<_ACEOF
21535/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021536
21537#include <sys/types.h>
21538#include <sys/select.h>
21539#include <sys/time.h>
21540
Martin v. Löwis11437992002-04-12 09:54:03 +000021541int
21542main ()
21543{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021544;
Martin v. Löwis11437992002-04-12 09:54:03 +000021545 ;
21546 return 0;
21547}
21548_ACEOF
21549rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021550if { (ac_try="$ac_compile"
21551case "(($ac_try" in
21552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21553 *) ac_try_echo=$ac_try;;
21554esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021558 grep -v '^ *+' conftest.er1 >conftest.err
21559 rm -f conftest.er1
21560 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021562 (exit $ac_status); } && {
21563 test -z "$ac_c_werror_flag" ||
21564 test ! -s conftest.err
21565 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021566
21567
21568cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021569#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021570_ACEOF
21571
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021572 was_it_defined=yes
21573
Guido van Rossumf78abae1997-01-21 22:02:36 +000021574else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021576sed 's/^/| /' conftest.$ac_ext >&5
21577
Thomas Wouters477c8d52006-05-27 19:21:47 +000021578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021579fi
21580
21581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021582{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21583echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021584
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021585{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21586echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021587if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021588 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021589else
Martin v. Löwis11437992002-04-12 09:54:03 +000021590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021591/* confdefs.h. */
21592_ACEOF
21593cat confdefs.h >>conftest.$ac_ext
21594cat >>conftest.$ac_ext <<_ACEOF
21595/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021596
21597# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021598int
21599main ()
21600{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021601struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021602 ;
21603 return 0;
21604}
21605_ACEOF
21606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021607if { (ac_try="$ac_compile"
21608case "(($ac_try" in
21609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21610 *) ac_try_echo=$ac_try;;
21611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021615 grep -v '^ *+' conftest.er1 >conftest.err
21616 rm -f conftest.er1
21617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021619 (exit $ac_status); } && {
21620 test -z "$ac_c_werror_flag" ||
21621 test ! -s conftest.err
21622 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021623 ac_cv_struct_addrinfo=yes
21624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021626sed 's/^/| /' conftest.$ac_ext >&5
21627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021628 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021629fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21632fi
21633
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021634{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21635echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021636if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021637
21638cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021639#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021640_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021641
21642fi
21643
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021644{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21645echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021646if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021647 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021648else
Martin v. Löwis11437992002-04-12 09:54:03 +000021649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021650/* confdefs.h. */
21651_ACEOF
21652cat confdefs.h >>conftest.$ac_ext
21653cat >>conftest.$ac_ext <<_ACEOF
21654/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021655
21656# include <sys/types.h>
21657# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021658int
21659main ()
21660{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021661struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021662 ;
21663 return 0;
21664}
21665_ACEOF
21666rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021667if { (ac_try="$ac_compile"
21668case "(($ac_try" in
21669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21670 *) ac_try_echo=$ac_try;;
21671esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021675 grep -v '^ *+' conftest.er1 >conftest.err
21676 rm -f conftest.er1
21677 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021679 (exit $ac_status); } && {
21680 test -z "$ac_c_werror_flag" ||
21681 test ! -s conftest.err
21682 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021683 ac_cv_struct_sockaddr_storage=yes
21684else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021686sed 's/^/| /' conftest.$ac_ext >&5
21687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021688 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021689fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21692fi
21693
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021694{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21695echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021696if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021697
21698cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021699#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021700_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021701
21702fi
21703
Guido van Rossum627b2d71993-12-24 10:39:16 +000021704# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021705
Michael W. Hudson54241132001-12-07 15:38:26 +000021706
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021707{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21708echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021709if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021710 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021711else
Martin v. Löwis11437992002-04-12 09:54:03 +000021712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021713/* confdefs.h. */
21714_ACEOF
21715cat confdefs.h >>conftest.$ac_ext
21716cat >>conftest.$ac_ext <<_ACEOF
21717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021718$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021719int
21720main ()
21721{
21722static int test_array [1 - 2 * !(((char) -1) < 0)];
21723test_array [0] = 0
21724
21725 ;
21726 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021727}
Martin v. Löwis11437992002-04-12 09:54:03 +000021728_ACEOF
21729rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021730if { (ac_try="$ac_compile"
21731case "(($ac_try" in
21732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21733 *) ac_try_echo=$ac_try;;
21734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021736 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021738 grep -v '^ *+' conftest.er1 >conftest.err
21739 rm -f conftest.er1
21740 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021742 (exit $ac_status); } && {
21743 test -z "$ac_c_werror_flag" ||
21744 test ! -s conftest.err
21745 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021746 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021747else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021749sed 's/^/| /' conftest.$ac_ext >&5
21750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021751 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021753
21754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021755fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021756{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21757echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021758if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021759 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021760#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021761_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021762
21763fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021764
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021765{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21766echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021767if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021768 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021769else
21770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021771/* confdefs.h. */
21772_ACEOF
21773cat confdefs.h >>conftest.$ac_ext
21774cat >>conftest.$ac_ext <<_ACEOF
21775/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021776
Martin v. Löwis11437992002-04-12 09:54:03 +000021777int
21778main ()
21779{
21780/* FIXME: Include the comments suggested by Paul. */
21781#ifndef __cplusplus
21782 /* Ultrix mips cc rejects this. */
21783 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021784 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021785 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021786 char const *const *pcpcc;
21787 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021788 /* NEC SVR4.0.2 mips cc rejects this. */
21789 struct point {int x, y;};
21790 static struct point const zero = {0,0};
21791 /* AIX XL C 1.02.0.0 rejects this.
21792 It does not let you subtract one const X* pointer from another in
21793 an arm of an if-expression whose if-part is not a constant
21794 expression */
21795 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021796 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021797 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021798 ++pcpcc;
21799 ppc = (char**) pcpcc;
21800 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021801 { /* SCO 3.2v4 cc rejects this. */
21802 char *t;
21803 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021804
Martin v. Löwis11437992002-04-12 09:54:03 +000021805 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021806 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021807 }
21808 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21809 int x[] = {25, 17};
21810 const int *foo = &x[0];
21811 ++foo;
21812 }
21813 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21814 typedef const int *iptr;
21815 iptr p = 0;
21816 ++p;
21817 }
21818 { /* AIX XL C 1.02.0.0 rejects this saying
21819 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21820 struct s { int j; const int *ap[3]; };
21821 struct s *b; b->j = 5;
21822 }
21823 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21824 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021825 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021826 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021827 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021828#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021829
Martin v. Löwis11437992002-04-12 09:54:03 +000021830 ;
21831 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021832}
Martin v. Löwis11437992002-04-12 09:54:03 +000021833_ACEOF
21834rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021835if { (ac_try="$ac_compile"
21836case "(($ac_try" in
21837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21838 *) ac_try_echo=$ac_try;;
21839esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021843 grep -v '^ *+' conftest.er1 >conftest.err
21844 rm -f conftest.er1
21845 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021847 (exit $ac_status); } && {
21848 test -z "$ac_c_werror_flag" ||
21849 test ! -s conftest.err
21850 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021851 ac_cv_c_const=yes
21852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021854sed 's/^/| /' conftest.$ac_ext >&5
21855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021856 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021858
21859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021860fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021861{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21862echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021863if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021864
21865cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021866#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021867_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021868
21869fi
21870
Michael W. Hudson54241132001-12-07 15:38:26 +000021871
Guido van Rossumda88dad1995-01-26 00:46:29 +000021872works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021873{ echo "$as_me:$LINENO: checking for working volatile" >&5
21874echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021875cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021876/* confdefs.h. */
21877_ACEOF
21878cat confdefs.h >>conftest.$ac_ext
21879cat >>conftest.$ac_ext <<_ACEOF
21880/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021881
Martin v. Löwis11437992002-04-12 09:54:03 +000021882int
21883main ()
21884{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021885volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021886 ;
21887 return 0;
21888}
21889_ACEOF
21890rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021891if { (ac_try="$ac_compile"
21892case "(($ac_try" in
21893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21894 *) ac_try_echo=$ac_try;;
21895esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021899 grep -v '^ *+' conftest.er1 >conftest.err
21900 rm -f conftest.er1
21901 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021903 (exit $ac_status); } && {
21904 test -z "$ac_c_werror_flag" ||
21905 test ! -s conftest.err
21906 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021907 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021908else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021910sed 's/^/| /' conftest.$ac_ext >&5
21911
Martin v. Löwis11437992002-04-12 09:54:03 +000021912
21913cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021914#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021915_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021916
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021917
Guido van Rossum627b2d71993-12-24 10:39:16 +000021918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021919
21920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021921{ echo "$as_me:$LINENO: result: $works" >&5
21922echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021923
Guido van Rossumda88dad1995-01-26 00:46:29 +000021924works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021925{ echo "$as_me:$LINENO: checking for working signed char" >&5
21926echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021927cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021928/* confdefs.h. */
21929_ACEOF
21930cat confdefs.h >>conftest.$ac_ext
21931cat >>conftest.$ac_ext <<_ACEOF
21932/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021933
Martin v. Löwis11437992002-04-12 09:54:03 +000021934int
21935main ()
21936{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021937signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021938 ;
21939 return 0;
21940}
21941_ACEOF
21942rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021943if { (ac_try="$ac_compile"
21944case "(($ac_try" in
21945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21946 *) ac_try_echo=$ac_try;;
21947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021951 grep -v '^ *+' conftest.er1 >conftest.err
21952 rm -f conftest.er1
21953 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021955 (exit $ac_status); } && {
21956 test -z "$ac_c_werror_flag" ||
21957 test ! -s conftest.err
21958 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021959 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021960else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021962sed 's/^/| /' conftest.$ac_ext >&5
21963
Martin v. Löwis11437992002-04-12 09:54:03 +000021964
21965cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021966#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021967_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021968
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021969
Guido van Rossum7f43da71994-08-01 12:15:30 +000021970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021971
21972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021973{ echo "$as_me:$LINENO: result: $works" >&5
21974echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021975
Guido van Rossumda88dad1995-01-26 00:46:29 +000021976have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021977{ echo "$as_me:$LINENO: checking for prototypes" >&5
21978echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021979cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021980/* confdefs.h. */
21981_ACEOF
21982cat confdefs.h >>conftest.$ac_ext
21983cat >>conftest.$ac_ext <<_ACEOF
21984/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021985int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021986int
21987main ()
21988{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021989return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021990 ;
21991 return 0;
21992}
21993_ACEOF
21994rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021995if { (ac_try="$ac_compile"
21996case "(($ac_try" in
21997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21998 *) ac_try_echo=$ac_try;;
21999esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022001 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022003 grep -v '^ *+' conftest.er1 >conftest.err
22004 rm -f conftest.er1
22005 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022007 (exit $ac_status); } && {
22008 test -z "$ac_c_werror_flag" ||
22009 test ! -s conftest.err
22010 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022011
22012
22013cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022014#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022015_ACEOF
22016
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022017 have_prototypes=yes
22018
Guido van Rossumf78abae1997-01-21 22:02:36 +000022019else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022021sed 's/^/| /' conftest.$ac_ext >&5
22022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022023
Guido van Rossum7f43da71994-08-01 12:15:30 +000022024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022025
22026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022027{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22028echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022029
Guido van Rossumda88dad1995-01-26 00:46:29 +000022030works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022031{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22032echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022033cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022034/* confdefs.h. */
22035_ACEOF
22036cat confdefs.h >>conftest.$ac_ext
22037cat >>conftest.$ac_ext <<_ACEOF
22038/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022039
22040#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022041int foo(int x, ...) {
22042 va_list va;
22043 va_start(va, x);
22044 va_arg(va, int);
22045 va_arg(va, char *);
22046 va_arg(va, double);
22047 return 0;
22048}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022049
Martin v. Löwis11437992002-04-12 09:54:03 +000022050int
22051main ()
22052{
Guido van Rossum90eea071996-08-30 20:58:57 +000022053return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022054 ;
22055 return 0;
22056}
22057_ACEOF
22058rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022059if { (ac_try="$ac_compile"
22060case "(($ac_try" in
22061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22062 *) ac_try_echo=$ac_try;;
22063esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022065 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022067 grep -v '^ *+' conftest.er1 >conftest.err
22068 rm -f conftest.er1
22069 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022071 (exit $ac_status); } && {
22072 test -z "$ac_c_werror_flag" ||
22073 test ! -s conftest.err
22074 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022075
22076
22077cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022078#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022079_ACEOF
22080
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022081 works=yes
22082
Guido van Rossumf78abae1997-01-21 22:02:36 +000022083else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022085sed 's/^/| /' conftest.$ac_ext >&5
22086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022087
Guido van Rossum627b2d71993-12-24 10:39:16 +000022088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022089
22090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022091{ echo "$as_me:$LINENO: result: $works" >&5
22092echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022093
Martin v. Löwisd6320502004-08-12 13:45:08 +000022094# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022095{ echo "$as_me:$LINENO: checking for socketpair" >&5
22096echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022097cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022098/* confdefs.h. */
22099_ACEOF
22100cat confdefs.h >>conftest.$ac_ext
22101cat >>conftest.$ac_ext <<_ACEOF
22102/* end confdefs.h. */
22103
22104#include <sys/types.h>
22105#include <sys/socket.h>
22106
22107int
22108main ()
22109{
22110void *x=socketpair
22111 ;
22112 return 0;
22113}
22114_ACEOF
22115rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022116if { (ac_try="$ac_compile"
22117case "(($ac_try" in
22118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22119 *) ac_try_echo=$ac_try;;
22120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022124 grep -v '^ *+' conftest.er1 >conftest.err
22125 rm -f conftest.er1
22126 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022128 (exit $ac_status); } && {
22129 test -z "$ac_c_werror_flag" ||
22130 test ! -s conftest.err
22131 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022132
22133cat >>confdefs.h <<\_ACEOF
22134#define HAVE_SOCKETPAIR 1
22135_ACEOF
22136
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022137 { echo "$as_me:$LINENO: result: yes" >&5
22138echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022139else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022140 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022141sed 's/^/| /' conftest.$ac_ext >&5
22142
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022143 { echo "$as_me:$LINENO: result: no" >&5
22144echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022145
22146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022147
22148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022149
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022150# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022151{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22152echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022154/* confdefs.h. */
22155_ACEOF
22156cat confdefs.h >>conftest.$ac_ext
22157cat >>conftest.$ac_ext <<_ACEOF
22158/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022159#include <sys/types.h>
22160#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022161int
22162main ()
22163{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022164struct sockaddr x;
22165x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022166 ;
22167 return 0;
22168}
22169_ACEOF
22170rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022171if { (ac_try="$ac_compile"
22172case "(($ac_try" in
22173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22174 *) ac_try_echo=$ac_try;;
22175esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022179 grep -v '^ *+' conftest.er1 >conftest.err
22180 rm -f conftest.er1
22181 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022183 (exit $ac_status); } && {
22184 test -z "$ac_c_werror_flag" ||
22185 test ! -s conftest.err
22186 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022187 { echo "$as_me:$LINENO: result: yes" >&5
22188echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022189
22190cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022191#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022192_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022193
22194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022196sed 's/^/| /' conftest.$ac_ext >&5
22197
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022198 { echo "$as_me:$LINENO: result: no" >&5
22199echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022201
22202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022203
Guido van Rossumda88dad1995-01-26 00:46:29 +000022204va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022205{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22206echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022208/* confdefs.h. */
22209_ACEOF
22210cat confdefs.h >>conftest.$ac_ext
22211cat >>conftest.$ac_ext <<_ACEOF
22212/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022213
22214#ifdef HAVE_STDARG_PROTOTYPES
22215#include <stdarg.h>
22216#else
22217#include <varargs.h>
22218#endif
22219
Martin v. Löwis11437992002-04-12 09:54:03 +000022220int
22221main ()
22222{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022223va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022224 ;
22225 return 0;
22226}
22227_ACEOF
22228rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022229if { (ac_try="$ac_compile"
22230case "(($ac_try" in
22231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22232 *) ac_try_echo=$ac_try;;
22233esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022235 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022237 grep -v '^ *+' conftest.er1 >conftest.err
22238 rm -f conftest.er1
22239 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022241 (exit $ac_status); } && {
22242 test -z "$ac_c_werror_flag" ||
22243 test ! -s conftest.err
22244 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022245 :
22246else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022248sed 's/^/| /' conftest.$ac_ext >&5
22249
Martin v. Löwis11437992002-04-12 09:54:03 +000022250
22251
22252cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022253#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022254_ACEOF
22255
Guido van Rossumda88dad1995-01-26 00:46:29 +000022256 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022257
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022259
22260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022261{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22262echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022263
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022264# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022265
22266
22267
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022268{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22269echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022270if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022271 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022272else
Martin v. Löwis11437992002-04-12 09:54:03 +000022273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022274/* confdefs.h. */
22275_ACEOF
22276cat confdefs.h >>conftest.$ac_ext
22277cat >>conftest.$ac_ext <<_ACEOF
22278/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022279/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22280 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22281#define gethostbyname_r innocuous_gethostbyname_r
22282
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022283/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022284 which can conflict with char gethostbyname_r (); below.
22285 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022286 <limits.h> exists even on freestanding compilers. */
22287
22288#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022289# include <limits.h>
22290#else
22291# include <assert.h>
22292#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022293
22294#undef gethostbyname_r
22295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022296/* Override any GCC internal prototype to avoid an error.
22297 Use char because int might match the return type of a GCC
22298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022299#ifdef __cplusplus
22300extern "C"
22301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022302char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022303/* The GNU C library defines this for functions which it implements
22304 to always fail with ENOSYS. Some functions are actually named
22305 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022306#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022307choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022308#endif
22309
Skip Montanaro6dead952003-09-25 14:50:04 +000022310int
22311main ()
22312{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022313return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022314 ;
22315 return 0;
22316}
22317_ACEOF
22318rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022319if { (ac_try="$ac_link"
22320case "(($ac_try" in
22321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22322 *) ac_try_echo=$ac_try;;
22323esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022325 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022327 grep -v '^ *+' conftest.er1 >conftest.err
22328 rm -f conftest.er1
22329 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022331 (exit $ac_status); } && {
22332 test -z "$ac_c_werror_flag" ||
22333 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022334 } && test -s conftest$ac_exeext &&
22335 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022336 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022337else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022339sed 's/^/| /' conftest.$ac_ext >&5
22340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022341 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022343
22344rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022345 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022346fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022347{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22348echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22349if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022350
Martin v. Löwis11437992002-04-12 09:54:03 +000022351 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022352#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022353_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022354
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022355 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22356echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022357 OLD_CFLAGS=$CFLAGS
22358 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022360/* confdefs.h. */
22361_ACEOF
22362cat confdefs.h >>conftest.$ac_ext
22363cat >>conftest.$ac_ext <<_ACEOF
22364/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022365
22366# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022367
Martin v. Löwis11437992002-04-12 09:54:03 +000022368int
22369main ()
22370{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022371
22372 char *name;
22373 struct hostent *he, *res;
22374 char buffer[2048];
22375 int buflen = 2048;
22376 int h_errnop;
22377
22378 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022379
22380 ;
22381 return 0;
22382}
22383_ACEOF
22384rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022385if { (ac_try="$ac_compile"
22386case "(($ac_try" in
22387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22388 *) ac_try_echo=$ac_try;;
22389esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022391 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022393 grep -v '^ *+' conftest.er1 >conftest.err
22394 rm -f conftest.er1
22395 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022397 (exit $ac_status); } && {
22398 test -z "$ac_c_werror_flag" ||
22399 test ! -s conftest.err
22400 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022401
22402 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022403#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022404_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022405
Martin v. Löwis11437992002-04-12 09:54:03 +000022406
22407cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022408#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022409_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022410
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022411 { echo "$as_me:$LINENO: result: yes" >&5
22412echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022413
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022416sed 's/^/| /' conftest.$ac_ext >&5
22417
Martin v. Löwis11437992002-04-12 09:54:03 +000022418
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022419 { echo "$as_me:$LINENO: result: no" >&5
22420echo "${ECHO_T}no" >&6; }
22421 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22422echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022424/* confdefs.h. */
22425_ACEOF
22426cat confdefs.h >>conftest.$ac_ext
22427cat >>conftest.$ac_ext <<_ACEOF
22428/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022429
22430# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022431
Martin v. Löwis11437992002-04-12 09:54:03 +000022432int
22433main ()
22434{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022435
22436 char *name;
22437 struct hostent *he;
22438 char buffer[2048];
22439 int buflen = 2048;
22440 int h_errnop;
22441
22442 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022443
22444 ;
22445 return 0;
22446}
22447_ACEOF
22448rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022449if { (ac_try="$ac_compile"
22450case "(($ac_try" in
22451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22452 *) ac_try_echo=$ac_try;;
22453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022457 grep -v '^ *+' conftest.er1 >conftest.err
22458 rm -f conftest.er1
22459 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022461 (exit $ac_status); } && {
22462 test -z "$ac_c_werror_flag" ||
22463 test ! -s conftest.err
22464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022465
22466 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022467#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022468_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022469
Martin v. Löwis11437992002-04-12 09:54:03 +000022470
22471cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022472#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022473_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022474
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022475 { echo "$as_me:$LINENO: result: yes" >&5
22476echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022477
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022478else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022480sed 's/^/| /' conftest.$ac_ext >&5
22481
Martin v. Löwis11437992002-04-12 09:54:03 +000022482
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022483 { echo "$as_me:$LINENO: result: no" >&5
22484echo "${ECHO_T}no" >&6; }
22485 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22486echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022488/* confdefs.h. */
22489_ACEOF
22490cat confdefs.h >>conftest.$ac_ext
22491cat >>conftest.$ac_ext <<_ACEOF
22492/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022493
22494# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022495
Martin v. Löwis11437992002-04-12 09:54:03 +000022496int
22497main ()
22498{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022499
22500 char *name;
22501 struct hostent *he;
22502 struct hostent_data data;
22503
22504 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022505
22506 ;
22507 return 0;
22508}
22509_ACEOF
22510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022511if { (ac_try="$ac_compile"
22512case "(($ac_try" in
22513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22514 *) ac_try_echo=$ac_try;;
22515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022519 grep -v '^ *+' conftest.er1 >conftest.err
22520 rm -f conftest.er1
22521 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022523 (exit $ac_status); } && {
22524 test -z "$ac_c_werror_flag" ||
22525 test ! -s conftest.err
22526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022527
22528 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022529#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022530_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022531
Martin v. Löwis11437992002-04-12 09:54:03 +000022532
22533cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022534#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022535_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022536
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022537 { echo "$as_me:$LINENO: result: yes" >&5
22538echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022539
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022542sed 's/^/| /' conftest.$ac_ext >&5
22543
Martin v. Löwis11437992002-04-12 09:54:03 +000022544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022545 { echo "$as_me:$LINENO: result: no" >&5
22546echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022547
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022549
22550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022553
22554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022555
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022557
22558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022559 CFLAGS=$OLD_CFLAGS
22560
22561else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022562
Martin v. Löwis11437992002-04-12 09:54:03 +000022563
22564for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022565do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022566as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22567{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22568echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022569if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022570 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022571else
Martin v. Löwis11437992002-04-12 09:54:03 +000022572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022573/* confdefs.h. */
22574_ACEOF
22575cat confdefs.h >>conftest.$ac_ext
22576cat >>conftest.$ac_ext <<_ACEOF
22577/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022578/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22579 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22580#define $ac_func innocuous_$ac_func
22581
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022582/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022583 which can conflict with char $ac_func (); below.
22584 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022585 <limits.h> exists even on freestanding compilers. */
22586
22587#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022588# include <limits.h>
22589#else
22590# include <assert.h>
22591#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022592
22593#undef $ac_func
22594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022595/* Override any GCC internal prototype to avoid an error.
22596 Use char because int might match the return type of a GCC
22597 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022598#ifdef __cplusplus
22599extern "C"
22600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022601char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022602/* The GNU C library defines this for functions which it implements
22603 to always fail with ENOSYS. Some functions are actually named
22604 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022605#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022606choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022607#endif
22608
Skip Montanaro6dead952003-09-25 14:50:04 +000022609int
22610main ()
22611{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022612return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022613 ;
22614 return 0;
22615}
22616_ACEOF
22617rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022618if { (ac_try="$ac_link"
22619case "(($ac_try" in
22620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22621 *) ac_try_echo=$ac_try;;
22622esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022624 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022626 grep -v '^ *+' conftest.er1 >conftest.err
22627 rm -f conftest.er1
22628 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022630 (exit $ac_status); } && {
22631 test -z "$ac_c_werror_flag" ||
22632 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022633 } && test -s conftest$ac_exeext &&
22634 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022635 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022636else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022638sed 's/^/| /' conftest.$ac_ext >&5
22639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022640 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022642
22643rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022644 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022645fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022646ac_res=`eval echo '${'$as_ac_var'}'`
22647 { echo "$as_me:$LINENO: result: $ac_res" >&5
22648echo "${ECHO_T}$ac_res" >&6; }
22649if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022650 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022651#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022652_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022653
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022654fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022655done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022656
Michael W. Hudson54241132001-12-07 15:38:26 +000022657
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022658fi
22659
Michael W. Hudson54241132001-12-07 15:38:26 +000022660
22661
22662
22663
22664
22665
Guido van Rossum627b2d71993-12-24 10:39:16 +000022666# checks for system services
22667# (none yet)
22668
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022669# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022670{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22671echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022672if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022673 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022674else
Martin v. Löwis11437992002-04-12 09:54:03 +000022675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022676/* confdefs.h. */
22677_ACEOF
22678cat confdefs.h >>conftest.$ac_ext
22679cat >>conftest.$ac_ext <<_ACEOF
22680/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022681/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22682 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22683#define __fpu_control innocuous___fpu_control
22684
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022685/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022686 which can conflict with char __fpu_control (); below.
22687 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022688 <limits.h> exists even on freestanding compilers. */
22689
22690#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022691# include <limits.h>
22692#else
22693# include <assert.h>
22694#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022695
22696#undef __fpu_control
22697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022698/* Override any GCC internal prototype to avoid an error.
22699 Use char because int might match the return type of a GCC
22700 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022701#ifdef __cplusplus
22702extern "C"
22703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022704char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022705/* The GNU C library defines this for functions which it implements
22706 to always fail with ENOSYS. Some functions are actually named
22707 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022708#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022709choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022710#endif
22711
Skip Montanaro6dead952003-09-25 14:50:04 +000022712int
22713main ()
22714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022715return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022716 ;
22717 return 0;
22718}
22719_ACEOF
22720rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022721if { (ac_try="$ac_link"
22722case "(($ac_try" in
22723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22724 *) ac_try_echo=$ac_try;;
22725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022727 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022729 grep -v '^ *+' conftest.er1 >conftest.err
22730 rm -f conftest.er1
22731 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022733 (exit $ac_status); } && {
22734 test -z "$ac_c_werror_flag" ||
22735 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022736 } && test -s conftest$ac_exeext &&
22737 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022738 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022739else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022741sed 's/^/| /' conftest.$ac_ext >&5
22742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022743 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022745
22746rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022747 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022748fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022749{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22750echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22751if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022752 :
22753else
Martin v. Löwis11437992002-04-12 09:54:03 +000022754
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022755{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22756echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022757if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022759else
Martin v. Löwis11437992002-04-12 09:54:03 +000022760 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022761LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022762cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022763/* confdefs.h. */
22764_ACEOF
22765cat confdefs.h >>conftest.$ac_ext
22766cat >>conftest.$ac_ext <<_ACEOF
22767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022769/* Override any GCC internal prototype to avoid an error.
22770 Use char because int might match the return type of a GCC
22771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022772#ifdef __cplusplus
22773extern "C"
22774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022775char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022776int
22777main ()
22778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022779return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022780 ;
22781 return 0;
22782}
22783_ACEOF
22784rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022785if { (ac_try="$ac_link"
22786case "(($ac_try" in
22787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22788 *) ac_try_echo=$ac_try;;
22789esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022791 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022793 grep -v '^ *+' conftest.er1 >conftest.err
22794 rm -f conftest.er1
22795 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022797 (exit $ac_status); } && {
22798 test -z "$ac_c_werror_flag" ||
22799 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022800 } && test -s conftest$ac_exeext &&
22801 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022802 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022803else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022805sed 's/^/| /' conftest.$ac_ext >&5
22806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022807 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022809
22810rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022811 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022812LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022813fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022814{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22815echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22816if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022817 cat >>confdefs.h <<_ACEOF
22818#define HAVE_LIBIEEE 1
22819_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022820
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022821 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022822
Guido van Rossum627b2d71993-12-24 10:39:16 +000022823fi
22824
Michael W. Hudson54241132001-12-07 15:38:26 +000022825
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022826fi
22827
Michael W. Hudson54241132001-12-07 15:38:26 +000022828
Guido van Rossum7f253911997-05-09 02:42:48 +000022829# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022830{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22831echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022833# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022834if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022835 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022836if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022837then
22838
22839cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022840#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022841_ACEOF
22842
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022843 { echo "$as_me:$LINENO: result: yes" >&5
22844echo "${ECHO_T}yes" >&6; }
22845else { echo "$as_me:$LINENO: result: no" >&5
22846echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022847fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022849 { echo "$as_me:$LINENO: result: no" >&5
22850echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022851fi
22852
Guido van Rossum7f253911997-05-09 02:42:48 +000022853
Guido van Rossum7f43da71994-08-01 12:15:30 +000022854# check for --with-libm=...
22855
Guido van Rossum563e7081996-09-10 18:20:48 +000022856case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022857Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022858*) LIBM=-lm
22859esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022860{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22861echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022863# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022864if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022865 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022866if test "$withval" = no
22867then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022868 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22869echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022870elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022871then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022872 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22873echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22874else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22875echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022876 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022877fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022878else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022879 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22880echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022881fi
22882
Guido van Rossum7f43da71994-08-01 12:15:30 +000022883
22884# check for --with-libc=...
22885
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022886{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22887echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022889# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022890if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022891 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022892if test "$withval" = no
22893then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022894 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22895echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022896elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022897then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022898 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22899echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22900else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22901echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022902 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022903fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022905 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22906echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022907fi
22908
Guido van Rossum7f43da71994-08-01 12:15:30 +000022909
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022910# **************************************************
22911# * Check for various properties of floating point *
22912# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022913
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022914{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22915echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022916if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022917 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022918else
22919
22920if test "$cross_compiling" = yes; then
22921 ac_cv_little_endian_double=no
22922else
22923 cat >conftest.$ac_ext <<_ACEOF
22924/* confdefs.h. */
22925_ACEOF
22926cat confdefs.h >>conftest.$ac_ext
22927cat >>conftest.$ac_ext <<_ACEOF
22928/* end confdefs.h. */
22929
22930#include <string.h>
22931int main() {
22932 double x = 9006104071832581.0;
22933 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22934 return 0;
22935 else
22936 return 1;
22937}
22938
22939_ACEOF
22940rm -f conftest$ac_exeext
22941if { (ac_try="$ac_link"
22942case "(($ac_try" in
22943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22944 *) ac_try_echo=$ac_try;;
22945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022947 (eval "$ac_link") 2>&5
22948 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022950 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22951 { (case "(($ac_try" in
22952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22953 *) ac_try_echo=$ac_try;;
22954esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022956 (eval "$ac_try") 2>&5
22957 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022959 (exit $ac_status); }; }; then
22960 ac_cv_little_endian_double=yes
22961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022962 echo "$as_me: program exited with status $ac_status" >&5
22963echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022964sed 's/^/| /' conftest.$ac_ext >&5
22965
22966( exit $ac_status )
22967ac_cv_little_endian_double=no
22968fi
22969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22970fi
22971
22972
22973fi
22974
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022975{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22976echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022977if test "$ac_cv_little_endian_double" = yes
22978then
22979
22980cat >>confdefs.h <<\_ACEOF
22981#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22982_ACEOF
22983
22984fi
22985
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022986{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22987echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022988if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022989 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022990else
22991
22992if test "$cross_compiling" = yes; then
22993 ac_cv_big_endian_double=no
22994else
22995 cat >conftest.$ac_ext <<_ACEOF
22996/* confdefs.h. */
22997_ACEOF
22998cat confdefs.h >>conftest.$ac_ext
22999cat >>conftest.$ac_ext <<_ACEOF
23000/* end confdefs.h. */
23001
23002#include <string.h>
23003int main() {
23004 double x = 9006104071832581.0;
23005 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23006 return 0;
23007 else
23008 return 1;
23009}
23010
23011_ACEOF
23012rm -f conftest$ac_exeext
23013if { (ac_try="$ac_link"
23014case "(($ac_try" in
23015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23016 *) ac_try_echo=$ac_try;;
23017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023019 (eval "$ac_link") 2>&5
23020 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23023 { (case "(($ac_try" in
23024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23025 *) ac_try_echo=$ac_try;;
23026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023028 (eval "$ac_try") 2>&5
23029 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023031 (exit $ac_status); }; }; then
23032 ac_cv_big_endian_double=yes
23033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023034 echo "$as_me: program exited with status $ac_status" >&5
23035echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023036sed 's/^/| /' conftest.$ac_ext >&5
23037
23038( exit $ac_status )
23039ac_cv_big_endian_double=no
23040fi
23041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23042fi
23043
23044
23045fi
23046
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023047{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23048echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023049if test "$ac_cv_big_endian_double" = yes
23050then
23051
23052cat >>confdefs.h <<\_ACEOF
23053#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23054_ACEOF
23055
23056fi
23057
23058# Some ARM platforms use a mixed-endian representation for doubles.
23059# While Python doesn't currently have full support for these platforms
23060# (see e.g., issue 1762561), we can at least make sure that float <-> string
23061# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023062{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23063echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023064if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023065 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023066else
23067
23068if test "$cross_compiling" = yes; then
23069 ac_cv_mixed_endian_double=no
23070else
23071 cat >conftest.$ac_ext <<_ACEOF
23072/* confdefs.h. */
23073_ACEOF
23074cat confdefs.h >>conftest.$ac_ext
23075cat >>conftest.$ac_ext <<_ACEOF
23076/* end confdefs.h. */
23077
23078#include <string.h>
23079int main() {
23080 double x = 9006104071832581.0;
23081 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23082 return 0;
23083 else
23084 return 1;
23085}
23086
23087_ACEOF
23088rm -f conftest$ac_exeext
23089if { (ac_try="$ac_link"
23090case "(($ac_try" in
23091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23092 *) ac_try_echo=$ac_try;;
23093esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023095 (eval "$ac_link") 2>&5
23096 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23099 { (case "(($ac_try" in
23100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23101 *) ac_try_echo=$ac_try;;
23102esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023104 (eval "$ac_try") 2>&5
23105 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023107 (exit $ac_status); }; }; then
23108 ac_cv_mixed_endian_double=yes
23109else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023110 echo "$as_me: program exited with status $ac_status" >&5
23111echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023112sed 's/^/| /' conftest.$ac_ext >&5
23113
23114( exit $ac_status )
23115ac_cv_mixed_endian_double=no
23116fi
23117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23118fi
23119
23120
23121fi
23122
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023123{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23124echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023125if test "$ac_cv_mixed_endian_double" = yes
23126then
23127
23128cat >>confdefs.h <<\_ACEOF
23129#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23130_ACEOF
23131
23132fi
23133
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023134# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023135# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023136# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023137# rounding; this is a problem on x86, where the x87 FPU has a default
23138# rounding precision of 64 bits. For gcc/x86, we try to fix this by
23139# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023140if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
23141then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023142 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000023143 # x87 control word. It should be, but you never know...
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023144 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
23145echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023146 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023147/* confdefs.h. */
23148_ACEOF
23149cat confdefs.h >>conftest.$ac_ext
23150cat >>conftest.$ac_ext <<_ACEOF
23151/* end confdefs.h. */
23152
23153int
23154main ()
23155{
23156
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023157 unsigned short cw;
23158 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23159 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023160
23161 ;
23162 return 0;
23163}
23164_ACEOF
23165rm -f conftest.$ac_objext
23166if { (ac_try="$ac_compile"
23167case "(($ac_try" in
23168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23169 *) ac_try_echo=$ac_try;;
23170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023172 (eval "$ac_compile") 2>conftest.er1
23173 ac_status=$?
23174 grep -v '^ *+' conftest.er1 >conftest.err
23175 rm -f conftest.er1
23176 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023178 (exit $ac_status); } && {
23179 test -z "$ac_c_werror_flag" ||
23180 test ! -s conftest.err
23181 } && test -s conftest.$ac_objext; then
23182 have_gcc_asm_for_x87=yes
23183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023184 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023185sed 's/^/| /' conftest.$ac_ext >&5
23186
23187 have_gcc_asm_for_x87=no
23188fi
23189
23190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023191 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
23192echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023193 if test "$have_gcc_asm_for_x87" = yes
23194 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023195
23196cat >>confdefs.h <<\_ACEOF
23197#define HAVE_GCC_ASM_FOR_X87 1
23198_ACEOF
23199
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023200 fi
23201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023202
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023203# Detect whether system arithmetic is subject to x87-style double
23204# rounding issues. The result of this test has little meaning on non
23205# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23206# mode is round-to-nearest and double rounding issues are present, and
23207# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023208{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23209echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023210# $BASECFLAGS may affect the result
23211ac_save_cc="$CC"
23212CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023213if test "$cross_compiling" = yes; then
23214 ac_cv_x87_double_rounding=no
23215else
23216 cat >conftest.$ac_ext <<_ACEOF
23217/* confdefs.h. */
23218_ACEOF
23219cat confdefs.h >>conftest.$ac_ext
23220cat >>conftest.$ac_ext <<_ACEOF
23221/* end confdefs.h. */
23222
23223#include <stdlib.h>
23224#include <math.h>
23225int main() {
23226 volatile double x, y, z;
23227 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23228 x = 0.99999999999999989; /* 1-2**-53 */
23229 y = 1./x;
23230 if (y != 1.)
23231 exit(0);
23232 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23233 x = 1e16;
23234 y = 2.99999;
23235 z = x + y;
23236 if (z != 1e16+4.)
23237 exit(0);
23238 /* both tests show evidence of double rounding */
23239 exit(1);
23240}
23241
23242_ACEOF
23243rm -f conftest$ac_exeext
23244if { (ac_try="$ac_link"
23245case "(($ac_try" in
23246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23247 *) ac_try_echo=$ac_try;;
23248esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023250 (eval "$ac_link") 2>&5
23251 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023253 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23254 { (case "(($ac_try" in
23255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23256 *) ac_try_echo=$ac_try;;
23257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023259 (eval "$ac_try") 2>&5
23260 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023262 (exit $ac_status); }; }; then
23263 ac_cv_x87_double_rounding=no
23264else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023265 echo "$as_me: program exited with status $ac_status" >&5
23266echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023267sed 's/^/| /' conftest.$ac_ext >&5
23268
23269( exit $ac_status )
23270ac_cv_x87_double_rounding=yes
23271fi
23272rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23273fi
23274
23275
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023276CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023277{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23278echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023279if test "$ac_cv_x87_double_rounding" = yes
23280then
23281
23282cat >>confdefs.h <<\_ACEOF
23283#define X87_DOUBLE_ROUNDING 1
23284_ACEOF
23285
23286fi
23287
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023288# ************************************
23289# * Check for mathematical functions *
23290# ************************************
23291
23292LIBS_SAVE=$LIBS
23293LIBS="$LIBS $LIBM"
23294
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023295# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23296# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023297{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23298echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023299if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023300 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023301else
23302
23303if test "$cross_compiling" = yes; then
23304 ac_cv_tanh_preserves_zero_sign=no
23305else
23306 cat >conftest.$ac_ext <<_ACEOF
23307/* confdefs.h. */
23308_ACEOF
23309cat confdefs.h >>conftest.$ac_ext
23310cat >>conftest.$ac_ext <<_ACEOF
23311/* end confdefs.h. */
23312
23313#include <math.h>
23314#include <stdlib.h>
23315int main() {
23316 /* return 0 if either negative zeros don't exist
23317 on this platform or if negative zeros exist
23318 and tanh(-0.) == -0. */
23319 if (atan2(0., -1.) == atan2(-0., -1.) ||
23320 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23321 else exit(1);
23322}
23323
23324_ACEOF
23325rm -f conftest$ac_exeext
23326if { (ac_try="$ac_link"
23327case "(($ac_try" in
23328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23329 *) ac_try_echo=$ac_try;;
23330esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023332 (eval "$ac_link") 2>&5
23333 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023335 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23336 { (case "(($ac_try" in
23337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23338 *) ac_try_echo=$ac_try;;
23339esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023341 (eval "$ac_try") 2>&5
23342 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023344 (exit $ac_status); }; }; then
23345 ac_cv_tanh_preserves_zero_sign=yes
23346else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023347 echo "$as_me: program exited with status $ac_status" >&5
23348echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023349sed 's/^/| /' conftest.$ac_ext >&5
23350
23351( exit $ac_status )
23352ac_cv_tanh_preserves_zero_sign=no
23353fi
23354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23355fi
23356
23357
23358fi
23359
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023360{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23361echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023362if test "$ac_cv_tanh_preserves_zero_sign" = yes
23363then
23364
23365cat >>confdefs.h <<\_ACEOF
23366#define TANH_PRESERVES_ZERO_SIGN 1
23367_ACEOF
23368
23369fi
23370
23371
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023372
Michael W. Hudson54241132001-12-07 15:38:26 +000023373
Christian Heimes99170a52007-12-19 02:07:34 +000023374
23375
23376
23377
23378
Mark Dickinsonf2537862009-04-18 13:58:18 +000023379
Mark Dickinson9c113362009-09-05 10:36:23 +000023380for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23381do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023382as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23383{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23384echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023385if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023386 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023387else
23388 cat >conftest.$ac_ext <<_ACEOF
23389/* confdefs.h. */
23390_ACEOF
23391cat confdefs.h >>conftest.$ac_ext
23392cat >>conftest.$ac_ext <<_ACEOF
23393/* end confdefs.h. */
23394/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23395 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23396#define $ac_func innocuous_$ac_func
23397
23398/* System header to define __stub macros and hopefully few prototypes,
23399 which can conflict with char $ac_func (); below.
23400 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23401 <limits.h> exists even on freestanding compilers. */
23402
23403#ifdef __STDC__
23404# include <limits.h>
23405#else
23406# include <assert.h>
23407#endif
23408
23409#undef $ac_func
23410
23411/* Override any GCC internal prototype to avoid an error.
23412 Use char because int might match the return type of a GCC
23413 builtin and then its argument prototype would still apply. */
23414#ifdef __cplusplus
23415extern "C"
23416#endif
23417char $ac_func ();
23418/* The GNU C library defines this for functions which it implements
23419 to always fail with ENOSYS. Some functions are actually named
23420 something starting with __ and the normal name is an alias. */
23421#if defined __stub_$ac_func || defined __stub___$ac_func
23422choke me
23423#endif
23424
23425int
23426main ()
23427{
23428return $ac_func ();
23429 ;
23430 return 0;
23431}
23432_ACEOF
23433rm -f conftest.$ac_objext conftest$ac_exeext
23434if { (ac_try="$ac_link"
23435case "(($ac_try" in
23436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23437 *) ac_try_echo=$ac_try;;
23438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023440 (eval "$ac_link") 2>conftest.er1
23441 ac_status=$?
23442 grep -v '^ *+' conftest.er1 >conftest.err
23443 rm -f conftest.er1
23444 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023446 (exit $ac_status); } && {
23447 test -z "$ac_c_werror_flag" ||
23448 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023449 } && test -s conftest$ac_exeext &&
23450 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023451 eval "$as_ac_var=yes"
23452else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023453 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023454sed 's/^/| /' conftest.$ac_ext >&5
23455
23456 eval "$as_ac_var=no"
23457fi
23458
23459rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23460 conftest$ac_exeext conftest.$ac_ext
23461fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023462ac_res=`eval echo '${'$as_ac_var'}'`
23463 { echo "$as_me:$LINENO: result: $ac_res" >&5
23464echo "${ECHO_T}$ac_res" >&6; }
23465if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023466 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023467#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023468_ACEOF
23469
23470fi
23471done
23472
23473
23474
23475
23476
23477
23478for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023479do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023480as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23481{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23482echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023483if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023484 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023485else
23486 cat >conftest.$ac_ext <<_ACEOF
23487/* confdefs.h. */
23488_ACEOF
23489cat confdefs.h >>conftest.$ac_ext
23490cat >>conftest.$ac_ext <<_ACEOF
23491/* end confdefs.h. */
23492/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23493 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23494#define $ac_func innocuous_$ac_func
23495
23496/* System header to define __stub macros and hopefully few prototypes,
23497 which can conflict with char $ac_func (); below.
23498 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23499 <limits.h> exists even on freestanding compilers. */
23500
23501#ifdef __STDC__
23502# include <limits.h>
23503#else
23504# include <assert.h>
23505#endif
23506
23507#undef $ac_func
23508
23509/* Override any GCC internal prototype to avoid an error.
23510 Use char because int might match the return type of a GCC
23511 builtin and then its argument prototype would still apply. */
23512#ifdef __cplusplus
23513extern "C"
23514#endif
23515char $ac_func ();
23516/* The GNU C library defines this for functions which it implements
23517 to always fail with ENOSYS. Some functions are actually named
23518 something starting with __ and the normal name is an alias. */
23519#if defined __stub_$ac_func || defined __stub___$ac_func
23520choke me
23521#endif
23522
23523int
23524main ()
23525{
23526return $ac_func ();
23527 ;
23528 return 0;
23529}
23530_ACEOF
23531rm -f conftest.$ac_objext conftest$ac_exeext
23532if { (ac_try="$ac_link"
23533case "(($ac_try" in
23534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23535 *) ac_try_echo=$ac_try;;
23536esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023538 (eval "$ac_link") 2>conftest.er1
23539 ac_status=$?
23540 grep -v '^ *+' conftest.er1 >conftest.err
23541 rm -f conftest.er1
23542 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023544 (exit $ac_status); } && {
23545 test -z "$ac_c_werror_flag" ||
23546 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023547 } && test -s conftest$ac_exeext &&
23548 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023549 eval "$as_ac_var=yes"
23550else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023551 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023552sed 's/^/| /' conftest.$ac_ext >&5
23553
23554 eval "$as_ac_var=no"
23555fi
23556
23557rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23558 conftest$ac_exeext conftest.$ac_ext
23559fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023560ac_res=`eval echo '${'$as_ac_var'}'`
23561 { echo "$as_me:$LINENO: result: $ac_res" >&5
23562echo "${ECHO_T}$ac_res" >&6; }
23563if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023564 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023565#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023566_ACEOF
23567
23568fi
23569done
23570
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023571{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23572echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023573if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023574 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023575else
23576 cat >conftest.$ac_ext <<_ACEOF
23577/* confdefs.h. */
23578_ACEOF
23579cat confdefs.h >>conftest.$ac_ext
23580cat >>conftest.$ac_ext <<_ACEOF
23581/* end confdefs.h. */
23582#include <math.h>
23583
23584int
23585main ()
23586{
23587#ifndef isinf
23588 (void) isinf;
23589#endif
23590
23591 ;
23592 return 0;
23593}
23594_ACEOF
23595rm -f conftest.$ac_objext
23596if { (ac_try="$ac_compile"
23597case "(($ac_try" in
23598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23599 *) ac_try_echo=$ac_try;;
23600esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023602 (eval "$ac_compile") 2>conftest.er1
23603 ac_status=$?
23604 grep -v '^ *+' conftest.er1 >conftest.err
23605 rm -f conftest.er1
23606 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023608 (exit $ac_status); } && {
23609 test -z "$ac_c_werror_flag" ||
23610 test ! -s conftest.err
23611 } && test -s conftest.$ac_objext; then
23612 ac_cv_have_decl_isinf=yes
23613else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023614 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023615sed 's/^/| /' conftest.$ac_ext >&5
23616
23617 ac_cv_have_decl_isinf=no
23618fi
23619
23620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23621fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023622{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23623echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23624if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023625
23626cat >>confdefs.h <<_ACEOF
23627#define HAVE_DECL_ISINF 1
23628_ACEOF
23629
23630
23631else
23632 cat >>confdefs.h <<_ACEOF
23633#define HAVE_DECL_ISINF 0
23634_ACEOF
23635
23636
23637fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023638{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23639echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023640if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023641 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023642else
23643 cat >conftest.$ac_ext <<_ACEOF
23644/* confdefs.h. */
23645_ACEOF
23646cat confdefs.h >>conftest.$ac_ext
23647cat >>conftest.$ac_ext <<_ACEOF
23648/* end confdefs.h. */
23649#include <math.h>
23650
23651int
23652main ()
23653{
23654#ifndef isnan
23655 (void) isnan;
23656#endif
23657
23658 ;
23659 return 0;
23660}
23661_ACEOF
23662rm -f conftest.$ac_objext
23663if { (ac_try="$ac_compile"
23664case "(($ac_try" in
23665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23666 *) ac_try_echo=$ac_try;;
23667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023669 (eval "$ac_compile") 2>conftest.er1
23670 ac_status=$?
23671 grep -v '^ *+' conftest.er1 >conftest.err
23672 rm -f conftest.er1
23673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023675 (exit $ac_status); } && {
23676 test -z "$ac_c_werror_flag" ||
23677 test ! -s conftest.err
23678 } && test -s conftest.$ac_objext; then
23679 ac_cv_have_decl_isnan=yes
23680else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023681 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023682sed 's/^/| /' conftest.$ac_ext >&5
23683
23684 ac_cv_have_decl_isnan=no
23685fi
23686
23687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023689{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23690echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23691if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023692
23693cat >>confdefs.h <<_ACEOF
23694#define HAVE_DECL_ISNAN 1
23695_ACEOF
23696
23697
23698else
23699 cat >>confdefs.h <<_ACEOF
23700#define HAVE_DECL_ISNAN 0
23701_ACEOF
23702
23703
23704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023705{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23706echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023707if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023708 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023709else
23710 cat >conftest.$ac_ext <<_ACEOF
23711/* confdefs.h. */
23712_ACEOF
23713cat confdefs.h >>conftest.$ac_ext
23714cat >>conftest.$ac_ext <<_ACEOF
23715/* end confdefs.h. */
23716#include <math.h>
23717
23718int
23719main ()
23720{
23721#ifndef isfinite
23722 (void) isfinite;
23723#endif
23724
23725 ;
23726 return 0;
23727}
23728_ACEOF
23729rm -f conftest.$ac_objext
23730if { (ac_try="$ac_compile"
23731case "(($ac_try" in
23732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23733 *) ac_try_echo=$ac_try;;
23734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023736 (eval "$ac_compile") 2>conftest.er1
23737 ac_status=$?
23738 grep -v '^ *+' conftest.er1 >conftest.err
23739 rm -f conftest.er1
23740 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023742 (exit $ac_status); } && {
23743 test -z "$ac_c_werror_flag" ||
23744 test ! -s conftest.err
23745 } && test -s conftest.$ac_objext; then
23746 ac_cv_have_decl_isfinite=yes
23747else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023748 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023749sed 's/^/| /' conftest.$ac_ext >&5
23750
23751 ac_cv_have_decl_isfinite=no
23752fi
23753
23754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23755fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023756{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23757echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23758if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023759
23760cat >>confdefs.h <<_ACEOF
23761#define HAVE_DECL_ISFINITE 1
23762_ACEOF
23763
23764
23765else
23766 cat >>confdefs.h <<_ACEOF
23767#define HAVE_DECL_ISFINITE 0
23768_ACEOF
23769
23770
23771fi
23772
23773
Christian Heimes99170a52007-12-19 02:07:34 +000023774
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023775LIBS=$LIBS_SAVE
23776
Mark Dickinson10683072009-04-18 21:18:19 +000023777# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023778{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23779echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023780if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023781 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023782else
23783 if test "$cross_compiling" = yes; then
23784 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023785else
23786 cat >conftest.$ac_ext <<_ACEOF
23787/* confdefs.h. */
23788_ACEOF
23789cat confdefs.h >>conftest.$ac_ext
23790cat >>conftest.$ac_ext <<_ACEOF
23791/* end confdefs.h. */
23792
23793#include <unistd.h>
23794#include <fcntl.h>
23795#include <stdio.h>
23796#include <semaphore.h>
23797#include <sys/stat.h>
23798
23799int main(void){
23800 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23801 int count;
23802 int res;
23803 if(a==SEM_FAILED){
23804 perror("sem_open");
23805 return 1;
23806
23807 }
23808 res = sem_getvalue(a, &count);
23809 sem_close(a);
23810 return res==-1 ? 1 : 0;
23811}
23812
Mark Dickinson10683072009-04-18 21:18:19 +000023813_ACEOF
23814rm -f conftest$ac_exeext
23815if { (ac_try="$ac_link"
23816case "(($ac_try" in
23817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23818 *) ac_try_echo=$ac_try;;
23819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023821 (eval "$ac_link") 2>&5
23822 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023824 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23825 { (case "(($ac_try" in
23826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23827 *) ac_try_echo=$ac_try;;
23828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023830 (eval "$ac_try") 2>&5
23831 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023833 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023834 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023835else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023836 echo "$as_me: program exited with status $ac_status" >&5
23837echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023838sed 's/^/| /' conftest.$ac_ext >&5
23839
23840( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023841ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023842fi
23843rm -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 +000023844fi
23845
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023846
23847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023848fi
23849
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023850{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23851echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023852if test $ac_cv_broken_sem_getvalue = yes
23853then
23854
23855cat >>confdefs.h <<\_ACEOF
23856#define HAVE_BROKEN_SEM_GETVALUE 1
23857_ACEOF
23858
23859fi
23860
Mark Dickinsonbd792642009-03-18 20:06:12 +000023861# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023862{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23863echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023864# Check whether --enable-big-digits was given.
23865if test "${enable_big_digits+set}" = set; then
23866 enableval=$enable_big_digits; case $enable_big_digits in
23867yes)
23868 enable_big_digits=30 ;;
23869no)
23870 enable_big_digits=15 ;;
2387115|30)
23872 ;;
23873*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023874 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23875echo "$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 +000023876 { (exit 1); exit 1; }; } ;;
23877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023878{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23879echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023880
23881cat >>confdefs.h <<_ACEOF
23882#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23883_ACEOF
23884
23885
23886else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023887 { echo "$as_me:$LINENO: result: no value specified" >&5
23888echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023889fi
23890
23891
Guido van Rossumef2255b2000-03-10 22:30:29 +000023892# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023893if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023894 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23895echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023896if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023897 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023898fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023899{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23900echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023901else
Martin v. Löwis11437992002-04-12 09:54:03 +000023902 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023903{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23904echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023905cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023906/* confdefs.h. */
23907_ACEOF
23908cat confdefs.h >>conftest.$ac_ext
23909cat >>conftest.$ac_ext <<_ACEOF
23910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023911$ac_includes_default
23912#include <wchar.h>
23913_ACEOF
23914rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023915if { (ac_try="$ac_compile"
23916case "(($ac_try" in
23917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23918 *) ac_try_echo=$ac_try;;
23919esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023923 grep -v '^ *+' conftest.er1 >conftest.err
23924 rm -f conftest.er1
23925 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023927 (exit $ac_status); } && {
23928 test -z "$ac_c_werror_flag" ||
23929 test ! -s conftest.err
23930 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023931 ac_header_compiler=yes
23932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023934sed 's/^/| /' conftest.$ac_ext >&5
23935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023936 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023938
23939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023940{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23941echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023942
23943# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023944{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23945echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023946cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023947/* confdefs.h. */
23948_ACEOF
23949cat confdefs.h >>conftest.$ac_ext
23950cat >>conftest.$ac_ext <<_ACEOF
23951/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023952#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023953_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023954if { (ac_try="$ac_cpp conftest.$ac_ext"
23955case "(($ac_try" in
23956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23957 *) ac_try_echo=$ac_try;;
23958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023960 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023961 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023962 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023963 rm -f conftest.er1
23964 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023966 (exit $ac_status); } >/dev/null && {
23967 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23968 test ! -s conftest.err
23969 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023970 ac_header_preproc=yes
23971else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023973sed 's/^/| /' conftest.$ac_ext >&5
23974
Martin v. Löwis11437992002-04-12 09:54:03 +000023975 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023977
Martin v. Löwis11437992002-04-12 09:54:03 +000023978rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023979{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23980echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023981
23982# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023983case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23984 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023985 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23986echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23987 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23988echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023989 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023990 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023991 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023992 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23993echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23994 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23995echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23996 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23997echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23998 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23999echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24000 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24001echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24002 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24003echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024004 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024005## -------------------------------------- ##
24006## Report this to http://bugs.python.org/ ##
24007## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024008_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024009 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024010 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024011esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024012{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24013echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024014if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024015 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024016else
24017 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024018fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024019{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24020echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024021
24022fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024023if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024024
24025
24026cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024027#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024028_ACEOF
24029
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024030 wchar_h="yes"
24031
Guido van Rossumef2255b2000-03-10 22:30:29 +000024032else
Martin v. Löwis11437992002-04-12 09:54:03 +000024033 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024034
24035fi
24036
Michael W. Hudson54241132001-12-07 15:38:26 +000024037
Martin v. Löwis11437992002-04-12 09:54:03 +000024038
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024039# determine wchar_t size
24040if test "$wchar_h" = yes
24041then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024042 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24043echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24044if test "${ac_cv_type_wchar_t+set}" = set; then
24045 echo $ECHO_N "(cached) $ECHO_C" >&6
24046else
24047 cat >conftest.$ac_ext <<_ACEOF
24048/* confdefs.h. */
24049_ACEOF
24050cat confdefs.h >>conftest.$ac_ext
24051cat >>conftest.$ac_ext <<_ACEOF
24052/* end confdefs.h. */
24053#include <wchar.h>
24054
24055typedef wchar_t ac__type_new_;
24056int
24057main ()
24058{
24059if ((ac__type_new_ *) 0)
24060 return 0;
24061if (sizeof (ac__type_new_))
24062 return 0;
24063 ;
24064 return 0;
24065}
24066_ACEOF
24067rm -f conftest.$ac_objext
24068if { (ac_try="$ac_compile"
24069case "(($ac_try" in
24070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24071 *) ac_try_echo=$ac_try;;
24072esac
24073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24074 (eval "$ac_compile") 2>conftest.er1
24075 ac_status=$?
24076 grep -v '^ *+' conftest.er1 >conftest.err
24077 rm -f conftest.er1
24078 cat conftest.err >&5
24079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24080 (exit $ac_status); } && {
24081 test -z "$ac_c_werror_flag" ||
24082 test ! -s conftest.err
24083 } && test -s conftest.$ac_objext; then
24084 ac_cv_type_wchar_t=yes
24085else
24086 echo "$as_me: failed program was:" >&5
24087sed 's/^/| /' conftest.$ac_ext >&5
24088
24089 ac_cv_type_wchar_t=no
24090fi
24091
24092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24093fi
24094{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24095echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24096
24097# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024098# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24099# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24100# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024101{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24102echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024103if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024104 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024105else
Martin v. Löwis11437992002-04-12 09:54:03 +000024106 if test "$cross_compiling" = yes; then
24107 # Depending upon the size, compute the lo and hi bounds.
24108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024109/* confdefs.h. */
24110_ACEOF
24111cat confdefs.h >>conftest.$ac_ext
24112cat >>conftest.$ac_ext <<_ACEOF
24113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024114#include <wchar.h>
24115
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024116 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024117int
24118main ()
24119{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024120static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024121test_array [0] = 0
24122
24123 ;
24124 return 0;
24125}
24126_ACEOF
24127rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024128if { (ac_try="$ac_compile"
24129case "(($ac_try" in
24130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24131 *) ac_try_echo=$ac_try;;
24132esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024136 grep -v '^ *+' conftest.er1 >conftest.err
24137 rm -f conftest.er1
24138 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024140 (exit $ac_status); } && {
24141 test -z "$ac_c_werror_flag" ||
24142 test ! -s conftest.err
24143 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024144 ac_lo=0 ac_mid=0
24145 while :; do
24146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024147/* confdefs.h. */
24148_ACEOF
24149cat confdefs.h >>conftest.$ac_ext
24150cat >>conftest.$ac_ext <<_ACEOF
24151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024152#include <wchar.h>
24153
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024154 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024155int
24156main ()
24157{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024159test_array [0] = 0
24160
24161 ;
24162 return 0;
24163}
24164_ACEOF
24165rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024166if { (ac_try="$ac_compile"
24167case "(($ac_try" in
24168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24169 *) ac_try_echo=$ac_try;;
24170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024174 grep -v '^ *+' conftest.er1 >conftest.err
24175 rm -f conftest.er1
24176 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024178 (exit $ac_status); } && {
24179 test -z "$ac_c_werror_flag" ||
24180 test ! -s conftest.err
24181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024182 ac_hi=$ac_mid; break
24183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024185sed 's/^/| /' conftest.$ac_ext >&5
24186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024187 ac_lo=`expr $ac_mid + 1`
24188 if test $ac_lo -le $ac_mid; then
24189 ac_lo= ac_hi=
24190 break
24191 fi
24192 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024194
24195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024196 done
24197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024199sed 's/^/| /' conftest.$ac_ext >&5
24200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024201 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_))) < 0)];
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=-1 ac_mid=-1
24238 while :; do
24239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024240/* confdefs.h. */
24241_ACEOF
24242cat confdefs.h >>conftest.$ac_ext
24243cat >>conftest.$ac_ext <<_ACEOF
24244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024245#include <wchar.h>
24246
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024247 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024248int
24249main ()
24250{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024252test_array [0] = 0
24253
24254 ;
24255 return 0;
24256}
24257_ACEOF
24258rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024259if { (ac_try="$ac_compile"
24260case "(($ac_try" in
24261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24262 *) ac_try_echo=$ac_try;;
24263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024267 grep -v '^ *+' conftest.er1 >conftest.err
24268 rm -f conftest.er1
24269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024271 (exit $ac_status); } && {
24272 test -z "$ac_c_werror_flag" ||
24273 test ! -s conftest.err
24274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024275 ac_lo=$ac_mid; break
24276else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024278sed 's/^/| /' conftest.$ac_ext >&5
24279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024280 ac_hi=`expr '(' $ac_mid ')' - 1`
24281 if test $ac_mid -le $ac_hi; then
24282 ac_lo= ac_hi=
24283 break
24284 fi
24285 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024287
24288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024289 done
24290else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024292sed 's/^/| /' conftest.$ac_ext >&5
24293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024294 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024296
24297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024299
24300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024301# Binary search between lo and hi bounds.
24302while test "x$ac_lo" != "x$ac_hi"; do
24303 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024305/* confdefs.h. */
24306_ACEOF
24307cat confdefs.h >>conftest.$ac_ext
24308cat >>conftest.$ac_ext <<_ACEOF
24309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024310#include <wchar.h>
24311
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024312 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024313int
24314main ()
24315{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024317test_array [0] = 0
24318
24319 ;
24320 return 0;
24321}
24322_ACEOF
24323rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024324if { (ac_try="$ac_compile"
24325case "(($ac_try" in
24326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24327 *) ac_try_echo=$ac_try;;
24328esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024332 grep -v '^ *+' conftest.er1 >conftest.err
24333 rm -f conftest.er1
24334 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024336 (exit $ac_status); } && {
24337 test -z "$ac_c_werror_flag" ||
24338 test ! -s conftest.err
24339 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024340 ac_hi=$ac_mid
24341else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024343sed 's/^/| /' conftest.$ac_ext >&5
24344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024345 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024347
24348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024349done
24350case $ac_lo in
24351?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024352'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024353 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024354See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024355echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024356See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024357 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024358 else
24359 ac_cv_sizeof_wchar_t=0
24360 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024361esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024362else
Martin v. Löwis11437992002-04-12 09:54:03 +000024363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024364/* confdefs.h. */
24365_ACEOF
24366cat confdefs.h >>conftest.$ac_ext
24367cat >>conftest.$ac_ext <<_ACEOF
24368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024369#include <wchar.h>
24370
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024371 typedef wchar_t ac__type_sizeof_;
24372static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24373static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024374#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024375#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024376int
24377main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024378{
Martin v. Löwis11437992002-04-12 09:54:03 +000024379
24380 FILE *f = fopen ("conftest.val", "w");
24381 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024382 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024383 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024384 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024385 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024386 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024387 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024388 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024389 }
24390 else
24391 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024392 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024393 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024394 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024395 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024396 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024397 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024398
24399 ;
24400 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024401}
Martin v. Löwis11437992002-04-12 09:54:03 +000024402_ACEOF
24403rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024404if { (ac_try="$ac_link"
24405case "(($ac_try" in
24406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24407 *) ac_try_echo=$ac_try;;
24408esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024410 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024411 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024414 { (case "(($ac_try" in
24415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24416 *) ac_try_echo=$ac_try;;
24417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024419 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024420 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024422 (exit $ac_status); }; }; then
24423 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024424else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024425 echo "$as_me: program exited with status $ac_status" >&5
24426echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024427sed 's/^/| /' conftest.$ac_ext >&5
24428
Martin v. Löwis11437992002-04-12 09:54:03 +000024429( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024430if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024431 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024432See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024433echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024434See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024435 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024436 else
24437 ac_cv_sizeof_wchar_t=0
24438 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024440rm -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 +000024441fi
24442rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024443fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024444{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24445echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024446
24447
24448
Martin v. Löwis11437992002-04-12 09:54:03 +000024449cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024450#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024451_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024452
Michael W. Hudson54241132001-12-07 15:38:26 +000024453
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024454fi
24455
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024456{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24457echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024458have_ucs4_tcl=no
24459cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024460/* confdefs.h. */
24461_ACEOF
24462cat confdefs.h >>conftest.$ac_ext
24463cat >>conftest.$ac_ext <<_ACEOF
24464/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024465
24466#include <tcl.h>
24467#if TCL_UTF_MAX != 6
24468# error "NOT UCS4_TCL"
24469#endif
24470int
24471main ()
24472{
24473
24474 ;
24475 return 0;
24476}
24477_ACEOF
24478rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024479if { (ac_try="$ac_compile"
24480case "(($ac_try" in
24481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24482 *) ac_try_echo=$ac_try;;
24483esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024487 grep -v '^ *+' conftest.er1 >conftest.err
24488 rm -f conftest.er1
24489 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024491 (exit $ac_status); } && {
24492 test -z "$ac_c_werror_flag" ||
24493 test ! -s conftest.err
24494 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024495
24496
24497cat >>confdefs.h <<\_ACEOF
24498#define HAVE_UCS4_TCL 1
24499_ACEOF
24500
24501 have_ucs4_tcl=yes
24502
24503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024505sed 's/^/| /' conftest.$ac_ext >&5
24506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024507
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024509
24510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024511{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24512echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024513
Skip Montanaro6dead952003-09-25 14:50:04 +000024514# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024515if test "$wchar_h" = yes
24516then
24517 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024518 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24519echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024520 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024521 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024522else
24523
24524 if test "$cross_compiling" = yes; then
24525 ac_cv_wchar_t_signed=yes
24526else
24527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024528/* confdefs.h. */
24529_ACEOF
24530cat confdefs.h >>conftest.$ac_ext
24531cat >>conftest.$ac_ext <<_ACEOF
24532/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024533
24534 #include <wchar.h>
24535 int main()
24536 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024537 /* Success: exit code 0 */
24538 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024539 }
24540
24541_ACEOF
24542rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024543if { (ac_try="$ac_link"
24544case "(($ac_try" in
24545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24546 *) ac_try_echo=$ac_try;;
24547esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024549 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024550 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024553 { (case "(($ac_try" in
24554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24555 *) ac_try_echo=$ac_try;;
24556esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024558 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024559 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024561 (exit $ac_status); }; }; then
24562 ac_cv_wchar_t_signed=yes
24563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024564 echo "$as_me: program exited with status $ac_status" >&5
24565echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024566sed 's/^/| /' conftest.$ac_ext >&5
24567
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024568( exit $ac_status )
24569ac_cv_wchar_t_signed=no
24570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024571rm -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 +000024572fi
24573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024574
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024575fi
24576
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024577 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24578echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024579fi
24580
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024581{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24582echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024583
24584# Check whether --with-wide-unicode was given.
24585if test "${with_wide_unicode+set}" = set; then
24586 withval=$with_wide_unicode;
24587if test "$withval" != no
24588then unicode_size="4"
24589else unicode_size="2"
24590fi
24591
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024592else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024593
Georg Brandl52d168a2008-01-07 18:10:24 +000024594case "$have_ucs4_tcl" in
24595 yes) unicode_size="4" ;;
24596 *) unicode_size="2" ;;
24597esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024598
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024599fi
24600
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024601
24602
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024603
Georg Brandl52d168a2008-01-07 18:10:24 +000024604case "$unicode_size" in
24605 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024606#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024607_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024608 ;;
24609 *) cat >>confdefs.h <<\_ACEOF
24610#define Py_UNICODE_SIZE 2
24611_ACEOF
24612 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024613esac
24614
Michael W. Hudson54241132001-12-07 15:38:26 +000024615
Martin v. Löwis11437992002-04-12 09:54:03 +000024616
24617
Georg Brandl52d168a2008-01-07 18:10:24 +000024618# wchar_t is only usable if it maps to an unsigned type
24619if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024620 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024621then
24622 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024623
Martin v. Löwis11437992002-04-12 09:54:03 +000024624cat >>confdefs.h <<\_ACEOF
24625#define HAVE_USABLE_WCHAR_T 1
24626_ACEOF
24627
Georg Brandl52d168a2008-01-07 18:10:24 +000024628 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024629#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024630_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024631
Georg Brandl52d168a2008-01-07 18:10:24 +000024632elif test "$ac_cv_sizeof_short" = "$unicode_size"
24633then
24634 PY_UNICODE_TYPE="unsigned short"
24635 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024636#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024637_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024638
Georg Brandl52d168a2008-01-07 18:10:24 +000024639elif test "$ac_cv_sizeof_long" = "$unicode_size"
24640then
24641 PY_UNICODE_TYPE="unsigned long"
24642 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024643#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024644_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024645
Georg Brandl52d168a2008-01-07 18:10:24 +000024646else
24647 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024648fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024649{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24650echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024651
24652# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024653{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24654echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024655if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024657else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024658 # See if sys/param.h defines the BYTE_ORDER macro.
24659cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024660/* confdefs.h. */
24661_ACEOF
24662cat confdefs.h >>conftest.$ac_ext
24663cat >>conftest.$ac_ext <<_ACEOF
24664/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024665#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024666#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024667
Martin v. Löwis11437992002-04-12 09:54:03 +000024668int
24669main ()
24670{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024671#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24672 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24673 bogus endian macros
24674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024675
24676 ;
24677 return 0;
24678}
24679_ACEOF
24680rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024681if { (ac_try="$ac_compile"
24682case "(($ac_try" in
24683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24684 *) ac_try_echo=$ac_try;;
24685esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024689 grep -v '^ *+' conftest.er1 >conftest.err
24690 rm -f conftest.er1
24691 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024693 (exit $ac_status); } && {
24694 test -z "$ac_c_werror_flag" ||
24695 test ! -s conftest.err
24696 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024697 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024699/* confdefs.h. */
24700_ACEOF
24701cat confdefs.h >>conftest.$ac_ext
24702cat >>conftest.$ac_ext <<_ACEOF
24703/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024704#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024705#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024706
Martin v. Löwis11437992002-04-12 09:54:03 +000024707int
24708main ()
24709{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024710#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024711 not big endian
24712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024713
24714 ;
24715 return 0;
24716}
24717_ACEOF
24718rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024719if { (ac_try="$ac_compile"
24720case "(($ac_try" in
24721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24722 *) ac_try_echo=$ac_try;;
24723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024727 grep -v '^ *+' conftest.er1 >conftest.err
24728 rm -f conftest.er1
24729 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024731 (exit $ac_status); } && {
24732 test -z "$ac_c_werror_flag" ||
24733 test ! -s conftest.err
24734 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024735 ac_cv_c_bigendian=yes
24736else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024738sed 's/^/| /' conftest.$ac_ext >&5
24739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024740 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024742
24743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024744else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024746sed 's/^/| /' conftest.$ac_ext >&5
24747
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024748 # It does not; compile a test program.
24749if test "$cross_compiling" = yes; then
24750 # try to guess the endianness by grepping values into an object file
24751 ac_cv_c_bigendian=unknown
24752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024753/* confdefs.h. */
24754_ACEOF
24755cat confdefs.h >>conftest.$ac_ext
24756cat >>conftest.$ac_ext <<_ACEOF
24757/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024758short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24759short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24760void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24761short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24762short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24763void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024764int
24765main ()
24766{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024767 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024768 ;
24769 return 0;
24770}
24771_ACEOF
24772rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024773if { (ac_try="$ac_compile"
24774case "(($ac_try" in
24775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24776 *) ac_try_echo=$ac_try;;
24777esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024781 grep -v '^ *+' conftest.er1 >conftest.err
24782 rm -f conftest.er1
24783 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024785 (exit $ac_status); } && {
24786 test -z "$ac_c_werror_flag" ||
24787 test ! -s conftest.err
24788 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024789 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024790 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024791fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024792if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24793 if test "$ac_cv_c_bigendian" = unknown; then
24794 ac_cv_c_bigendian=no
24795 else
24796 # finding both strings is unlikely to happen, but who knows?
24797 ac_cv_c_bigendian=unknown
24798 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024799fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024800else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024802sed 's/^/| /' conftest.$ac_ext >&5
24803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024804
Martin v. Löwis11437992002-04-12 09:54:03 +000024805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024806
24807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024808else
24809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024810/* confdefs.h. */
24811_ACEOF
24812cat confdefs.h >>conftest.$ac_ext
24813cat >>conftest.$ac_ext <<_ACEOF
24814/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024815$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024816int
24817main ()
24818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024820 /* Are we little or big endian? From Harbison&Steele. */
24821 union
24822 {
24823 long int l;
24824 char c[sizeof (long int)];
24825 } u;
24826 u.l = 1;
24827 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024828
24829 ;
24830 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024831}
Martin v. Löwis11437992002-04-12 09:54:03 +000024832_ACEOF
24833rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024834if { (ac_try="$ac_link"
24835case "(($ac_try" in
24836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24837 *) ac_try_echo=$ac_try;;
24838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024840 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024841 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024843 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024844 { (case "(($ac_try" in
24845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24846 *) ac_try_echo=$ac_try;;
24847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024849 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024850 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024852 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024853 ac_cv_c_bigendian=no
24854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024855 echo "$as_me: program exited with status $ac_status" >&5
24856echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024857sed 's/^/| /' conftest.$ac_ext >&5
24858
Martin v. Löwis11437992002-04-12 09:54:03 +000024859( exit $ac_status )
24860ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024862rm -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 +000024863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024864
24865
Martin v. Löwis11437992002-04-12 09:54:03 +000024866fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024867
24868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24869fi
24870{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24871echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24872case $ac_cv_c_bigendian in
24873 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024874
24875cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024876#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024877_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024878 ;;
24879 no)
24880 ;;
24881 *)
24882 { { echo "$as_me:$LINENO: error: unknown endianness
24883presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24884echo "$as_me: error: unknown endianness
24885presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024886 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024887esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024888
Michael W. Hudson54241132001-12-07 15:38:26 +000024889
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024890# Check whether right shifting a negative integer extends the sign bit
24891# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024892{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24893echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024894if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024895 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024896else
Martin v. Löwis11437992002-04-12 09:54:03 +000024897
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024898if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024899 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024900else
Martin v. Löwis11437992002-04-12 09:54:03 +000024901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024902/* confdefs.h. */
24903_ACEOF
24904cat confdefs.h >>conftest.$ac_ext
24905cat >>conftest.$ac_ext <<_ACEOF
24906/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024907
24908int main()
24909{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024910 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024911}
24912
Martin v. Löwis11437992002-04-12 09:54:03 +000024913_ACEOF
24914rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024915if { (ac_try="$ac_link"
24916case "(($ac_try" in
24917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24918 *) ac_try_echo=$ac_try;;
24919esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024921 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024922 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024924 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024925 { (case "(($ac_try" in
24926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24927 *) ac_try_echo=$ac_try;;
24928esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024930 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024931 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024933 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024934 ac_cv_rshift_extends_sign=yes
24935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024936 echo "$as_me: program exited with status $ac_status" >&5
24937echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024938sed 's/^/| /' conftest.$ac_ext >&5
24939
Martin v. Löwis11437992002-04-12 09:54:03 +000024940( exit $ac_status )
24941ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024943rm -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 +000024944fi
24945
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024946
24947fi
24948
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024949{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24950echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024951if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024952then
Martin v. Löwis11437992002-04-12 09:54:03 +000024953
24954cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024955#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024956_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024957
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024958fi
24959
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024960# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024961{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24962echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024963if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024964 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024965else
Martin v. Löwis11437992002-04-12 09:54:03 +000024966
24967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024968/* confdefs.h. */
24969_ACEOF
24970cat confdefs.h >>conftest.$ac_ext
24971cat >>conftest.$ac_ext <<_ACEOF
24972/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024973#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024974int
24975main ()
24976{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024977
24978 FILE *f = fopen("/dev/null", "r");
24979 flockfile(f);
24980 getc_unlocked(f);
24981 funlockfile(f);
24982
Martin v. Löwis11437992002-04-12 09:54:03 +000024983 ;
24984 return 0;
24985}
24986_ACEOF
24987rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024988if { (ac_try="$ac_link"
24989case "(($ac_try" in
24990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24991 *) ac_try_echo=$ac_try;;
24992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024994 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024996 grep -v '^ *+' conftest.er1 >conftest.err
24997 rm -f conftest.er1
24998 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025000 (exit $ac_status); } && {
25001 test -z "$ac_c_werror_flag" ||
25002 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025003 } && test -s conftest$ac_exeext &&
25004 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025005 ac_cv_have_getc_unlocked=yes
25006else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025008sed 's/^/| /' conftest.$ac_ext >&5
25009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025010 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025012
25013rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025014 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025015fi
25016
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025017{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25018echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025019if test "$ac_cv_have_getc_unlocked" = yes
25020then
Martin v. Löwis11437992002-04-12 09:54:03 +000025021
25022cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025023#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025024_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025025
25026fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025027
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025028# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025029# save the value of LIBS so we don't actually link Python with readline
25030LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025031
Gregory P. Smith18820942008-09-07 06:24:49 +000025032# On some systems we need to link readline to a termcap compatible
25033# library. NOTE: Keep the precedence of listed libraries synchronised
25034# with setup.py.
25035py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025036{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25037echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025038for py_libtermcap in "" ncursesw ncurses curses termcap; do
25039 if test -z "$py_libtermcap"; then
25040 READLINE_LIBS="-lreadline"
25041 else
25042 READLINE_LIBS="-lreadline -l$py_libtermcap"
25043 fi
25044 LIBS="$READLINE_LIBS $LIBS_no_readline"
25045 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025046/* confdefs.h. */
25047_ACEOF
25048cat confdefs.h >>conftest.$ac_ext
25049cat >>conftest.$ac_ext <<_ACEOF
25050/* end confdefs.h. */
25051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025052/* Override any GCC internal prototype to avoid an error.
25053 Use char because int might match the return type of a GCC
25054 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025055#ifdef __cplusplus
25056extern "C"
25057#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025058char readline ();
25059int
25060main ()
25061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025062return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025063 ;
25064 return 0;
25065}
25066_ACEOF
25067rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025068if { (ac_try="$ac_link"
25069case "(($ac_try" in
25070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25071 *) ac_try_echo=$ac_try;;
25072esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025074 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025075 ac_status=$?
25076 grep -v '^ *+' conftest.er1 >conftest.err
25077 rm -f conftest.er1
25078 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025080 (exit $ac_status); } && {
25081 test -z "$ac_c_werror_flag" ||
25082 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025083 } && test -s conftest$ac_exeext &&
25084 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025085 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025087 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025088sed 's/^/| /' conftest.$ac_ext >&5
25089
Gregory P. Smith18820942008-09-07 06:24:49 +000025090
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025092
25093rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025094 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025095 if test $py_cv_lib_readline = yes; then
25096 break
25097 fi
25098done
25099# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25100#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025101if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025102 { echo "$as_me:$LINENO: result: none" >&5
25103echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025105 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25106echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025107
25108cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025109#define HAVE_LIBREADLINE 1
25110_ACEOF
25111
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025112fi
25113
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025114# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025115{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25116echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025117if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025118 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025119else
25120 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025121LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025122cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025123/* confdefs.h. */
25124_ACEOF
25125cat confdefs.h >>conftest.$ac_ext
25126cat >>conftest.$ac_ext <<_ACEOF
25127/* end confdefs.h. */
25128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025129/* Override any GCC internal prototype to avoid an error.
25130 Use char because int might match the return type of a GCC
25131 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025132#ifdef __cplusplus
25133extern "C"
25134#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025135char rl_callback_handler_install ();
25136int
25137main ()
25138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025139return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025140 ;
25141 return 0;
25142}
25143_ACEOF
25144rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025145if { (ac_try="$ac_link"
25146case "(($ac_try" in
25147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25148 *) ac_try_echo=$ac_try;;
25149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025151 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025153 grep -v '^ *+' conftest.er1 >conftest.err
25154 rm -f conftest.er1
25155 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025157 (exit $ac_status); } && {
25158 test -z "$ac_c_werror_flag" ||
25159 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025160 } && test -s conftest$ac_exeext &&
25161 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025162 ac_cv_lib_readline_rl_callback_handler_install=yes
25163else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025164 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025165sed 's/^/| /' conftest.$ac_ext >&5
25166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025167 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025169
25170rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025171 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025172LIBS=$ac_check_lib_save_LIBS
25173fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025174{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25175echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25176if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025177
25178cat >>confdefs.h <<\_ACEOF
25179#define HAVE_RL_CALLBACK 1
25180_ACEOF
25181
25182fi
25183
25184
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025185# check for readline 2.2
25186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025187/* confdefs.h. */
25188_ACEOF
25189cat confdefs.h >>conftest.$ac_ext
25190cat >>conftest.$ac_ext <<_ACEOF
25191/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025192#include <readline/readline.h>
25193_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025194if { (ac_try="$ac_cpp conftest.$ac_ext"
25195case "(($ac_try" in
25196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25197 *) ac_try_echo=$ac_try;;
25198esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025200 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025201 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025202 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025203 rm -f conftest.er1
25204 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025206 (exit $ac_status); } >/dev/null && {
25207 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25208 test ! -s conftest.err
25209 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025210 have_readline=yes
25211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025213sed 's/^/| /' conftest.$ac_ext >&5
25214
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025215 have_readline=no
25216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025217
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025218rm -f conftest.err conftest.$ac_ext
25219if test $have_readline = yes
25220then
25221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025222/* confdefs.h. */
25223_ACEOF
25224cat confdefs.h >>conftest.$ac_ext
25225cat >>conftest.$ac_ext <<_ACEOF
25226/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025227#include <readline/readline.h>
25228
25229_ACEOF
25230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025231 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025232
25233cat >>confdefs.h <<\_ACEOF
25234#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25235_ACEOF
25236
25237fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025238rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025239
25240fi
25241
Martin v. Löwis0daad592001-09-30 21:09:59 +000025242# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025243{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25244echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025245if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025247else
Martin v. Löwis11437992002-04-12 09:54:03 +000025248 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025249LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025250cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025251/* confdefs.h. */
25252_ACEOF
25253cat confdefs.h >>conftest.$ac_ext
25254cat >>conftest.$ac_ext <<_ACEOF
25255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025257/* Override any GCC internal prototype to avoid an error.
25258 Use char because int might match the return type of a GCC
25259 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025260#ifdef __cplusplus
25261extern "C"
25262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025263char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025264int
25265main ()
25266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025267return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025268 ;
25269 return 0;
25270}
25271_ACEOF
25272rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025273if { (ac_try="$ac_link"
25274case "(($ac_try" in
25275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25276 *) ac_try_echo=$ac_try;;
25277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025279 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025281 grep -v '^ *+' conftest.er1 >conftest.err
25282 rm -f conftest.er1
25283 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025285 (exit $ac_status); } && {
25286 test -z "$ac_c_werror_flag" ||
25287 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025288 } && test -s conftest$ac_exeext &&
25289 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025290 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025293sed 's/^/| /' conftest.$ac_ext >&5
25294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025295 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025297
25298rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025300LIBS=$ac_check_lib_save_LIBS
25301fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025302{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25303echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25304if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025305
Martin v. Löwis11437992002-04-12 09:54:03 +000025306cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025307#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025308_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025309
Martin v. Löwis0daad592001-09-30 21:09:59 +000025310fi
25311
Michael W. Hudson54241132001-12-07 15:38:26 +000025312
Thomas Wouters89d996e2007-09-08 17:39:28 +000025313# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025314{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25315echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025316if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025317 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025318else
25319 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025320LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025321cat >conftest.$ac_ext <<_ACEOF
25322/* confdefs.h. */
25323_ACEOF
25324cat confdefs.h >>conftest.$ac_ext
25325cat >>conftest.$ac_ext <<_ACEOF
25326/* end confdefs.h. */
25327
25328/* Override any GCC internal prototype to avoid an error.
25329 Use char because int might match the return type of a GCC
25330 builtin and then its argument prototype would still apply. */
25331#ifdef __cplusplus
25332extern "C"
25333#endif
25334char rl_completion_display_matches_hook ();
25335int
25336main ()
25337{
25338return rl_completion_display_matches_hook ();
25339 ;
25340 return 0;
25341}
25342_ACEOF
25343rm -f conftest.$ac_objext conftest$ac_exeext
25344if { (ac_try="$ac_link"
25345case "(($ac_try" in
25346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25347 *) ac_try_echo=$ac_try;;
25348esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025350 (eval "$ac_link") 2>conftest.er1
25351 ac_status=$?
25352 grep -v '^ *+' conftest.er1 >conftest.err
25353 rm -f conftest.er1
25354 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025356 (exit $ac_status); } && {
25357 test -z "$ac_c_werror_flag" ||
25358 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025359 } && test -s conftest$ac_exeext &&
25360 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025361 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25362else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025363 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025364sed 's/^/| /' conftest.$ac_ext >&5
25365
25366 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25367fi
25368
25369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25370 conftest$ac_exeext conftest.$ac_ext
25371LIBS=$ac_check_lib_save_LIBS
25372fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025373{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25374echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25375if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025376
25377cat >>confdefs.h <<\_ACEOF
25378#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25379_ACEOF
25380
25381fi
25382
25383
Martin v. Löwis0daad592001-09-30 21:09:59 +000025384# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025385{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25386echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025387if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025389else
Martin v. Löwis11437992002-04-12 09:54:03 +000025390 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025391LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025393/* confdefs.h. */
25394_ACEOF
25395cat confdefs.h >>conftest.$ac_ext
25396cat >>conftest.$ac_ext <<_ACEOF
25397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025399/* Override any GCC internal prototype to avoid an error.
25400 Use char because int might match the return type of a GCC
25401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025402#ifdef __cplusplus
25403extern "C"
25404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025405char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025406int
25407main ()
25408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025409return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025410 ;
25411 return 0;
25412}
25413_ACEOF
25414rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025415if { (ac_try="$ac_link"
25416case "(($ac_try" in
25417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25418 *) ac_try_echo=$ac_try;;
25419esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025421 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025423 grep -v '^ *+' conftest.er1 >conftest.err
25424 rm -f conftest.er1
25425 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025427 (exit $ac_status); } && {
25428 test -z "$ac_c_werror_flag" ||
25429 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025430 } && test -s conftest$ac_exeext &&
25431 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025432 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025433else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025435sed 's/^/| /' conftest.$ac_ext >&5
25436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025437 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025439
25440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025441 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025442LIBS=$ac_check_lib_save_LIBS
25443fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025444{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25445echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25446if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025447
Martin v. Löwis11437992002-04-12 09:54:03 +000025448cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025449#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025450_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025451
Guido van Rossum353ae582001-07-10 16:45:32 +000025452fi
25453
Jack Jansendd19cf82001-12-06 22:36:17 +000025454
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025455# also in readline 4.2
25456cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025457/* confdefs.h. */
25458_ACEOF
25459cat confdefs.h >>conftest.$ac_ext
25460cat >>conftest.$ac_ext <<_ACEOF
25461/* end confdefs.h. */
25462#include <readline/readline.h>
25463_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025464if { (ac_try="$ac_cpp conftest.$ac_ext"
25465case "(($ac_try" in
25466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25467 *) ac_try_echo=$ac_try;;
25468esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025470 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025471 ac_status=$?
25472 grep -v '^ *+' conftest.er1 >conftest.err
25473 rm -f conftest.er1
25474 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025476 (exit $ac_status); } >/dev/null && {
25477 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25478 test ! -s conftest.err
25479 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025480 have_readline=yes
25481else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025482 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025483sed 's/^/| /' conftest.$ac_ext >&5
25484
25485 have_readline=no
25486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025487
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025488rm -f conftest.err conftest.$ac_ext
25489if test $have_readline = yes
25490then
25491 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025492/* confdefs.h. */
25493_ACEOF
25494cat confdefs.h >>conftest.$ac_ext
25495cat >>conftest.$ac_ext <<_ACEOF
25496/* end confdefs.h. */
25497#include <readline/readline.h>
25498
25499_ACEOF
25500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25501 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25502
25503cat >>confdefs.h <<\_ACEOF
25504#define HAVE_RL_CATCH_SIGNAL 1
25505_ACEOF
25506
25507fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025508rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025509
25510fi
25511
Martin v. Löwis82bca632006-02-10 20:49:30 +000025512# End of readline checks: restore LIBS
25513LIBS=$LIBS_no_readline
25514
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025515{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25516echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025517if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025518 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025519else
Martin v. Löwis11437992002-04-12 09:54:03 +000025520
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025521if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025522 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025523else
Martin v. Löwis11437992002-04-12 09:54:03 +000025524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025525/* confdefs.h. */
25526_ACEOF
25527cat confdefs.h >>conftest.$ac_ext
25528cat >>conftest.$ac_ext <<_ACEOF
25529/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025530
25531int main()
25532{
25533 int val1 = nice(1);
25534 if (val1 != -1 && val1 == nice(2))
25535 exit(0);
25536 exit(1);
25537}
25538
Martin v. Löwis11437992002-04-12 09:54:03 +000025539_ACEOF
25540rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025541if { (ac_try="$ac_link"
25542case "(($ac_try" in
25543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25544 *) ac_try_echo=$ac_try;;
25545esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025547 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025548 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025550 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025551 { (case "(($ac_try" in
25552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25553 *) ac_try_echo=$ac_try;;
25554esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025556 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025557 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025559 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025560 ac_cv_broken_nice=yes
25561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025562 echo "$as_me: program exited with status $ac_status" >&5
25563echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025564sed 's/^/| /' conftest.$ac_ext >&5
25565
Martin v. Löwis11437992002-04-12 09:54:03 +000025566( exit $ac_status )
25567ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025569rm -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 +000025570fi
25571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025572
25573fi
25574
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025575{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25576echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025577if test "$ac_cv_broken_nice" = yes
25578then
Martin v. Löwis11437992002-04-12 09:54:03 +000025579
25580cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025581#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025582_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025583
25584fi
25585
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025586{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25587echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025588if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025589 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025590else
25591 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025592 ac_cv_broken_poll=no
25593else
25594 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025595/* confdefs.h. */
25596_ACEOF
25597cat confdefs.h >>conftest.$ac_ext
25598cat >>conftest.$ac_ext <<_ACEOF
25599/* end confdefs.h. */
25600
25601#include <poll.h>
25602
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025603int main()
25604{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025605 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025606 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025607
25608 close (42);
25609
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025610 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025611 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025612 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025613 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025614 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025615 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025616 return 1;
25617}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025618
25619_ACEOF
25620rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025621if { (ac_try="$ac_link"
25622case "(($ac_try" in
25623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25624 *) ac_try_echo=$ac_try;;
25625esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025627 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025628 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025630 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025631 { (case "(($ac_try" in
25632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25633 *) ac_try_echo=$ac_try;;
25634esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025636 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025637 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025639 (exit $ac_status); }; }; then
25640 ac_cv_broken_poll=yes
25641else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025642 echo "$as_me: program exited with status $ac_status" >&5
25643echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025644sed 's/^/| /' conftest.$ac_ext >&5
25645
25646( exit $ac_status )
25647ac_cv_broken_poll=no
25648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025649rm -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 +000025650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025651
25652
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025653fi
25654
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025655{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25656echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025657if test "$ac_cv_broken_poll" = yes
25658then
25659
25660cat >>confdefs.h <<\_ACEOF
25661#define HAVE_BROKEN_POLL 1
25662_ACEOF
25663
25664fi
25665
Brett Cannon43802422005-02-10 20:48:03 +000025666# 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 +000025667# (which is not required by ISO C or UNIX spec) and/or if we support
25668# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025669{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25670echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025671if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025672 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025673else
25674 cat >conftest.$ac_ext <<_ACEOF
25675/* confdefs.h. */
25676_ACEOF
25677cat confdefs.h >>conftest.$ac_ext
25678cat >>conftest.$ac_ext <<_ACEOF
25679/* end confdefs.h. */
25680#include <sys/types.h>
25681#include <$ac_cv_struct_tm>
25682
25683
25684int
25685main ()
25686{
25687static struct tm ac_aggr;
25688if (ac_aggr.tm_zone)
25689return 0;
25690 ;
25691 return 0;
25692}
25693_ACEOF
25694rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025695if { (ac_try="$ac_compile"
25696case "(($ac_try" in
25697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25698 *) ac_try_echo=$ac_try;;
25699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025701 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025702 ac_status=$?
25703 grep -v '^ *+' conftest.er1 >conftest.err
25704 rm -f conftest.er1
25705 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025707 (exit $ac_status); } && {
25708 test -z "$ac_c_werror_flag" ||
25709 test ! -s conftest.err
25710 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025711 ac_cv_member_struct_tm_tm_zone=yes
25712else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025713 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025714sed 's/^/| /' conftest.$ac_ext >&5
25715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025716 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025717/* confdefs.h. */
25718_ACEOF
25719cat confdefs.h >>conftest.$ac_ext
25720cat >>conftest.$ac_ext <<_ACEOF
25721/* end confdefs.h. */
25722#include <sys/types.h>
25723#include <$ac_cv_struct_tm>
25724
25725
25726int
25727main ()
25728{
25729static struct tm ac_aggr;
25730if (sizeof ac_aggr.tm_zone)
25731return 0;
25732 ;
25733 return 0;
25734}
25735_ACEOF
25736rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025737if { (ac_try="$ac_compile"
25738case "(($ac_try" in
25739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25740 *) ac_try_echo=$ac_try;;
25741esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025743 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025744 ac_status=$?
25745 grep -v '^ *+' conftest.er1 >conftest.err
25746 rm -f conftest.er1
25747 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025749 (exit $ac_status); } && {
25750 test -z "$ac_c_werror_flag" ||
25751 test ! -s conftest.err
25752 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025753 ac_cv_member_struct_tm_tm_zone=yes
25754else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025755 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025756sed 's/^/| /' conftest.$ac_ext >&5
25757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025758 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025760
25761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025763
25764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025765fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025766{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25767echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25768if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025769
25770cat >>confdefs.h <<_ACEOF
25771#define HAVE_STRUCT_TM_TM_ZONE 1
25772_ACEOF
25773
25774
25775fi
25776
25777if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25778
25779cat >>confdefs.h <<\_ACEOF
25780#define HAVE_TM_ZONE 1
25781_ACEOF
25782
25783else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025784 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25785echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025786if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025787 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025788else
25789 cat >conftest.$ac_ext <<_ACEOF
25790/* confdefs.h. */
25791_ACEOF
25792cat confdefs.h >>conftest.$ac_ext
25793cat >>conftest.$ac_ext <<_ACEOF
25794/* end confdefs.h. */
25795#include <time.h>
25796
25797int
25798main ()
25799{
25800#ifndef tzname
25801 (void) tzname;
25802#endif
25803
25804 ;
25805 return 0;
25806}
25807_ACEOF
25808rm -f conftest.$ac_objext
25809if { (ac_try="$ac_compile"
25810case "(($ac_try" in
25811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25812 *) ac_try_echo=$ac_try;;
25813esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025815 (eval "$ac_compile") 2>conftest.er1
25816 ac_status=$?
25817 grep -v '^ *+' conftest.er1 >conftest.err
25818 rm -f conftest.er1
25819 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025821 (exit $ac_status); } && {
25822 test -z "$ac_c_werror_flag" ||
25823 test ! -s conftest.err
25824 } && test -s conftest.$ac_objext; then
25825 ac_cv_have_decl_tzname=yes
25826else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025827 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025828sed 's/^/| /' conftest.$ac_ext >&5
25829
25830 ac_cv_have_decl_tzname=no
25831fi
25832
25833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25834fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025835{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25836echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25837if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025838
25839cat >>confdefs.h <<_ACEOF
25840#define HAVE_DECL_TZNAME 1
25841_ACEOF
25842
25843
25844else
25845 cat >>confdefs.h <<_ACEOF
25846#define HAVE_DECL_TZNAME 0
25847_ACEOF
25848
25849
25850fi
25851
25852
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025853 { echo "$as_me:$LINENO: checking for tzname" >&5
25854echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025855if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025856 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025857else
25858 cat >conftest.$ac_ext <<_ACEOF
25859/* confdefs.h. */
25860_ACEOF
25861cat confdefs.h >>conftest.$ac_ext
25862cat >>conftest.$ac_ext <<_ACEOF
25863/* end confdefs.h. */
25864#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025865#if !HAVE_DECL_TZNAME
25866extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025867#endif
25868
25869int
25870main ()
25871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025872return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025873 ;
25874 return 0;
25875}
25876_ACEOF
25877rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025878if { (ac_try="$ac_link"
25879case "(($ac_try" in
25880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25881 *) ac_try_echo=$ac_try;;
25882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025884 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025885 ac_status=$?
25886 grep -v '^ *+' conftest.er1 >conftest.err
25887 rm -f conftest.er1
25888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025890 (exit $ac_status); } && {
25891 test -z "$ac_c_werror_flag" ||
25892 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025893 } && test -s conftest$ac_exeext &&
25894 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025895 ac_cv_var_tzname=yes
25896else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025897 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025898sed 's/^/| /' conftest.$ac_ext >&5
25899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025900 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025902
25903rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025904 conftest$ac_exeext conftest.$ac_ext
25905fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025906{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25907echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025908 if test $ac_cv_var_tzname = yes; then
25909
25910cat >>confdefs.h <<\_ACEOF
25911#define HAVE_TZNAME 1
25912_ACEOF
25913
25914 fi
25915fi
25916
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025917
Martin v. Löwis1d459062005-03-14 21:23:33 +000025918# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025919{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25920echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025921if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025923else
25924
25925if test "$cross_compiling" = yes; then
25926 ac_cv_working_tzset=no
25927else
25928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025929/* confdefs.h. */
25930_ACEOF
25931cat confdefs.h >>conftest.$ac_ext
25932cat >>conftest.$ac_ext <<_ACEOF
25933/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025934
25935#include <stdlib.h>
25936#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025937#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025938
25939#if HAVE_TZNAME
25940extern char *tzname[];
25941#endif
25942
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025943int main()
25944{
Brett Cannon18367812003-09-19 00:59:16 +000025945 /* Note that we need to ensure that not only does tzset(3)
25946 do 'something' with localtime, but it works as documented
25947 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025948 This includes making sure that tzname is set properly if
25949 tm->tm_zone does not exist since it is the alternative way
25950 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025951
25952 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025953 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025954 */
25955
Martin v. Löwis1d459062005-03-14 21:23:33 +000025956 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025957 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25958
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025959 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025960 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025961 if (localtime(&groundhogday)->tm_hour != 0)
25962 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025963#if HAVE_TZNAME
25964 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25965 if (strcmp(tzname[0], "UTC") ||
25966 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25967 exit(1);
25968#endif
Brett Cannon18367812003-09-19 00:59:16 +000025969
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025970 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025971 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025972 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025973 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025974#if HAVE_TZNAME
25975 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25976 exit(1);
25977#endif
Brett Cannon18367812003-09-19 00:59:16 +000025978
25979 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25980 tzset();
25981 if (localtime(&groundhogday)->tm_hour != 11)
25982 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025983#if HAVE_TZNAME
25984 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25985 exit(1);
25986#endif
25987
25988#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025989 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25990 exit(1);
25991 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25992 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025993#endif
Brett Cannon18367812003-09-19 00:59:16 +000025994
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025995 exit(0);
25996}
25997
25998_ACEOF
25999rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026000if { (ac_try="$ac_link"
26001case "(($ac_try" in
26002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26003 *) ac_try_echo=$ac_try;;
26004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026006 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026007 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026010 { (case "(($ac_try" in
26011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26012 *) ac_try_echo=$ac_try;;
26013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026015 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026016 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026018 (exit $ac_status); }; }; then
26019 ac_cv_working_tzset=yes
26020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026021 echo "$as_me: program exited with status $ac_status" >&5
26022echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026023sed 's/^/| /' conftest.$ac_ext >&5
26024
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026025( exit $ac_status )
26026ac_cv_working_tzset=no
26027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026028rm -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 +000026029fi
26030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026031
26032fi
26033
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026034{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26035echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026036if test "$ac_cv_working_tzset" = yes
26037then
26038
26039cat >>confdefs.h <<\_ACEOF
26040#define HAVE_WORKING_TZSET 1
26041_ACEOF
26042
26043fi
26044
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026045# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026046{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26047echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026048if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026049 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026050else
26051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026052/* confdefs.h. */
26053_ACEOF
26054cat confdefs.h >>conftest.$ac_ext
26055cat >>conftest.$ac_ext <<_ACEOF
26056/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026057#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026058int
26059main ()
26060{
26061
26062struct stat st;
26063st.st_mtim.tv_nsec = 1;
26064
26065 ;
26066 return 0;
26067}
26068_ACEOF
26069rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026070if { (ac_try="$ac_compile"
26071case "(($ac_try" in
26072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26073 *) ac_try_echo=$ac_try;;
26074esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026078 grep -v '^ *+' conftest.er1 >conftest.err
26079 rm -f conftest.er1
26080 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026082 (exit $ac_status); } && {
26083 test -z "$ac_c_werror_flag" ||
26084 test ! -s conftest.err
26085 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026086 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026087else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026089sed 's/^/| /' conftest.$ac_ext >&5
26090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026091 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026092fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26095fi
26096
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026097{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26098echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026099if test "$ac_cv_stat_tv_nsec" = yes
26100then
26101
26102cat >>confdefs.h <<\_ACEOF
26103#define HAVE_STAT_TV_NSEC 1
26104_ACEOF
26105
26106fi
26107
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026108# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026109{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26110echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026111if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026112 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026113else
26114 cat >conftest.$ac_ext <<_ACEOF
26115/* confdefs.h. */
26116_ACEOF
26117cat confdefs.h >>conftest.$ac_ext
26118cat >>conftest.$ac_ext <<_ACEOF
26119/* end confdefs.h. */
26120#include <sys/stat.h>
26121int
26122main ()
26123{
26124
26125struct stat st;
26126st.st_mtimespec.tv_nsec = 1;
26127
26128 ;
26129 return 0;
26130}
26131_ACEOF
26132rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026133if { (ac_try="$ac_compile"
26134case "(($ac_try" in
26135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26136 *) ac_try_echo=$ac_try;;
26137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026140 ac_status=$?
26141 grep -v '^ *+' conftest.er1 >conftest.err
26142 rm -f conftest.er1
26143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026145 (exit $ac_status); } && {
26146 test -z "$ac_c_werror_flag" ||
26147 test ! -s conftest.err
26148 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026149 ac_cv_stat_tv_nsec2=yes
26150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026151 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026152sed 's/^/| /' conftest.$ac_ext >&5
26153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026154 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026155fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26158fi
26159
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026160{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26161echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026162if test "$ac_cv_stat_tv_nsec2" = yes
26163then
26164
26165cat >>confdefs.h <<\_ACEOF
26166#define HAVE_STAT_TV_NSEC2 1
26167_ACEOF
26168
26169fi
26170
Jack Jansen666b1e72001-10-31 12:11:48 +000026171# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026172{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26173echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026174if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026175 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026176else
Martin v. Löwis11437992002-04-12 09:54:03 +000026177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026178/* confdefs.h. */
26179_ACEOF
26180cat confdefs.h >>conftest.$ac_ext
26181cat >>conftest.$ac_ext <<_ACEOF
26182/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026183#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026184int
26185main ()
26186{
Jack Jansen666b1e72001-10-31 12:11:48 +000026187
26188 int rtn;
26189 rtn = mvwdelch(0,0,0);
26190
Martin v. Löwis11437992002-04-12 09:54:03 +000026191 ;
26192 return 0;
26193}
26194_ACEOF
26195rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026196if { (ac_try="$ac_compile"
26197case "(($ac_try" in
26198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26199 *) ac_try_echo=$ac_try;;
26200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026202 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026204 grep -v '^ *+' conftest.er1 >conftest.err
26205 rm -f conftest.er1
26206 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026208 (exit $ac_status); } && {
26209 test -z "$ac_c_werror_flag" ||
26210 test ! -s conftest.err
26211 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026212 ac_cv_mvwdelch_is_expression=yes
26213else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026215sed 's/^/| /' conftest.$ac_ext >&5
26216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026217 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026218fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26221fi
26222
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026223{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26224echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026225
26226if test "$ac_cv_mvwdelch_is_expression" = yes
26227then
Martin v. Löwis11437992002-04-12 09:54:03 +000026228
26229cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026230#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026231_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026232
26233fi
26234
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026235{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26236echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026237if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026238 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026239else
Martin v. Löwis11437992002-04-12 09:54:03 +000026240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026241/* confdefs.h. */
26242_ACEOF
26243cat confdefs.h >>conftest.$ac_ext
26244cat >>conftest.$ac_ext <<_ACEOF
26245/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026246#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026247int
26248main ()
26249{
Jack Jansen666b1e72001-10-31 12:11:48 +000026250
26251 WINDOW *w;
26252 w->_flags = 0;
26253
Martin v. Löwis11437992002-04-12 09:54:03 +000026254 ;
26255 return 0;
26256}
26257_ACEOF
26258rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026259if { (ac_try="$ac_compile"
26260case "(($ac_try" in
26261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26262 *) ac_try_echo=$ac_try;;
26263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026267 grep -v '^ *+' conftest.er1 >conftest.err
26268 rm -f conftest.er1
26269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026271 (exit $ac_status); } && {
26272 test -z "$ac_c_werror_flag" ||
26273 test ! -s conftest.err
26274 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026275 ac_cv_window_has_flags=yes
26276else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026278sed 's/^/| /' conftest.$ac_ext >&5
26279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026280 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026281fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26284fi
26285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026286{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26287echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026288
Jack Jansen666b1e72001-10-31 12:11:48 +000026289
26290if test "$ac_cv_window_has_flags" = yes
26291then
Martin v. Löwis11437992002-04-12 09:54:03 +000026292
26293cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026294#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026295_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026296
26297fi
26298
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026299{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26300echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026301cat >conftest.$ac_ext <<_ACEOF
26302/* confdefs.h. */
26303_ACEOF
26304cat confdefs.h >>conftest.$ac_ext
26305cat >>conftest.$ac_ext <<_ACEOF
26306/* end confdefs.h. */
26307#include <curses.h>
26308int
26309main ()
26310{
26311void *x=is_term_resized
26312 ;
26313 return 0;
26314}
26315_ACEOF
26316rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026317if { (ac_try="$ac_compile"
26318case "(($ac_try" in
26319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26320 *) ac_try_echo=$ac_try;;
26321esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026323 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026324 ac_status=$?
26325 grep -v '^ *+' conftest.er1 >conftest.err
26326 rm -f conftest.er1
26327 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026329 (exit $ac_status); } && {
26330 test -z "$ac_c_werror_flag" ||
26331 test ! -s conftest.err
26332 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026333
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026334cat >>confdefs.h <<\_ACEOF
26335#define HAVE_CURSES_IS_TERM_RESIZED 1
26336_ACEOF
26337
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026338 { echo "$as_me:$LINENO: result: yes" >&5
26339echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026340else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026341 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026342sed 's/^/| /' conftest.$ac_ext >&5
26343
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026344 { echo "$as_me:$LINENO: result: no" >&5
26345echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026346
26347fi
26348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26350
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026351{ echo "$as_me:$LINENO: checking for resize_term" >&5
26352echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026353cat >conftest.$ac_ext <<_ACEOF
26354/* confdefs.h. */
26355_ACEOF
26356cat confdefs.h >>conftest.$ac_ext
26357cat >>conftest.$ac_ext <<_ACEOF
26358/* end confdefs.h. */
26359#include <curses.h>
26360int
26361main ()
26362{
26363void *x=resize_term
26364 ;
26365 return 0;
26366}
26367_ACEOF
26368rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026369if { (ac_try="$ac_compile"
26370case "(($ac_try" in
26371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26372 *) ac_try_echo=$ac_try;;
26373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026375 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026376 ac_status=$?
26377 grep -v '^ *+' conftest.er1 >conftest.err
26378 rm -f conftest.er1
26379 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026381 (exit $ac_status); } && {
26382 test -z "$ac_c_werror_flag" ||
26383 test ! -s conftest.err
26384 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026385
26386cat >>confdefs.h <<\_ACEOF
26387#define HAVE_CURSES_RESIZE_TERM 1
26388_ACEOF
26389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026390 { echo "$as_me:$LINENO: result: yes" >&5
26391echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026392else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026393 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026394sed 's/^/| /' conftest.$ac_ext >&5
26395
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026396 { echo "$as_me:$LINENO: result: no" >&5
26397echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026398
26399fi
26400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26402
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026403{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26404echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026405cat >conftest.$ac_ext <<_ACEOF
26406/* confdefs.h. */
26407_ACEOF
26408cat confdefs.h >>conftest.$ac_ext
26409cat >>conftest.$ac_ext <<_ACEOF
26410/* end confdefs.h. */
26411#include <curses.h>
26412int
26413main ()
26414{
26415void *x=resizeterm
26416 ;
26417 return 0;
26418}
26419_ACEOF
26420rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026421if { (ac_try="$ac_compile"
26422case "(($ac_try" in
26423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26424 *) ac_try_echo=$ac_try;;
26425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026427 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026428 ac_status=$?
26429 grep -v '^ *+' conftest.er1 >conftest.err
26430 rm -f conftest.er1
26431 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026433 (exit $ac_status); } && {
26434 test -z "$ac_c_werror_flag" ||
26435 test ! -s conftest.err
26436 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026437
26438cat >>confdefs.h <<\_ACEOF
26439#define HAVE_CURSES_RESIZETERM 1
26440_ACEOF
26441
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026442 { echo "$as_me:$LINENO: result: yes" >&5
26443echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026444else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026445 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026446sed 's/^/| /' conftest.$ac_ext >&5
26447
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026448 { echo "$as_me:$LINENO: result: no" >&5
26449echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026450
26451fi
26452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26454
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026455{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26456echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026457
26458if test -r /dev/ptmx
26459then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026460 { echo "$as_me:$LINENO: result: yes" >&5
26461echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026462
26463cat >>confdefs.h <<\_ACEOF
26464#define HAVE_DEV_PTMX 1
26465_ACEOF
26466
Thomas Wouters89f507f2006-12-13 04:49:30 +000026467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026468 { echo "$as_me:$LINENO: result: no" >&5
26469echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026470fi
26471
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026472{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26473echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026474
26475if test -r /dev/ptc
26476then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026477 { echo "$as_me:$LINENO: result: yes" >&5
26478echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026479
26480cat >>confdefs.h <<\_ACEOF
26481#define HAVE_DEV_PTC 1
26482_ACEOF
26483
Thomas Wouters89f507f2006-12-13 04:49:30 +000026484else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026485 { echo "$as_me:$LINENO: result: no" >&5
26486echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026487fi
26488
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026489{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26490echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026491if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026492 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026493else
26494 if test "$cross_compiling" = yes; then
26495 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026496else
26497 cat >conftest.$ac_ext <<_ACEOF
26498/* confdefs.h. */
26499_ACEOF
26500cat confdefs.h >>conftest.$ac_ext
26501cat >>conftest.$ac_ext <<_ACEOF
26502/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026503
Thomas Wouters477c8d52006-05-27 19:21:47 +000026504#include <stdio.h>
26505#include <stddef.h>
26506#include <string.h>
26507
Christian Heimes2c181612007-12-17 20:04:13 +000026508#ifdef HAVE_SYS_TYPES_H
26509#include <sys/types.h>
26510#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026511
26512#ifdef HAVE_SSIZE_T
26513typedef ssize_t Py_ssize_t;
26514#elif SIZEOF_VOID_P == SIZEOF_LONG
26515typedef long Py_ssize_t;
26516#else
26517typedef int Py_ssize_t;
26518#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026519
Christian Heimes2c181612007-12-17 20:04:13 +000026520int main()
26521{
26522 char buffer[256];
26523
Thomas Wouters477c8d52006-05-27 19:21:47 +000026524 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26525 return 1;
26526
Thomas Wouters89f507f2006-12-13 04:49:30 +000026527 if (strcmp(buffer, "123"))
26528 return 1;
26529
26530 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26531 return 1;
26532
26533 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026534 return 1;
26535
26536 return 0;
26537}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026538
Thomas Wouters477c8d52006-05-27 19:21:47 +000026539_ACEOF
26540rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026541if { (ac_try="$ac_link"
26542case "(($ac_try" in
26543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26544 *) ac_try_echo=$ac_try;;
26545esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026547 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026548 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026550 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026551 { (case "(($ac_try" in
26552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26553 *) ac_try_echo=$ac_try;;
26554esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026556 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026557 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026559 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026560 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026562 echo "$as_me: program exited with status $ac_status" >&5
26563echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026564sed 's/^/| /' conftest.$ac_ext >&5
26565
26566( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026567ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026568fi
26569rm -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 +000026570fi
26571
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026572
26573
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026574fi
26575
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026576{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26577echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026578if test $ac_cv_have_size_t_format = yes
26579then
26580
26581cat >>confdefs.h <<\_ACEOF
26582#define PY_FORMAT_SIZE_T "z"
26583_ACEOF
26584
26585fi
26586
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026587{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26588echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026589if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026591else
Martin v. Löwis11437992002-04-12 09:54:03 +000026592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026593/* confdefs.h. */
26594_ACEOF
26595cat confdefs.h >>conftest.$ac_ext
26596cat >>conftest.$ac_ext <<_ACEOF
26597/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026598
26599#ifdef HAVE_SYS_TYPES_H
26600#include <sys/types.h>
26601#endif
26602#ifdef HAVE_SYS_SOCKET_H
26603#include <sys/socket.h>
26604#endif
26605
26606
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026607typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026608int
26609main ()
26610{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026611if ((ac__type_new_ *) 0)
26612 return 0;
26613if (sizeof (ac__type_new_))
26614 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026615 ;
26616 return 0;
26617}
26618_ACEOF
26619rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026620if { (ac_try="$ac_compile"
26621case "(($ac_try" in
26622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26623 *) ac_try_echo=$ac_try;;
26624esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026626 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026628 grep -v '^ *+' conftest.er1 >conftest.err
26629 rm -f conftest.er1
26630 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026632 (exit $ac_status); } && {
26633 test -z "$ac_c_werror_flag" ||
26634 test ! -s conftest.err
26635 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026636 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026637else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026639sed 's/^/| /' conftest.$ac_ext >&5
26640
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026641 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026643
26644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026645fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026646{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26647echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26648if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026649 :
26650else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026651
Martin v. Löwis01c04012002-11-11 14:58:44 +000026652cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026653#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026654_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026655
26656fi
26657
Michael W. Hudson54241132001-12-07 15:38:26 +000026658
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026659{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26660echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026661if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026662 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026663else
26664 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026665 ac_cv_broken_mbstowcs=no
26666else
26667 cat >conftest.$ac_ext <<_ACEOF
26668/* confdefs.h. */
26669_ACEOF
26670cat confdefs.h >>conftest.$ac_ext
26671cat >>conftest.$ac_ext <<_ACEOF
26672/* end confdefs.h. */
26673
26674#include<stdlib.h>
26675int main() {
26676 size_t len = -1;
26677 const char *str = "text";
26678 len = mbstowcs(NULL, str, 0);
26679 return (len != 4);
26680}
26681
26682_ACEOF
26683rm -f conftest$ac_exeext
26684if { (ac_try="$ac_link"
26685case "(($ac_try" in
26686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26687 *) ac_try_echo=$ac_try;;
26688esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026690 (eval "$ac_link") 2>&5
26691 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26694 { (case "(($ac_try" in
26695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26696 *) ac_try_echo=$ac_try;;
26697esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026699 (eval "$ac_try") 2>&5
26700 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026702 (exit $ac_status); }; }; then
26703 ac_cv_broken_mbstowcs=no
26704else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026705 echo "$as_me: program exited with status $ac_status" >&5
26706echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026707sed 's/^/| /' conftest.$ac_ext >&5
26708
26709( exit $ac_status )
26710ac_cv_broken_mbstowcs=yes
26711fi
26712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26713fi
26714
26715
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026716fi
26717
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026718{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26719echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026720if test "$ac_cv_broken_mbstowcs" = yes
26721then
26722
26723cat >>confdefs.h <<\_ACEOF
26724#define HAVE_BROKEN_MBSTOWCS 1
26725_ACEOF
26726
26727fi
26728
Antoine Pitroub52ec782009-01-25 16:34:23 +000026729# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026730{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26731echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026732
26733# Check whether --with-computed-gotos was given.
26734if test "${with_computed_gotos+set}" = set; then
26735 withval=$with_computed_gotos;
26736if test "$withval" != no
26737then
26738
26739cat >>confdefs.h <<\_ACEOF
26740#define USE_COMPUTED_GOTOS 1
26741_ACEOF
26742
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026743 { echo "$as_me:$LINENO: result: yes" >&5
26744echo "${ECHO_T}yes" >&6; }
26745else { echo "$as_me:$LINENO: result: no" >&5
26746echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026747fi
26748else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026749 { echo "$as_me:$LINENO: result: no" >&5
26750echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026751fi
26752
26753
26754
Michael W. Hudson54241132001-12-07 15:38:26 +000026755
26756
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026757for h in `(cd $srcdir;echo Python/thread_*.h)`
26758do
26759 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26760done
26761
Michael W. Hudson54241132001-12-07 15:38:26 +000026762
Neal Norwitzd24499d2005-12-18 21:36:39 +000026763SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026764{ echo "$as_me:$LINENO: checking for build directories" >&5
26765echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026766for dir in $SRCDIRS; do
26767 if test ! -d $dir; then
26768 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026769 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026770done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026771{ echo "$as_me:$LINENO: result: done" >&5
26772echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026773
Guido van Rossum627b2d71993-12-24 10:39:16 +000026774# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026775ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026776
Martin v. Löwis11437992002-04-12 09:54:03 +000026777cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026778# This file is a shell script that caches the results of configure
26779# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026780# scripts and configure runs, see configure's option --config-cache.
26781# It is not useful on other systems. If it contains results you don't
26782# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026783#
Martin v. Löwis11437992002-04-12 09:54:03 +000026784# config.status only pays attention to the cache file if you give it
26785# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026786#
Skip Montanaro6dead952003-09-25 14:50:04 +000026787# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026788# loading this file, other *unset* `ac_cv_foo' will be assigned the
26789# following values.
26790
26791_ACEOF
26792
Guido van Rossumf78abae1997-01-21 22:02:36 +000026793# The following way of writing the cache mishandles newlines in values,
26794# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026795# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026796# Ultrix sh set writes to stderr and can't be redirected directly,
26797# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026798(
26799 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26800 eval ac_val=\$$ac_var
26801 case $ac_val in #(
26802 *${as_nl}*)
26803 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026804 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26805echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026806 esac
26807 case $ac_var in #(
26808 _ | IFS | as_nl) ;; #(
26809 *) $as_unset $ac_var ;;
26810 esac ;;
26811 esac
26812 done
26813
Martin v. Löwis11437992002-04-12 09:54:03 +000026814 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026815 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26816 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026817 # `set' does not quote correctly, so add quotes (double-quote
26818 # substitution turns \\\\ into \\, and sed turns \\ into \).
26819 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026820 "s/'/'\\\\''/g;
26821 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026822 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026823 *)
26824 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026825 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026826 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026827 esac |
26828 sort
26829) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026830 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026831 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026832 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026833 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026834 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26835 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026836 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26837 :end' >>confcache
26838if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26839 if test -w "$cache_file"; then
26840 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026841 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26842echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026843 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026844 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026845 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26846echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026847 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026848fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026849rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026850
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026851test "x$prefix" = xNONE && prefix=$ac_default_prefix
26852# Let make expand exec_prefix.
26853test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026854
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026855DEFS=-DHAVE_CONFIG_H
26856
Skip Montanaro6dead952003-09-25 14:50:04 +000026857ac_libobjs=
26858ac_ltlibobjs=
26859for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26860 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026861 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026862 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026863 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26864 # will be set to the directory where LIBOBJS objects are built.
26865 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26866 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026867done
26868LIBOBJS=$ac_libobjs
26869
26870LTLIBOBJS=$ac_ltlibobjs
26871
26872
Martin v. Löwis11437992002-04-12 09:54:03 +000026873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026874: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026875ac_clean_files_save=$ac_clean_files
26876ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026877{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26878echo "$as_me: creating $CONFIG_STATUS" >&6;}
26879cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026880#! $SHELL
26881# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026882# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026883# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026884# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026885
Martin v. Löwis11437992002-04-12 09:54:03 +000026886debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026887ac_cs_recheck=false
26888ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026889SHELL=\${CONFIG_SHELL-$SHELL}
26890_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026891
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026892cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026893## --------------------- ##
26894## M4sh Initialization. ##
26895## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026897# Be more Bourne compatible
26898DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026899if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26900 emulate sh
26901 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026902 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026903 # is contrary to our usage. Disable this feature.
26904 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026905 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026906else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026907 case `(set -o) 2>/dev/null` in
26908 *posix*) set -o posix ;;
26909esac
26910
Michael W. Hudson54241132001-12-07 15:38:26 +000026911fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026912
26913
Michael W. Hudson54241132001-12-07 15:38:26 +000026914
Michael W. Hudson54241132001-12-07 15:38:26 +000026915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026916# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026917# Avoid depending upon Character Ranges.
26918as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26919as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26920as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26921as_cr_digits='0123456789'
26922as_cr_alnum=$as_cr_Letters$as_cr_digits
26923
26924# The user is always right.
26925if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026926 echo "#! /bin/sh" >conf$$.sh
26927 echo "exit 0" >>conf$$.sh
26928 chmod +x conf$$.sh
26929 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26930 PATH_SEPARATOR=';'
26931 else
26932 PATH_SEPARATOR=:
26933 fi
26934 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026935fi
26936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026937# Support unset when possible.
26938if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26939 as_unset=unset
26940else
26941 as_unset=false
26942fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026944
26945# IFS
26946# We need space, tab and new line, in precisely that order. Quoting is
26947# there to prevent editors from complaining about space-tab.
26948# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26949# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026950as_nl='
26951'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026952IFS=" "" $as_nl"
26953
26954# Find who we are. Look in the path if we contain no directory separator.
26955case $0 in
26956 *[\\/]* ) as_myself=$0 ;;
26957 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026958for as_dir in $PATH
26959do
26960 IFS=$as_save_IFS
26961 test -z "$as_dir" && as_dir=.
26962 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26963done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026964IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026966 ;;
26967esac
26968# We did not find ourselves, most probably we were run as `sh COMMAND'
26969# in which case we are not to be found in the path.
26970if test "x$as_myself" = x; then
26971 as_myself=$0
26972fi
26973if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026974 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026975 { (exit 1); exit 1; }
26976fi
26977
26978# Work around bugs in pre-3.0 UWIN ksh.
26979for as_var in ENV MAIL MAILPATH
26980do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26981done
26982PS1='$ '
26983PS2='> '
26984PS4='+ '
26985
26986# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026987for as_var in \
26988 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26989 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26990 LC_TELEPHONE LC_TIME
26991do
26992 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26993 eval $as_var=C; export $as_var
26994 else
26995 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26996 fi
26997done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026998
26999# Required to use basename.
27000if expr a : '\(a\)' >/dev/null 2>&1 &&
27001 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27002 as_expr=expr
27003else
27004 as_expr=false
27005fi
27006
27007if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27008 as_basename=basename
27009else
27010 as_basename=false
27011fi
27012
27013
27014# Name of the executable.
27015as_me=`$as_basename -- "$0" ||
27016$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27017 X"$0" : 'X\(//\)$' \| \
27018 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027019echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027020 sed '/^.*\/\([^/][^/]*\)\/*$/{
27021 s//\1/
27022 q
27023 }
27024 /^X\/\(\/\/\)$/{
27025 s//\1/
27026 q
27027 }
27028 /^X\/\(\/\).*/{
27029 s//\1/
27030 q
27031 }
27032 s/.*/./; q'`
27033
27034# CDPATH.
27035$as_unset CDPATH
27036
27037
27038
Martin v. Löwis11437992002-04-12 09:54:03 +000027039 as_lineno_1=$LINENO
27040 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027041 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027042 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027043
Martin v. Löwis11437992002-04-12 09:54:03 +000027044 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27045 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027046 # line-number line after each line using $LINENO; the second 'sed'
27047 # does the real work. The second script uses 'N' to pair each
27048 # line-number line with the line containing $LINENO, and appends
27049 # trailing '-' during substitution so that $LINENO is not a special
27050 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027051 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027052 # scripts with optimization help from Paolo Bonzini. Blame Lee
27053 # E. McMahon (1931-1989) for sed's syntax. :-)
27054 sed -n '
27055 p
27056 /[$]LINENO/=
27057 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027058 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027059 s/[$]LINENO.*/&-/
27060 t lineno
27061 b
27062 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027063 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027064 :loop
27065 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027066 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027067 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027068 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027069 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027070 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027071 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027072
Martin v. Löwis11437992002-04-12 09:54:03 +000027073 # Don't try to exec as it changes $[0], causing all sort of problems
27074 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027075 # original and so on. Autoconf is especially sensitive to this).
27076 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027077 # Exit status is that of the last command.
27078 exit
27079}
27080
27081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027082if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27083 as_dirname=dirname
27084else
27085 as_dirname=false
27086fi
27087
27088ECHO_C= ECHO_N= ECHO_T=
27089case `echo -n x` in
27090-n*)
27091 case `echo 'x\c'` in
27092 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27093 *) ECHO_C='\c';;
27094 esac;;
27095*)
27096 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027097esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027099if expr a : '\(a\)' >/dev/null 2>&1 &&
27100 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027101 as_expr=expr
27102else
27103 as_expr=false
27104fi
27105
27106rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027107if test -d conf$$.dir; then
27108 rm -f conf$$.dir/conf$$.file
27109else
27110 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027111 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027112fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027113echo >conf$$.file
27114if ln -s conf$$.file conf$$ 2>/dev/null; then
27115 as_ln_s='ln -s'
27116 # ... but there are two gotchas:
27117 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27118 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27119 # In both cases, we have to default to `cp -p'.
27120 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027121 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027122elif ln conf$$.file conf$$ 2>/dev/null; then
27123 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027124else
27125 as_ln_s='cp -p'
27126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027127rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27128rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027129
Skip Montanaro6dead952003-09-25 14:50:04 +000027130if mkdir -p . 2>/dev/null; then
27131 as_mkdir_p=:
27132else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027133 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027134 as_mkdir_p=false
27135fi
27136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027137if test -x / >/dev/null 2>&1; then
27138 as_test_x='test -x'
27139else
27140 if ls -dL / >/dev/null 2>&1; then
27141 as_ls_L_option=L
27142 else
27143 as_ls_L_option=
27144 fi
27145 as_test_x='
27146 eval sh -c '\''
27147 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027148 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027149 else
27150 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027151 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027152 esac;
27153 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27154 ???[sx]*):;;*)false;;esac;fi
27155 '\'' sh
27156 '
27157fi
27158as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027159
27160# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027161as_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 +000027162
27163# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027164as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027165
27166
Martin v. Löwis11437992002-04-12 09:54:03 +000027167exec 6>&1
27168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027169# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027170# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027171# values after options handling.
27172ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027173This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027174generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027175
27176 CONFIG_FILES = $CONFIG_FILES
27177 CONFIG_HEADERS = $CONFIG_HEADERS
27178 CONFIG_LINKS = $CONFIG_LINKS
27179 CONFIG_COMMANDS = $CONFIG_COMMANDS
27180 $ $0 $@
27181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027182on `(hostname || uname -n) 2>/dev/null | sed 1q`
27183"
27184
Martin v. Löwis11437992002-04-12 09:54:03 +000027185_ACEOF
27186
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027187cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027188# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027189config_files="$ac_config_files"
27190config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027192_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027193
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027194cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027195ac_cs_usage="\
27196\`$as_me' instantiates files from templates according to the
27197current configuration.
27198
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027199Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027200
27201 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027202 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027203 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027204 -d, --debug don't remove temporary files
27205 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027206 --file=FILE[:TEMPLATE]
27207 instantiate the configuration file FILE
27208 --header=FILE[:TEMPLATE]
27209 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027210
27211Configuration files:
27212$config_files
27213
27214Configuration headers:
27215$config_headers
27216
27217Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027219_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027220cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027221ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027222python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027223configured by $0, generated by GNU Autoconf 2.61,
27224 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027225
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027226Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027227This config.status script is free software; the Free Software Foundation
27228gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027229
27230ac_pwd='$ac_pwd'
27231srcdir='$srcdir'
27232INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027233_ACEOF
27234
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027235cat >>$CONFIG_STATUS <<\_ACEOF
27236# If no file are specified by the user, then we need to provide default
27237# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027238ac_need_defaults=:
27239while test $# != 0
27240do
27241 case $1 in
27242 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027243 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27244 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027245 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027246 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027247 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027248 ac_option=$1
27249 ac_optarg=$2
27250 ac_shift=shift
27251 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027252 esac
27253
Skip Montanaro6dead952003-09-25 14:50:04 +000027254 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027255 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027256 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27257 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027258 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027259 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027260 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027261 debug=: ;;
27262 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027263 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027264 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027265 ac_need_defaults=false;;
27266 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027267 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027268 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027269 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027270 --he | --h)
27271 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027272 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027273Try \`$0 --help' for more information." >&2
27274 { (exit 1); exit 1; }; };;
27275 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027276 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027277 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27278 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27279 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027280
27281 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027282 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027283Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027284 { (exit 1); exit 1; }; } ;;
27285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027286 *) ac_config_targets="$ac_config_targets $1"
27287 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027288
27289 esac
27290 shift
27291done
27292
Skip Montanaro6dead952003-09-25 14:50:04 +000027293ac_configure_extra_args=
27294
27295if $ac_cs_silent; then
27296 exec 6>/dev/null
27297 ac_configure_extra_args="$ac_configure_extra_args --silent"
27298fi
27299
27300_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027301cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027302if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027303 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27304 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027305 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027306 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027307fi
27308
Martin v. Löwis11437992002-04-12 09:54:03 +000027309_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027310cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027311exec 5>>config.log
27312{
27313 echo
27314 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27315## Running $as_me. ##
27316_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027317 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027318} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027320_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027321cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027322_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027323
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027324cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027325
27326# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027327for ac_config_target in $ac_config_targets
27328do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027329 case $ac_config_target in
27330 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27331 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27332 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027333 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27334 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027335 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27336 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027337 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027338
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027339 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27340echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027341 { (exit 1); exit 1; }; };;
27342 esac
27343done
27344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027345
Martin v. Löwis11437992002-04-12 09:54:03 +000027346# If the user did not use the arguments to specify the items to instantiate,
27347# then the envvar interface is used. Set only those that are not.
27348# We use the long form for the default assignment because of an extremely
27349# bizarre bug on SunOS 4.1.3.
27350if $ac_need_defaults; then
27351 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27352 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27353fi
27354
Skip Montanaro6dead952003-09-25 14:50:04 +000027355# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027356# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027357# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027358# Hook for its removal unless debugging.
27359# Note that there is a small window in which the directory will not be cleaned:
27360# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027361$debug ||
27362{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027363 tmp=
27364 trap 'exit_status=$?
27365 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27366' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027367 trap '{ (exit 1); exit 1; }' 1 2 13 15
27368}
Martin v. Löwis11437992002-04-12 09:54:03 +000027369# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027370
Martin v. Löwis11437992002-04-12 09:54:03 +000027371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027372 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027373 test -n "$tmp" && test -d "$tmp"
27374} ||
27375{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027376 tmp=./conf$$-$RANDOM
27377 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027378} ||
27379{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027380 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027381 { (exit 1); exit 1; }
27382}
27383
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027384#
27385# Set up the sed scripts for CONFIG_FILES section.
27386#
27387
27388# No need to generate the scripts if there are no CONFIG_FILES.
27389# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027390if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027391
27392_ACEOF
27393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027394
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027396ac_delim='%!_!# '
27397for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027398 cat >conf$$subs.sed <<_ACEOF
27399SHELL!$SHELL$ac_delim
27400PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27401PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27402PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27403PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27404PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27405PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27406exec_prefix!$exec_prefix$ac_delim
27407prefix!$prefix$ac_delim
27408program_transform_name!$program_transform_name$ac_delim
27409bindir!$bindir$ac_delim
27410sbindir!$sbindir$ac_delim
27411libexecdir!$libexecdir$ac_delim
27412datarootdir!$datarootdir$ac_delim
27413datadir!$datadir$ac_delim
27414sysconfdir!$sysconfdir$ac_delim
27415sharedstatedir!$sharedstatedir$ac_delim
27416localstatedir!$localstatedir$ac_delim
27417includedir!$includedir$ac_delim
27418oldincludedir!$oldincludedir$ac_delim
27419docdir!$docdir$ac_delim
27420infodir!$infodir$ac_delim
27421htmldir!$htmldir$ac_delim
27422dvidir!$dvidir$ac_delim
27423pdfdir!$pdfdir$ac_delim
27424psdir!$psdir$ac_delim
27425libdir!$libdir$ac_delim
27426localedir!$localedir$ac_delim
27427mandir!$mandir$ac_delim
27428DEFS!$DEFS$ac_delim
27429ECHO_C!$ECHO_C$ac_delim
27430ECHO_N!$ECHO_N$ac_delim
27431ECHO_T!$ECHO_T$ac_delim
27432LIBS!$LIBS$ac_delim
27433build_alias!$build_alias$ac_delim
27434host_alias!$host_alias$ac_delim
27435target_alias!$target_alias$ac_delim
27436VERSION!$VERSION$ac_delim
27437SOVERSION!$SOVERSION$ac_delim
27438CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27439UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27440ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27441PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27442PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27443PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27444PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27445PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27446FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27447FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27448FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27449FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27450FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27451MACHDEP!$MACHDEP$ac_delim
27452SGI_ABI!$SGI_ABI$ac_delim
27453CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27454EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27455CC!$CC$ac_delim
27456CFLAGS!$CFLAGS$ac_delim
27457LDFLAGS!$LDFLAGS$ac_delim
27458CPPFLAGS!$CPPFLAGS$ac_delim
27459ac_ct_CC!$ac_ct_CC$ac_delim
27460EXEEXT!$EXEEXT$ac_delim
27461OBJEXT!$OBJEXT$ac_delim
27462CXX!$CXX$ac_delim
27463MAINCC!$MAINCC$ac_delim
27464CPP!$CPP$ac_delim
27465GREP!$GREP$ac_delim
27466EGREP!$EGREP$ac_delim
27467BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27468LIBRARY!$LIBRARY$ac_delim
27469LDLIBRARY!$LDLIBRARY$ac_delim
27470DLLLIBRARY!$DLLLIBRARY$ac_delim
27471BLDLIBRARY!$BLDLIBRARY$ac_delim
27472LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27473INSTSONAME!$INSTSONAME$ac_delim
27474RUNSHARED!$RUNSHARED$ac_delim
27475LINKCC!$LINKCC$ac_delim
27476GNULD!$GNULD$ac_delim
27477RANLIB!$RANLIB$ac_delim
27478AR!$AR$ac_delim
27479ARFLAGS!$ARFLAGS$ac_delim
27480SVNVERSION!$SVNVERSION$ac_delim
27481INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27482INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27483INSTALL_DATA!$INSTALL_DATA$ac_delim
27484LN!$LN$ac_delim
27485OPT!$OPT$ac_delim
27486BASECFLAGS!$BASECFLAGS$ac_delim
27487UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27488OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27489LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27490SO!$SO$ac_delim
27491LDSHARED!$LDSHARED$ac_delim
27492BLDSHARED!$BLDSHARED$ac_delim
27493CCSHARED!$CCSHARED$ac_delim
27494LINKFORSHARED!$LINKFORSHARED$ac_delim
27495CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27496_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027497
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027498 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027499 break
27500 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027501 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27502echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027503 { (exit 1); exit 1; }; }
27504 else
27505 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027506 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027507done
27508
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027509ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27510if test -n "$ac_eof"; then
27511 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27512 ac_eof=`expr $ac_eof + 1`
27513fi
27514
27515cat >>$CONFIG_STATUS <<_ACEOF
27516cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27517/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027518_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027519sed '
27520s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27521s/^/s,@/; s/!/@,|#_!!_#|/
27522:n
27523t n
27524s/'"$ac_delim"'$/,g/; t
27525s/$/\\/; p
27526N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27527' >>$CONFIG_STATUS <conf$$subs.sed
27528rm -f conf$$subs.sed
27529cat >>$CONFIG_STATUS <<_ACEOF
27530CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027531_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027532
27533
27534ac_delim='%!_!# '
27535for ac_last_try in false false false false false :; do
27536 cat >conf$$subs.sed <<_ACEOF
27537SHLIBS!$SHLIBS$ac_delim
27538USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27539SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27540USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27541LDLAST!$LDLAST$ac_delim
27542THREADOBJ!$THREADOBJ$ac_delim
27543DLINCLDIR!$DLINCLDIR$ac_delim
27544DYNLOADFILE!$DYNLOADFILE$ac_delim
27545MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27546TRUE!$TRUE$ac_delim
27547LIBOBJS!$LIBOBJS$ac_delim
27548HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27549HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27550HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27551HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27552HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27553LIBM!$LIBM$ac_delim
27554LIBC!$LIBC$ac_delim
27555THREADHEADERS!$THREADHEADERS$ac_delim
27556SRCDIRS!$SRCDIRS$ac_delim
27557LTLIBOBJS!$LTLIBOBJS$ac_delim
27558_ACEOF
27559
27560 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
27561 break
27562 elif $ac_last_try; then
27563 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27564echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027565 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027566 else
27567 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27568 fi
27569done
27570
27571ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27572if test -n "$ac_eof"; then
27573 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27574 ac_eof=`expr $ac_eof + 1`
27575fi
27576
27577cat >>$CONFIG_STATUS <<_ACEOF
27578cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27579/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027580_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027581sed '
27582s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27583s/^/s,@/; s/!/@,|#_!!_#|/
27584:n
27585t n
27586s/'"$ac_delim"'$/,g/; t
27587s/$/\\/; p
27588N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27589' >>$CONFIG_STATUS <conf$$subs.sed
27590rm -f conf$$subs.sed
27591cat >>$CONFIG_STATUS <<_ACEOF
27592:end
27593s/|#_!!_#|//g
27594CEOF$ac_eof
27595_ACEOF
27596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027597
27598# VPATH may cause trouble with some makes, so we remove $(srcdir),
27599# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27600# trailing colons and then remove the whole line if VPATH becomes empty
27601# (actually we leave an empty line to preserve line numbers).
27602if test "x$srcdir" = x.; then
27603 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27604s/:*\$(srcdir):*/:/
27605s/:*\${srcdir}:*/:/
27606s/:*@srcdir@:*/:/
27607s/^\([^=]*=[ ]*\):*/\1/
27608s/:*$//
27609s/^[^=]*=[ ]*$//
27610}'
27611fi
27612
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027613cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027614fi # test -n "$CONFIG_FILES"
27615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027616
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027617for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027618do
27619 case $ac_tag in
27620 :[FHLC]) ac_mode=$ac_tag; continue;;
27621 esac
27622 case $ac_mode$ac_tag in
27623 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027624 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27625echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027626 { (exit 1); exit 1; }; };;
27627 :[FH]-) ac_tag=-:-;;
27628 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27629 esac
27630 ac_save_IFS=$IFS
27631 IFS=:
27632 set x $ac_tag
27633 IFS=$ac_save_IFS
27634 shift
27635 ac_file=$1
27636 shift
27637
27638 case $ac_mode in
27639 :L) ac_source=$1;;
27640 :[FH])
27641 ac_file_inputs=
27642 for ac_f
27643 do
27644 case $ac_f in
27645 -) ac_f="$tmp/stdin";;
27646 *) # Look for the file first in the build tree, then in the source tree
27647 # (if the path is not absolute). The absolute path cannot be DOS-style,
27648 # because $ac_f cannot contain `:'.
27649 test -f "$ac_f" ||
27650 case $ac_f in
27651 [\\/$]*) false;;
27652 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27653 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027654 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27655echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027656 { (exit 1); exit 1; }; };;
27657 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027658 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027659 done
27660
27661 # Let's still pretend it is `configure' which instantiates (i.e., don't
27662 # use $as_me), people would be surprised to read:
27663 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027664 configure_input="Generated from "`IFS=:
27665 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027666 if test x"$ac_file" != x-; then
27667 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027668 { echo "$as_me:$LINENO: creating $ac_file" >&5
27669echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027670 fi
27671
27672 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027673 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027674 esac
27675 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027676 esac
27677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027678 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027679$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027680 X"$ac_file" : 'X\(//\)[^/]' \| \
27681 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027682 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027683echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027684 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27685 s//\1/
27686 q
27687 }
27688 /^X\(\/\/\)[^/].*/{
27689 s//\1/
27690 q
27691 }
27692 /^X\(\/\/\)$/{
27693 s//\1/
27694 q
27695 }
27696 /^X\(\/\).*/{
27697 s//\1/
27698 q
27699 }
27700 s/.*/./; q'`
27701 { as_dir="$ac_dir"
27702 case $as_dir in #(
27703 -*) as_dir=./$as_dir;;
27704 esac
27705 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027706 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027707 while :; do
27708 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027709 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027710 *) as_qdir=$as_dir;;
27711 esac
27712 as_dirs="'$as_qdir' $as_dirs"
27713 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027714$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027715 X"$as_dir" : 'X\(//\)[^/]' \| \
27716 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027717 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027718echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027719 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27720 s//\1/
27721 q
27722 }
27723 /^X\(\/\/\)[^/].*/{
27724 s//\1/
27725 q
27726 }
27727 /^X\(\/\/\)$/{
27728 s//\1/
27729 q
27730 }
27731 /^X\(\/\).*/{
27732 s//\1/
27733 q
27734 }
27735 s/.*/./; q'`
27736 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027737 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027738 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027739 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27740echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027741 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027742 ac_builddir=.
27743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027744case "$ac_dir" in
27745.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27746*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027747 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027748 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027749 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027750 case $ac_top_builddir_sub in
27751 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27752 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27753 esac ;;
27754esac
27755ac_abs_top_builddir=$ac_pwd
27756ac_abs_builddir=$ac_pwd$ac_dir_suffix
27757# for backward compatibility:
27758ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027759
27760case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027761 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027762 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027763 ac_top_srcdir=$ac_top_builddir_sub
27764 ac_abs_top_srcdir=$ac_pwd ;;
27765 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027766 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027767 ac_top_srcdir=$srcdir
27768 ac_abs_top_srcdir=$srcdir ;;
27769 *) # Relative name.
27770 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27771 ac_top_srcdir=$ac_top_build_prefix$srcdir
27772 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027773esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027774ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027775
Martin v. Löwis11437992002-04-12 09:54:03 +000027776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027777 case $ac_mode in
27778 :F)
27779 #
27780 # CONFIG_FILE
27781 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027782
27783 case $INSTALL in
27784 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027785 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027786 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027787_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027788
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027789cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027790# If the template does not know about datarootdir, expand it.
27791# FIXME: This hack should be removed a few years after 2.60.
27792ac_datarootdir_hack=; ac_datarootdir_seen=
27793
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027794case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027795 p
27796 q
27797}
27798/@datadir@/p
27799/@docdir@/p
27800/@infodir@/p
27801/@localedir@/p
27802/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027803' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027804*datarootdir*) ac_datarootdir_seen=yes;;
27805*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027806 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27807echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027808_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027809cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027810 ac_datarootdir_hack='
27811 s&@datadir@&$datadir&g
27812 s&@docdir@&$docdir&g
27813 s&@infodir@&$infodir&g
27814 s&@localedir@&$localedir&g
27815 s&@mandir@&$mandir&g
27816 s&\\\${datarootdir}&$datarootdir&g' ;;
27817esac
27818_ACEOF
27819
27820# Neutralize VPATH when `$srcdir' = `.'.
27821# Shell code in configure.ac might set extrasub.
27822# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027823cat >>$CONFIG_STATUS <<_ACEOF
27824 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027825$extrasub
27826_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027827cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027828:t
27829/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027830s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027831s&@top_builddir@&$ac_top_builddir_sub&;t t
27832s&@srcdir@&$ac_srcdir&;t t
27833s&@abs_srcdir@&$ac_abs_srcdir&;t t
27834s&@top_srcdir@&$ac_top_srcdir&;t t
27835s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27836s&@builddir@&$ac_builddir&;t t
27837s&@abs_builddir@&$ac_abs_builddir&;t t
27838s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27839s&@INSTALL@&$ac_INSTALL&;t t
27840$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027841" $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 +000027842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027843test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27844 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27845 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027846 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027847which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027848echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027849which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027851 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027852 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027853 -) cat "$tmp/out"; rm -f "$tmp/out";;
27854 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27855 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027856 ;;
27857 :H)
27858 #
27859 # CONFIG_HEADER
27860 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027861_ACEOF
27862
27863# Transform confdefs.h into a sed script `conftest.defines', that
27864# substitutes the proper values into config.h.in to produce config.h.
27865rm -f conftest.defines conftest.tail
27866# First, append a space to every undef/define line, to ease matching.
27867echo 's/$/ /' >conftest.defines
27868# Then, protect against being on the right side of a sed subst, or in
27869# an unquoted here document, in config.status. If some macros were
27870# called several times there might be several #defines for the same
27871# symbol, which is useless. But do not sort them, since the last
27872# AC_DEFINE must be honored.
27873ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27874# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27875# NAME is the cpp macro being defined, VALUE is the value it is being given.
27876# PARAMS is the parameter list in the macro definition--in most cases, it's
27877# just an empty string.
27878ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27879ac_dB='\\)[ (].*,\\1define\\2'
27880ac_dC=' '
27881ac_dD=' ,'
27882
27883uniq confdefs.h |
27884 sed -n '
27885 t rset
27886 :rset
27887 s/^[ ]*#[ ]*define[ ][ ]*//
27888 t ok
27889 d
27890 :ok
27891 s/[\\&,]/\\&/g
27892 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27893 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27894 ' >>conftest.defines
27895
27896# Remove the space that was appended to ease matching.
27897# Then replace #undef with comments. This is necessary, for
27898# example, in the case of _POSIX_SOURCE, which is predefined and required
27899# on some systems where configure will not decide to define it.
27900# (The regexp can be short, since the line contains either #define or #undef.)
27901echo 's/ $//
27902s,^[ #]*u.*,/* & */,' >>conftest.defines
27903
27904# Break up conftest.defines:
27905ac_max_sed_lines=50
27906
27907# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27908# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27909# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27910# et cetera.
27911ac_in='$ac_file_inputs'
27912ac_out='"$tmp/out1"'
27913ac_nxt='"$tmp/out2"'
27914
27915while :
27916do
27917 # Write a here document:
27918 cat >>$CONFIG_STATUS <<_ACEOF
27919 # First, check the format of the line:
27920 cat >"\$tmp/defines.sed" <<\\CEOF
27921/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27922/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27923b
27924:def
27925_ACEOF
27926 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27927 echo 'CEOF
27928 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27929 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27930 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27931 grep . conftest.tail >/dev/null || break
27932 rm -f conftest.defines
27933 mv conftest.tail conftest.defines
27934done
27935rm -f conftest.defines conftest.tail
27936
27937echo "ac_result=$ac_in" >>$CONFIG_STATUS
27938cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027939 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027940 echo "/* $configure_input */" >"$tmp/config.h"
27941 cat "$ac_result" >>"$tmp/config.h"
27942 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27943 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27944echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027945 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027946 rm -f $ac_file
27947 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027948 fi
27949 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027950 echo "/* $configure_input */"
27951 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027952 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027953 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027954 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027956
27957 esac
27958
27959done # for ac_tag
27960
Guido van Rossum627b2d71993-12-24 10:39:16 +000027961
Martin v. Löwis11437992002-04-12 09:54:03 +000027962{ (exit 0); exit 0; }
27963_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027964chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027965ac_clean_files=$ac_clean_files_save
27966
27967
27968# configure is writing to config.log, and then calls config.status.
27969# config.status does its own redirection, appending to config.log.
27970# Unfortunately, on DOS this fails, as config.log is still kept open
27971# by configure, so config.status won't be able to write to it; its
27972# output is simply discarded. So we exec the FD to /dev/null,
27973# effectively closing config.log, so it can be properly (re)opened and
27974# appended to by config.status. When coming back to configure, we
27975# need to make the FD available again.
27976if test "$no_create" != yes; then
27977 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027978 ac_config_status_args=
27979 test "$silent" = yes &&
27980 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027981 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027982 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027983 exec 5>>config.log
27984 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27985 # would make configure fail if this is the last instruction.
27986 $ac_cs_success || { (exit 1); exit 1; }
27987fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027988
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027989
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027990echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027991if test ! -f Modules/Setup
27992then
27993 cp $srcdir/Modules/Setup.dist Modules/Setup
27994fi
27995
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027996echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027997if test ! -f Modules/Setup.local
27998then
27999 echo "# Edit this file for local setup changes" >Modules/Setup.local
28000fi
28001
28002echo "creating Makefile"
28003$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28004 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028005 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028006mv config.c Modules